Compiling Gargoyle On Ubuntu 18.10 On An Old Netbook

I decided to play the classic interactive fiction game Zork, which is available as a Hugo re-write. Unfortunately, the gargoyle-free package for Ubuntu doesn’t have the (non-free) Hugo interpreter. Straight-up Gargoyle from github does, but it was a bit of a pain to compile. PreReqs Compiling It’ll probably look like... [Read More]

Useful Kindle Stats

I use a script to export highlights and notes from my kindle’s My Clippings.txt file to an sqlite3 database. Kindle to Sqlite3 Having these clippings in a database allows me to get some interesting and potentially useful statistics. Highlight (Information) Density I created this measurement to show how densely packed... [Read More]

Kindle to Sqlite3

I use a little python script to grab clippings out of my (early model) kindle’s My Clippings.txt file and import them into an sqlite3 database. The clips and notes are in a consistant format, so it’s possible to parse the file with some regular expressions, and a little logic. I... [Read More]

Missing Intro Screen For Gargoyle Interactive Fiction

Gargoyle, the interactive fiction interpreter, doesn’t support showing the little introduction screen that glulxe does; the screen with cover art and a description of the game. So I wrote my own quick-and-dirty shell script to do just that. You can use it as sort of a wrapper to start gargoyle.... [Read More]

Set Your Background To Flat Black At Sunset

Use sunwait in your crontab to wait until sunset and then run hsetroot to change your desktop. Crontab example: 0 16 * * * sunwait wait set; hsetroot -solid "#000000" Configure and Make Sunwait git clone https://github.com/risacher/sunwait Now edit sunwait.h and replace the default latitude and longitude with whatever your... [Read More]

Quickly View I3Wm Hotkeys

Use the code below to quickly view all the active hotkeys in your i3wm config file: i3keys #!/bin/bash grep "^[ ]*bindsym" ~/.i3/config | sed -e 's/^[ ]*bindsym //' -e 's/^[ ]*$mod/win/' | less Background i3wm has a lot of functions that come assigned to hotkeys by default. I’m constantly forgetting... [Read More]

Two Short Python Scripts For Tomboy Notes

OK, here are two more scripts I wrote to do useful things with python and Tomboy notes. tbclip This first one copies whatever text is currently selected and creates a Tomboy note with it. NB: You must have xclip installed. #!/usr/bin/python import sys, dbus, subprocess #Get the D-Bus session bus... [Read More]

Display Your Most Recent Tomboy Note

This is a handy little script I came up with. It displays the most recently modified Tomboy note. This is helpful if, like me, you make pull up a new Tomboy note for something quick and then accidentally close it by hitting escape or something. Creating a hot-key for this... [Read More]

Delete Old Uncategorized Tomboy Notes From Cron

I read an article about using python and dbus to automate some stuff with Tomboy Notes and was inspired to do some coding of my own. In a Nutshell Use the code below (and a cron job) to automatically delete Tomboy notes that were last modified more than 30 days... [Read More]

Apache Webserver No Longer Runs Php After Upgrade To Ubuntu 18

The fix See code below The story Upgraded to Ubuntu 18 and the webserver broke. Something always breaks when you upgrade. This time, it was my webserver… just like last time All the packages were installed, but turns out, the Apache php7.2 module needed to be enabled. sudo a2enmod php7.2... [Read More]

Apache Webserver No Longer Runs Php After Upgrade To Ubuntu 17.10

The fix See code below The story I recently upgraded to 17.10 after I started to get 404 errors when trying to install packages. Yeah, I should upgrade more often, but something always breaks when you upgrade. This time, it was my webserver. All the packages were installed, but turns... [Read More]

Spell Check In Vim

Tip: you can use spell checking in vim! set spell spelllang=en_us Actually, leaving off the spelllang will probably work for you too. Your system is probably set to use a default language. I’ve been using vim for years and didn’t know about this… so much to learn about vi/vim. When... [Read More]