Reorder Rails database migrations files
On new Rails apps, that are not in production yet, I sometimes like to reorder my database migrations. I wrote a small Ruby script to automate things.
On new Rails apps, that are not in production yet, I sometimes like to reorder my database migrations. I wrote a small Ruby script to automate things.
I wanted to learn to create a dynamically-named method inside a dynamically-named class in Raku. This is what I ended up with: #!/usr/bin/env raku my $class-name = "MyDynamicClass"; my $method-name =...
I wrote Blackjack in Elisp . It allows you to play Blackjack in your Emacs editor.
Wow, if Django and Rails had a baby it would be Marten, the web framework written in Crystal , https://martenframework.com/ . It seems fairly feature-complete, even with only a 0.1.x version number!...
About two days ago I built the “bookshelf” app described in the Hanami guide. Hanami is currently missing any sort of “model” layer, as well as any sort of “view” layer, as you might expect to be...
I wrote a simple MP3 player: https://github.com/gdonald/player
Debug a Linux Kernel in QEMU
Install packages: apt install zsh curl git fzf build-essential libssl-dev zlib1g-dev Switch default shell to zsh: chsh -s `which zsh`
#!/bin/sh DB_NAME=mydatabase DATE=`date +%Y%m%d%H%M%S` DIR=/backups/pgsql PG_DUMP=/usr/bin/pg_dump $PG_DUMP $DB_NAME | bzip2 > $DIR/$DB_NAME_$DATE.sql.bz2 find $DIR -mtime +7 -exec rm {} \;
I built an IPv4 subnet calculator: https://gdonald.github.io/ipv4-sn/