For some reason a few weeks back I was wondering about using ssh keys to encrypt/decrypt files. Seems like a thing that should be possible, why not? And sure enough, it’s been done.
This won’t be as good as using gpg keys. Specifically without the web of trust it can be hit with MITM attacks, but I think it would be “good enough” for most people in most uses. And in my experience getting people to use gpg is like pulling teeth.
While playing with the Twitter API via a Go lib I saw someone call on people to troll reply to a tweet with a specific piece of text.
This seemed like a really easy thing to search for and block. So I modified the little Go program from starting with ephemeral and put in this as the function run in main().
It searches for the string it’s given and then if the tweet consists solely of that text (compared by turning the string lowercase and then stripping out everything that’s not a letter) it blocks the user.
One nice side effect of using vcsh was developing more complex scripts to help me do things. I didn’t have to worry a script or tool would get lost when a machine inevitibly died.
However before writing a script, sometimes it’s not a bad idea to check and see if someone else already has. Lately many of those that I’ve found have been in Go.
Originally I did these with update but it made update take a long time to run and sometimes with die if a rarely used Go util was broken.
A while back I switched to vcsh. I’ve written a few articles on using it but since then I’ve migrated machines a number of times.
The big issue I’ve found is having to manually install software on each machine. There are things my scripts depend on and things I just expect to have and manually creating them each time is annoying.
So the solution obviously is a script. It’s actually used all the time as I might create new dependencies or find new tools I need so I’d want that installed on all machines.
So now ephemeral was working on my current tweets, but not handling the “historical” ones which twitter deems to be the ones older than the 3,200 most recent.
There are APIs that you can use to access those, but they require a paid license. So instead I went into my settings in twitter and requested an archive of my tweets. This takes a number of hours but eventually you get a download link and a while after using that you end up with a huge zip file.
I’ve set up Vicky Lai’s ephemeral to make my tweets, well, ephemeral. But if you follow her README you’ll see the initial config is all manual. I’d rather have that be scripted so I can more easily replicate it in the future.
So I wrote a script to create the AWS lambda instance. The prerequisites for this are covered in Vicky’s README but you’ll also need the aws cli, a go install and I find it’s also useful to use named profiles.
tl;dr my year in vim
Gource is a neat tool for visualising the history of a of a software project. In a way it’s kind of a fun combination of this scene Jurassic Park and version control.
Reading up on it I learned it could also visualise multiple repositories so I decided it would be kind of fun to do just that. I use vcsh to manage my home directory, pass to manage passwords, Hugo for my website and slack for managing my personal servers.
Work had a bake off thingy and I managed to come in second. The winner did bread pudding that included whisky - this was a reminder that just like in writing you need to know your audience! The cookbook for my selection of cookies is based off my Thanksgiving cookbook template.
A few years back I linked a number of drabbles and twabbles I had written. So a new one for the holiday season and the relaunch of the Drabblecast:
“All the reindeer finally loved him. They all shouted with glee. Rudolph grinned at them all. He released his tentacles.”
Also in writing this I reread the old contributions and realised “Different” would be better if I changed just one word (see if you can spot it):
I had this idea I would start doing more regular blog posts last year but that seems to have failed. Maybe next year!
I had help with this year’s troff adventures so thanks to Catherine for this year’s 2018 cookbook. There are some recipe errata I need to do - but those are all mine. Essentially I winged (sorry) the turkey burritos on the day and what I actually did vs what I vaguely considered doing early Saturday morning did not line up.
Another adventure with troff generated a menu. By all reports people had a good time. I was a bit more adventurous this year and did biscuits - a variation on Allen’s. This meant I had to cook one dish 10 minutes before dinner so timing of everything else became a bit more strict.
It worked however and people liked them. The rice cooker and the slow cookers really did make the timing issue less stressful this time.
Following up on the cube root trick post, I wrote a version that speaks the number in Chrome. It’s an experimental API and I doubt I’m choosing the voice very well. But it does train how to do the trick better than reading the cubed number on screen.
On browsers that don’t support this API it degrades down to the way the previous version worked.
I also updated the old tool to take input once the second number is typed in - with that I got down to a sustained 3.
After reading how to get cube roots in your head in a particular set of circumstances I learned the trick while stuck in traffic. But it then says you have to practice a lot so I wrote a tool in C to do that. But then I realised a web version might be a bit more accessible to people so here’s one.
Made the trainer work nicer on mobiles thanks to [Kae]’s suggestion.
Since switching to vcsh I’ve been writing more personal scripts since they’re pretty easy to ship around to each machine. Plus more things have REST APIs and python’s slumber makes it dead easy to talk to them.
However I then have to make sure modules like slumber are installed since it’s not in the python standard library. This adds a level of awkwardness to the scripts in my ~/bin.
While looking for something else I came across this answer on stackoverflow and it fit what I wanted to do.
I wrote the following in a comment on a discussion about the
protests in Charlottesville. Some people felt that protesters
on “both sides” were “thugs.”
I went to school in Kansas. And if you go into the Kansas State
Capitol in Topeka you’ll see an imposing mural of a thug: John
Brown He was an abolitionist who (sadly unusually for the
time) actually believed in equality - and he walked his talk.Read more
A few months back I upgraded my vim configuration to use pathogen for managing my vim plugins.
Since adding plugins was now a doddle I found a few lists of “super-duper useful vim plugins you must have” and just installed them blindly. Along the way I also configured how various plugins and the like were configured. This included a one-line change to associate .md files with markdown (by default they associate Modula-2 which I haven’t written code in for 20+ years).
Leo Sherlock’s apology leaves
something to be desired. It’s an image which I think he believes is hard
to search for (sorry, search engines do OCR on images) and printed so
it’s hard to read.
To help rectify this and offer links to his apology and those
affected, I wrote this up. Do feel free to copy and paste all of
this and post it far and wide.Read more
This is just a simple thing, but it makes working in Go’s source tree way easier. Particularly since I use repos from three different sites that start with “git.”
In zsh there’s a thing called cdpath with zsh will use to complete a cd command. For the longest time mine was set to cdpath=(~ ~/src) so if I typed cd foo and there wasn’t a foo in the current directory zsh would go look in ~ and then in ~/src.
Step one was to stop sending money to Team Past. So got rid of Sky and will be working on reducing spending on some other utilities.
But on a more positive note, I tried to figure out how to spend money on Team Future - people, organisations and companies who support good journalism, civil rights organisations, research, education and entertainment.
Private Eye does good investigative journalism in the UK. (subscribe) The Sunday Business Post is one of the remaining independent media orgs in Ireland.
I hadn’t heard about Jackie before I noticed it in the list of films at the cinema. I had been looking to see if Loving was out and came across this.
This review won’t really be spoilery, but obviously if you want to go into the film completely blank I’d skip out now. Just know it’s a really well done film on a tough topic.
The film is disconcerting at first because Natalie Portman’s acting is so artificial.