Merry Christmas, I guess.

It’s Christmas morning. I’ve been fighting a cold for the last few weeks, on and off. Today’s status is “kind of congested, scratchy throat, and not enough energy for anything even vaguely challenging.” It was 5º yesterday morning, and 14º this morning, so it’s been a very cold couple of days. My heat has been working reasonably well, so that’s good.

I spent Christmas Eve watching football, mostly. A friend dropped by for a few hours and hung out. He gave me an A500 Mini for Christmas, which was pretty cool. I haven’t tried to hook it up yet. (See “not enough energy…” above.) The Giants lost, but they’re not out of playoff contention, so that’s good. And it was a fun game to watch.

I’m listening to Jon Solomon’s holiday marathon on WPRB right now. He’s currently playing Snaildartha, which is a nice thing to listen to when you’re trying to get through Christmas morning with a bit of a headache and not much energy.

And it’s working well as background music while I change the passwords on all the personal accounts I had stored in LastPass. The information that’s come out recently about their breach is a bit alarming. I don’t really use LastPass for personal use; I have a 1Password account for that. But we use it at work, and I have a linked personal LastPass account in which I’ve stored passwords for a few accounts that I occasionally need to use at work, like Pluralsight, StackOverflow, ACM, and stuff like that. I’ve done some background reading on the breach, and it sounds like it’s unlikely that anyone would ever bother trying to crack my password vault. But it’s possible that they could, and the accounts I had in there are ones where I had some questionable passwords anyway, so I went ahead and changed them.

I’m not sure what our InfoSec people are going to recommend we do with business passwords in LastPass. They’ve already forced us to reset our LastPass master passwords, but that’s useless if the hackers already have a copy of our data (which I guess they do). The official LastPass blog post says “…it would take millions of years to guess your master password using generally-available password-cracking technology”, so I guess we’re safe. Oof. I shouldn’t be thinking/blogging about password breaches on Christmas Day, but here we are.

I’m trying to figure out what I want to do with the rest of the day now. There’s football to watch, which could keep me busy from around noon until I go to bed. I’ve also considered binge-watching one of the many TV shows that came out this year that I haven’t watched yet, like Andor on Disney+, or one of the Star Trek shows that I haven’t caught up with yet.

Maybe I could watch something Christmas-related. I watched the 1984 version of A Christmas Carol, with George C. Scott, last night, and that was good. And I re-watched Shaun the Sheep: The Flight Before Christmas on Netflix. Also good.

And, since Christmas falls on a Sunday this year, I have tomorrow off from work too. So maybe I can watch football today and Andor tomorrow. I’m not sure if Andor is in any way Christmas-y, but it seems to have a character who looks a little like Santa, based on the main image that goes with this article.

a little PowerShell

It’s been a while since I’ve posted any PowerShell code. I had to write a quick script today to run some SQL, save the output to CSV, then ZIP the CSV file. And I had to loop through and the run SQL multiple times, one for each month from January 2021 until today.

That forced me to look up some stuff that I didn’t know how to do in PowerShell, off the top of my head. (In fact, most of it was stuff I didn’t know off the top of my head. I don’t use PowerShell enough to remember anything…) So here’s an edited version of the script, simplified somewhat. It might come in handy some time, if I ever need to do this again.

# CustInvAll-export.ps1

#Requires -Version 7
#Requires -Modules SqlServer

$dateFmt = 'yyyy-MM-dd'
$sqlServer = "MyServer"
$dbName = "myDB"

$curDate = [DateTime]::Today
$startDate = [DateTime]'01/01/2021'
while ($startDate -lt $curDate) {
    $endDate = $startDate.AddMonths(1)
    $startDateFmt = $startDate.ToString($dateFmt) 
    $endDateFmt = $endDate.ToString($dateFmt)
    
    $exportSQL = @"
    SELECT *
    FROM MyTable
    where [INVOICEDATE] >= '$startDateFmt' and [INVOICEDATE] < '$endDateFmt'
"@
    $exportFile = "CustInvAll-$startDateFmt.csv"
    $exportFileZip = "CustInvAll-$startDateFmt-csv.zip"

    echo "Exporting from $startDateFmt to $EndDateFmt to file $exportFile"

    # Invoke-Sqlcmd -ServerInstance $sqlServer -Database $dbName -Query $exportSQL `
    # | Export-CSV -Path $exportFile -NoTypeInformation  -UseQuotes AsNeeded

    # Compress-Archive -LiteralPath $exportFile -DestinationPath $exportFileZip

    $startDate = $endDate
} 

It can also be found in a Gist.

more dumb social media stuff

The big news on Twitter today was that Elon is banning accounts that promote rival social media platforms. I have a link to my Mastodon account in my Twitter profile, so let’s see if that’s enough to get me banned. Meanwhile, there was some hilarity when one media outlet got confused and thought that Twitter had banned someone named “John Mastodon.” So I may have spent too much time today switching back and forth between Twitter and Mastodon, following all the silliness around that.

I’ve decided to turn off the function in WordPress that automatically shares posts to Twitter. And I added a link to my Mastodon account to the site footer. I’m probably going to keep checking Twitter, since there are still a bunch of news sources that post there, but I think I’m going to keep trying to wean myself off it (as mentioned in my last post).

I’m starting to think I should work on my short attention span problem, so maybe I should get off social media entirely. I almost read this article at The Guardian today, but it was too long. I saved it to Instapaper. I need to read more of the stuff in my Instapaper account and spend less time on social media, I guess. I have a bunch of long New Yorker articles saved to Instapaper, and I never get around to reading them. I started reading this 1955 article about the dead sea scrolls recently. I have no clue when or why I saved that, but it’s a good article.

I also wound up reading this 1951 NY Times article today, because I was trying to figure out what the phrase “the smile of the absent cat” meant. (See also this related article.) I feel like I should have something pithy to say about the contrast between  Einstein arguing with Viscount Samuel about theoretical physics is the 1950’s and Elon Musk arguing with… everybody about… nonsense today. But I don’t really. All I can do is roll my eyes and sigh.

Mastodon

OK, so I finally gave in and signed up for a Mastodon account. You can find me at @andyhuey@mastodon.social. I spent too much time, initially, stressing about which instance to sign up at, then gave up and just used mastodon.social, which is what pretty much everyone else uses. (I really wanted to pick a “cool” instance that would mark me as one of the “cool kids,” but then I remembered that I’m a 55 year old nerd.)

I also have CounterSocial, Hive, and Post accounts, but honestly I think Mastodon is “winning” the war for Twitter refugees. I used Fedifinder to get a list of my Twitter “friends” and follow them on Mastodon. It found 35. Apparently, I’m following 380 accounts on Twitter, which is more than I would have guessed. (A lot of those are probably inactive, but still, that’s a lot.) So I guess around 10% of the accounts I follow on Twitter are on Mastodon. I guess that’s a good start.

Jeff Jarvis has a good write-up on Mastodon here (and a video too). I used his write-up to get myself started.

I searched my Pinboard account for references to Mastodon, and found one from 2017, so I’ve at least been aware of Mastodon for several years now. I probably should have signed up for an account back then, so I’d be able to say that I was into Mastodon before it was popular. Really, I guess I’m at the point in my life where I’m not usually an early adopter anymore. I’m too old to get excited about messing around with half-baked projects that might or might not go anywhere. At least I can say that I got my preferred “andyhuey” username on all of the new services I signed up for, so that’s something. (Though, with Mastodon, there are multiple instances, so there could be other andyhuey’s on other servers.)

I haven’t tried the official Mastodon iOS client yet, but I’m going to do that today. I might also try one of the third-party ones. I do wish that the folks who make Twitterrific would make a Mastodon client. i really like Twitterrific, and would love to have a similar app for Mastodon.

I’d also like to see WordPress add Mastodon support to their social sharing tool. Right now, I’m auto-sharing my blog posts to Twitter. They also support Facebook, LinkedIn, and Tumblr, but not Mastodon yet. There’s at least one third-party plugin for Mastodon posting, but I don’t know if I want to mess around with it yet.

Anyway, I’m going to see if I can switch some of my social media time over from Twitter and Facebook to Mastodon this week. The problem, I think, is that there isn’t a lot of mainstream media presence on Mastodon yet. A lot of my time on Twitter and Facebook is spent clicking on links to news articles from the NY Times account, Washington Post account, and so on. Really, I should try to switch over to my RSS reader for that kind of stuff. So maybe, between RSS and Mastodon, I can wean myself off Twitter and/or Facebook. We’ll see how far I get with that.