Wordpress - andy.wordpress.com - Andy Skelton
General Information:
Latest News:
How to tail a log with live server clock 19 Feb 2013 | 04:12 am
At work I have to watch my server’s error log. Good old tail -F /path/to/log runs over SSH all day, every day. Each entry is timestamped. Sometimes those timestamps give me trouble. The age of a times...
Automatically open remote files in local emacs 3 Jan 2013 | 11:04 pm
I prefer to edit text locally in emacs. Most of the files I edit reside on remote servers so I use TRAMP to open remote files locally. What kills me is using emacs remotely via terminal when a shell c...
Python: ISO-8601 year/week from year/month/day 6 Dec 2012 | 03:45 am
I needed to convert dates to ISO-8601 calendar week and year in a bash script. This is what I came up with: It takes input from the command line as YYYY/MM/DD and outputs YYYY/WW. Copyright Automattic...
1 of 16 30 Nov 2012 | 08:22 am
1 of 16
A sandwich. A good one. 23 Oct 2012 | 09:53 pm
While in Burlington, Vermont, I worked at the excellent Office Squared downtown coworking space. Some days I had to go out for lunch. That one burrito place on Church Street was unworthy of mention. M...
How to end fear of the dark 7 Sep 2012 | 01:27 am
My 2-year-old daughter suddenly became afraid of the dark. “I’m scared of the dark!” became her screaming mantra at bedtime and her objection to entering any room without an electric light on–even whe...
svn merge -c 15 Jun 2012 | 04:47 am
How many times have you frantically googled “svn merge revert” to remember how to undo a recent commit? If you answered “too many” then you were probably confused by the syntax of svn merge -rARG1:ARG...
Programming is not Algebra 31 May 2012 | 02:40 am
A friend discovered a small interest in learning to program computers. She tried an online course but she didn’t get far before losing interest. She may have had other reasons for giving it up but by ...
Atomically update serialized PHP arrays in MySQL 15 Feb 2012 | 10:45 am
Okay, okay, it’s hard to find a use case for this when it’s so obvious that the correct way to handle one-to-many is with JOIN. But if you’re already committed to your schema and you decide you need t...
Erlang is a hoarder 14 Feb 2012 | 07:24 am
One day you set aside a shoebox to store newspaper clippings. Suddenly you are trapped under an avalanche of whole newspapers and wondering how long your body will lie there before anyone misses you. ...