Stand back everyone! I know regex!
I just created a function in MySQL that attempts to validate an email address with the use of regular expressions. Continue reading Validating email addresses in MySQL with regular expressions
Stand back everyone! I know regex!
I just created a function in MySQL that attempts to validate an email address with the use of regular expressions. Continue reading Validating email addresses in MySQL with regular expressions
I now have a 800VA APC UPS in my data center (erhm). As always, the cable management could be better but at least it is all on a board.
This day is the ninth day in the ninth month of year nine this millennia. I took this screenshot on the ninth second on the ninth minute in the ninth hour. Numerologists rejoice!

I’ve been setting up a new server for my parents and boy is it fast. And by fast I mean fast bootup. This untweaked server does it from power up to login prompt in just over 16 seconds. So I’ve stripped a few services I didn’t need but the important ones are there; acpid, crond, rsyslog, sshd and something called udev-post
When using an external monitor to my laptop I have set my X to enable TwinView and have the larger external display be primary display left of the laptop display. But when I am away from home and does not have external monitor connected the nv driver does not detect that and still set up TwinView as before leaving much of the desktop out of display. To remedy this I have made two xorg.conf, one for single display and one for dual.
I have copied these manually before when I’m switching. Now I have something slightly better. I start X, run xrandr, capture its output and copy one of the configs depending on what’s in the output. This is how I do it
rm -f /tmp/xrandr /tmp/nullconf
/usr/bin/xinit /usr/bin/xrandr -q -- /usr/bin/X -config /tmp/nullconf -quiet >/tmp/xrandr 2>/dev/null
if grep -q '^DVI.* connected' /tmp/xrandr ; then
cp -f /etc/X11/xorg.conf.dual /etc/X11/xorg.conf
else
cp -f /etc/X11/xorg.conf.single /etc/X11/xorg.conf
fi
rm -f /tmp/nullconf
My external monitor is detected as a DVI and the internal as LVDS
If I could offer you only one piece of advice; Wear sunscreen.
Got a bit sunburned today while trying to catch the last sun rays (death rays?) before my vacation is over.
Last year I got virtually no tan at all because of the weather and suffered from sleepyness the rest of the autumn and winter.
My HP laptop with 160GB harddrive was getting full and I wanted to upgrade it to a bigger one. Found that 2.5″ 500GB was relatively cheap so I bought one and detailed the procedure of upgrading with all data intact. I bought a 2.5″ USB-SATA chassis as well for the old drive to sit in. As I hit a few snags when doing this I thought it could be useful for others to read about.