Category Archives: Uncategorized

Chrome memory abuse, and “swap space” rant

I like the Chrome browser, but the memory usage is fscking ridiculous. I have a slightly older computer at work, if I open 4 or more tabs in Chrome the computer will grind to a halt, and I gotta wait … Continue reading

Posted in Uncategorized | 1 Comment

How to Divide by Zero: a/0 = b ⟺ a = 0

TLDR: Division by zero is not as scary as it’s made out to be: a/0 = b ⟺ a = 0 Division is multiplication, backwards. These two equations are exactly equivalent, by definition: a/c = b a = b×c It’s easy to … Continue reading

Posted in Uncategorized | Leave a comment

error handling in C

I started writing a set of error handler macros for C, based on “Zed’s Awesome Debug Macros” The implementation is quite ugly, and depends on a couple of GNU extensions.  This is not ideal, and I would like to improve it … Continue reading

Posted in Uncategorized | 3 Comments

ramp-io

I wrote a simple program ramp-io, based on the redshift code, to read and write the xrandr gamma ramps for Linux / X11.  This enables me to define my own gamma ramps, and switch ramps quickly from the command line.  My preferred … Continue reading

Posted in Uncategorized | Leave a comment

printf “%q ” in bash, to escape arguments

I learned a useful trick with the bash shell today. We can use printf “%q ” to escape arguments to pass to the shell. This can be useful in combination with ssh, in case you want to pass arguments containing … Continue reading

Posted in Uncategorized | Leave a comment

job control in the shell

Job control is a basic feature of popular UNIX and Linux shells, such as “bash”. It can be very useful, so I thought I’d make a little tutorial on it… ^C  press Ctrl-C to interrupt a running job (you know this one!) ^\ … Continue reading

Posted in Uncategorized | Leave a comment

Fight Back against universal surveillance (aka Big Brother)

Today, FEBRUARY 11TH 2014, is “the day we fight back” against universal surveillance by our governments, and specifically the NSA (aka Big Brother).  Please add your voice to this protest, and add their black banner to your site/s. https://thedaywefightback.org/ P.S. It … Continue reading

Posted in Uncategorized | 2 Comments