So you have your favourite tabbing convention, but you've ended up with some files in some other convention, for example tabs instead of 4 spaces. If you use Vim and already have it set up to your liking, the :retab command will replace indents in the current buffer with ...
Read more...Articles by Alan Briolat
C is not MATLAB
Refactoring some code at work today, I came across a classic example of somebody attempting to use one language like another. The project in question is a port from MATLAB to C, and the purpose of the function is to see if a square matrix is symmetrical within a certain ...
Read more...C linked list macro
Here's a simple macro I came up with a few weeks ago for easily defining linked list types in C:
#define LINKED_LIST(type, name) \ struct name ## _ { \ struct name ## _ * next; \ type data; \ }; \ typedef struct name ## _ name;
Usage is simple:
LINKED_LIST(int, int_ll);
gives the same type as ...
Read more...EdgeRouter + Dynamic DNS + Cloudflare
Note
This no longer works. The version of ddclient in EdgeOS uses the CloudFlare v1 API, which was deprecated November 2016 and finally retired June 2018. I now use cloudflare-ddns running on a server inside my network.
My home network sits on a fast internet connection behind an Ubiquiti Networks ...
Read more...Enable Bitmap Fonts on Ubuntu Jaunty
I like to use tiny bitmap fonts like MonteCarlo for programming, but by default Ubuntu has bitmap font support turned off. From (at least) Gutsy through to Intrepid, this method worked for enabling bitmap font support, but after installing the Jaunty beta I found this no longer works.
Luckily, after ...
Read more...Fixing ugly Qt fonts in GNOME
So far every time I've used Qt applications under GNOME, especially VirtualBox, I've found the Qt font rendering to be appalling. See this screenshot of VirtualBox alongside the GNOME appearance dialog:
As you can see, most of my font settings are at the default "Sans" font. The "Sans ...
Read more...Mouse Button Remapping with HAL
I've had a Logitech MX1000 mouse for a few years now, and the two most important features for me have been the ergonomic build and the few extra buttons. Something I've always found with many-buttoned mice is that the side button closest to the thumb is a much ...
Read more...Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)
Browsing the visitor stats today, I found this little gem:
"Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)"? Who uses such a browser? My bet is on it being a zombie machine that somebody has completely forgotten about, which would explain the several other hits I have from versions ...
Read more...MPD + PulseAudio + Ubuntu Intrepid (8.10)
Update (2009/04/12)
It appears that as of Ubuntu Jaunty everything now obeys the system-wide setting properly, so you only need to edit /etc/default/pulseaudio and add the user to pulse-access.
I'm a big fan of MPD, and up until the last few months I used it ...
Read more...My painless Linux "upgrade" process
I like to keep up to date with the latest version of any Linux distro I use (naturally), but for some reason I don't trust the upgrade process to work properly and/or not leave a load of cruft behind. I've actually attempted an upgrade once just to ...
Read more...
Page 1 / 3 »