In my experience, the C programming language is still hard to beat, even 50 years after it was first developed (and I feel the same way about UNIX). When it comes to general-purpose utility, low-level systems programming, performance, and portability … Continue reading →
Sometimes I play browser games including diep.io. This loads the CPU and GPU, and in this summer weather my laptop gets too hot and heats up the room. I tried using Chrome with the GPU disabled, but the browser games would still … Continue reading →
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 →
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 →
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 →
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 →
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 →
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 →
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 →
“Thank-you” svn for such a hideous, bogus and difficult way to ignore files. So I wrote a script svn-ignore-all: #!/bin/sh # svn-ignore-all # usage: # 1. run svn status to see what is going on at each step # 2. add or … Continue reading →