I Am Lazy: Python, to convert a file's age in seconds since epoch to a readable format

For my own lazyness, so I don’t need to hunt for this damn chain of syntax. >» time.strftime("%Y%m%d-%H%M.%S", time.gmtime(os.path.getctime("$path_to_file"))) ‘20101213-1948.58’ >»> time.strftime("%Y%m%d-%H%M.%S", time.gmtime(os.path.getctime("$path_to_file"))) ‘20101213-1948.58’

December 17, 2010 · 1 min · map[email:jforman@gmail.com name:Jeffrey Forman]

Howto: Git, hooks, Nagios, oh my.

At work we have a monitoring configuration workflow where our Nagios config files are parsed and generated before they are allowed to be ‘svn commit’ed. I know this verification has saved me many times when trying to add new hosts or services, since everything might not be ready for prime time. I wanted to see if I could recreate this scenario at home using Git hooks, if only for my own interest and curiosity. ...

November 17, 2010 · 5 min · map[email:jforman@gmail.com name:Jeffrey Forman]

Network printing at home, over-engineered.

Compared to most other home networks, mine is a bit more complicated. I admit networking has always been an interest of mine, so I run my own OpenBSD firewall/router/vpn-endpoint, which itself runs the ISC Dhcpd v3 and BIND. With these together, I am able to run dynamic DNS. But some background first. Insert my 11-year old HP2100m printer that I have outfitted with an HP Jetdirect 610N 10/100 internal print server. This allows me to stick this printer on my network and print away, no intermediary required. What does this save? The printer is not tied to one computer’s parallel/USB port. I can shut off my main desktop, and still print over the network. ...

September 26, 2010 · 3 min · map[email:jforman@gmail.com name:Jeffrey Forman]