Spell checking git commit messages turns out to be oddly hard.
The hook to do it in is commit-msg but there are a few problems. First is making global hooks and second is doing the checking.
One might argue that you can just do this in your editor, but I usually use the -m flag on git commit so no editor gets a whack at it. Since that trick won’t really work, what are the other options?
If you’re bored, I made a tool for inauguration bingo…
Finally getting around to building the garage for my house 20 years on. I had three goals for my garage: that it be used for a car, that it has a workshop and that it gets solar power.
The car bit is because I’ve seen too many garages not used for cars. Also EVs can be tasty treats, in certain circumstances, for rodents. And since I also wanted a workshop I needed to design space for both - which meant a wide garage.
I got rid of my TV years ago. In Ireland you have to pay an annual TV
license fee. An Post sends out regular enforcement letter to homes that
do not have a TV License. At first I was kind of annoyed about the
rather threatening letters, but as time has gone on I just have fun
making ridiculously friendly and goofy replies.Read more
So yesterday I wrote…
Annoyingly I can’t really generalise this script very easily. I could
drive it off some settings in
~/.gitconfig but haven’t gotten around
to it. For now you’ll have to add the GitLab servers you care about.
Yeah, this was way easier to do than I thought. You need to run these
four commands for each gitlab server:Read more
At work I tend to pop around a lot of projects fixing (and let’s be honest, breaking) things. And since I spend a lot of time in shell it would be nice if my shell prompt would tell me the status of the pipeline of the project and branch that I’m currently in. Especially when I context switch back to a project, it would be good if cd other/project would tell me not just what branch I was in, but whether it built or didn’t.
I’ve been really happy with my Intel NUC desktop, but one annoying thing is that when the displays go to sleep lots of things get messed up. The monitors lose resolution settings, windows get moved around, etc.
So hunting around today I wondered if the issue might have something with the kernel putting the USB hubs to sleep. The NUC has one HDMI port but it can support up to three monitors with the other two being over the USB-C connection.
If you want a different default branch name for git / gitlab:
1 git config --global init.defaultBranch dev On gitlab under admin/application_settings/repository you can adjust it for repos created there. This won’t affect existing repos.
Hanging in my hall there’s a picture. Because of how I’ve hung it, chances are at any point in time it’s a little crooked. It probably also needs some sort of frame. It’s one of those “Things To Do” I have in the back of my head.
I’m not really sure what it’s of. It’s like a photo printed on canvas of a stream or a canal with a bush in it.
This morning, I’m in Switzerland and going into work. I stop by a shop and am in the queue to buy milk and an orange. As the cashier is ringing that up I notice some Rice Krispies treats. I take one, but the package is weird. “With pork.” Er, no, look again, ok they have normal ones. So I get one of those.
The cashier finishes and I tap my Bank of Ireland card.
I was curious what I’d find if I looked into my top shell commands. I’ve been saving my shell history for almost four years, so I have a fair bit of data to work with.
To start with - how much history. I made a ~/history file with the names of the bash and zsh history files. Annoyingly I didn’t put .zsh at the end of my zsh history files so this was the easier way.
Through the lockdown I was avoiding bread for goofy reasons. But I did learn to make corn tortillas. Once I felt good doing that I decided to try a more Irish version of a taco and came up with Spice Bag Tacos.
First, get some corn tortillas. Or make them. I discovered you can make them on a pancake griddle and they come out fine. I can usually make them as things cook in the oven in this recipe.
Every now and then I need to filter out lines that are mostly the same but slightly different.
The uniq command can filter out lines that are duplicates (-u) but doesn’t get rid of lines that are mostly the same. I had time the last time if came up and wrote this - uniqish. Kind of curious if there are other ways to accomplish this.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 #!
It turns out that you can include files in your ~/.gitconfig. One thing the docs don’t explain is that missing files are silently ignored. In addition you can include files conditionally based on where the git repo is and what the branch name is.
All these make things much easier for my home dir to work across environments.
For example I have a crypt repo which includes encrypted versions of my gpg keys.
I added a new [ Listen to article ] link to my pages. This is done via the SpeechSynthesis API that I played around with in my little spoken cube toy.
The code to do it is in the speak.js file that each page loads. I’ve broken it out into a gist as I minimize all my js files when I publish.
There are clearly problems with this. Some of them are due to the API, some are due to the fact that I pull the text directly from the article tags.
After years of complaining that the internet lacked a sarcasm font it seems we’ve decided on random mixed case for denoting sarcasm.
Clearly we need a shell script to do this.
Or rather, “cLearLY wE neeD a SheLl sCrIpT to do tHiS.”
But I do find it useful, hence this recent addition to my home dir - ~/bin/sarcasm:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 #!
The Laravel PHP framework uses environment variables to configure itself. There are ways to set envirnment variables for Apache but then you also need to set them for cron and for CLI scripts as well.
On Ubuntu this is usually done with /etc/environment which is read by the pam_env PAM module when a PAM session is created. I wanted this to work on FreeBSD which was a bit of a learning experience into where free unixes are diverging.
Since I’ve had this conversation in person a few times, I thought I’d write it down. The are three problems with EVs that people talk about that aren’t really problems. However, the reality of EVs that makes those issues not-exist causes a number of problems.
The three non-problems people talk about are cost, charging times and range. Costs are coming down and as time goes on the used EV car market is growing.
Sometimes it’s really handy to be able to serve out a git repo from your laptop. Say you’re at a conference or on a plane and lack an external net connection but can make a local network connection between you. Or you want to do some sort of local testing of a git clone or pull.
I needed to do that recently and came across this article which described a really quick way to do it - though it’s instructions were a bit off.
Once you start putting your home dir in version control, some more options start coming up. And with something like a personal gitlab instance those options multiply even more. Here I’m going to explore using gitlab’s CI features.
I already discussed using gitlab’s ticketing feature to keep track of tasks. And previously I wrote about an update script for my home dir to keep the various tools I use current. However gitlab also offers a CI system which allows me to automate those updates.