When I attached our children’s swing to the ground there was still a significant piece of sharp-ish threaded metal sticking out above the bolt head and I was worried about them falling on it. Grinding the end off might still leave some sharp parts, so I thought it safer to print plastic covers for them.
Sharp bolt end protruding from the ground
Screenshot of bolt cap design in OpenSCAD
Screenshot of gcode printing plan
Photo of 3D printed bolt cap
I designed the caps using OpenSCAD, using the ScrewsMetric library for the bolt-shaped inset.
The biggest challenge was to find an acceptable compromise in shape and size:
– tall enough to cover the top of the bolt
– narrow enough base to fit next to the swing’s leg
– should be printable without overhangs and no need for supports
The final design I went with is a bit different from in the photo above because that one didn’t fit. I kept the size the same and chopped off one side of the dome to leave space for the swing’s leg.
There’s this fantastic device we have at home that I’m fairly sure is for giving back rubs, or maybe massages in general, like on your legs or something. I’ve tried it a few times but mostly the kids play with it. However it bothers me that there’s holes in it where the little knobs are supposed to be, so it doesn’t roll properly. I think the kids pulled them out, but maybe they were just never glued in properly.
holes from missing knobs in massager
Anyway, I doubt I could go in a shop and say “please give me tiny wooden knobs to this size” so I decided to attempt to print some. I’ve done some basic 3D modelling work before so with a bit of work and the right measurements, this should be doable, and it’s an interesting shape.
sketch with measurements for wooden knobs
Here’s a hand-drawn sketch I did quickly after measuring the wooden knob with a pair of callipers. It immediately became apparent that this was not going to be as simple as I thought because shaft part isn’t straight, but more like a chopped-off cone, and the head part isn’t round on every axis, it’s an ellipsoid. I Googled that word 😅 just to write it in this blog post, it’s the 3D version of an oval. Continue reading →
This year was my first time participating in the online Hacktoberfest event.
I often use code from GitHub and occasionally publish my own projects there but I realised I rarely contribute to other people’s code. Hearing people talking about the event on the Ladybug Podcast, I was inspired to make a small pull request. The boost I got from something so insignificant being merged lead me to look through my favourite projects’ issue lists to see if there was a bug I could fix or a missing feature I could implement.
Yesterday I found a typo in a pull request description while browsing another team’s project which I stumbled upon. I mentioned it to the author but it turned out that that part of the text came from the repository’s pull request template, which means every pull request will have this amusing but irritating mistake. I sent them a pull request, modifying the template, to fix the mistake at the source and avoid it in future, and thought that would be the end of it.
It turns out that template was written once and then copied across to new repos, which means this typo actually exists in almost all the pull requests in all of that team’s projects. Well that escalated quickly. This is the point where the average person probably says “OK whatever, it’s not worth it for something so small, there are too many repos, it’s just a small typo, never mind” and stop. A very determined person might actually start opening browser tabs and psyching themselves up to do pull requests. I open my terminal emulator and start writing a for loop. Continue reading →
I’ve decided to give Wakatime a second try. It’s a tool that tracks the time you spend programming on different projects by integrating into your IDE. This works well for typical development work where you open your IDE in the morning and type code in it, do commits with it, and everything else related to the project and Wakatime will track that.
I don’t work like that though, so I had two issues with it last time, both resulting in a lower reported time spent working:
I spent most of the day working on different remote servers and it would be a hassle to set it up in the text editor on each of them and it would undoubtedly cause slowdown on the older servers
This time it’s different because nowadays I virtualise most of the services I work with, using Docker on my local machine, and I’m hoping that using the Wakatime Z Shell integration will give a better record of time spent working on a project. Continue reading →
How and why I normalised my Go paths and personal/local home paths.
Like many people, I have my own scripts and stuff in a bin directory in my home directory. Actually it’s a symlink to ~/.local/bin because I saw there was a ~/.local/share which some programs use to store user-specific things and I wanted to be consistent.
Since I use a lot of split windows in Vim, for example when exploring the git log or editing closely related files, a pattern I noticed is I often want to make one of the smaller windows full screen momentarily so I can read more at once without scrolling and then close it when I’m done. I made a really simple mapping to simulate this “full screen” idea:
:nnoremap <Leader>f :tabe %<CR>
This opens the current window’s buffer in a new tab (fake full screen 😁) and when I close it I’m back to tab one with my split windows.
To demonstrate, here’s a gif in which I inspect the git blame for a file, open a patch and then open it “full screen” in a new tab:
Vim fake fullscreen demo gif
Browsing the git log isn’t the best example because fugitive’s blame window already has an O mapping which opens the patch in a tab instead of a split and the necessity for this would be clearer with bigger files like those I edit at work.
This is one of the few things I use tabs for since I’m mostly jumping through buffers. Hopefully it’s useful for you too!
My wife’s phone (Samsung Galaxy Mini GT-S5570I) doesn’t get system updates any more, so I need to manually move Google’s updates into ROM to make space for regular apps. You need root privileges to do this, so I was following these instructions on the XDA Forum which almost work fine. You need to download and apply a file update.zip but the problem is the update script inside doesn’t include S5570I in the list of phone models it checks for, so the script aborts.
All you need to do is edit /META-INF/com/google/android/updater-script inside update.zip and include this phone model in the assertion list, for example, I duplicated lines 15 and 16 and just added an I to the end:
Everything works completely fine after that. Obviously this is not a general solution when rooting, you can’t just blindly add your own phone model into any update.zip not knowing what’s in it, but since this was from a post for specifically this model and it already had several very similar models listed, I thought it was worth the risk and it turned out just fine. Woop! 😎
I keep forgetting this, but it’s really useful when working in the command line so I’m writing it down now. I use the grml zsh configuration in my shell and it has several very good features; a cool one I’d use more often if I could remember the shortcut is “in-place mkdir”. The key sequence is:
That’s Ctrl and x, followed by an uppercase M.
Here’s an example use case: Imagine you’re writing a command to do something with a very long path, like moving a file deep into a source tree
mv File.java src/something/very/long/
except half-way in your realise some of the directories in that path don’t exist. No problem! Usually you’d have to cancel that command, create the missing directories and then type it again. Now you can just type Ctrl-X, Shift-M, the directories are created and you can just press enter to use them. Much less annoying! This can even work for different directories in the same command; move the cursor to the directory you need and zsh will create that one!