Archive for the ‘neat’ Category

Most Awesome Command Ever - timeout

Tuesday, May 27th, 2008

I have a Debian Sid box that I’d been putting off updating for a while so finally got around to doing it tonight. I took the opportunity to do a bit of spring cleaning and purge old packages I installed to play with and forgot to purge or removed instead of purging. While doing this I discovered an interestingly named package, timeout.

timeout is a dead simple command, everything you need to know about it you can get from the usage information:

[michael@orion(~)] timeout
usage: timeout [-signal] time command…

And an example:

[michael@orion(~)] timeout 5 cat
Timeout: aborting command “cat” with signal 9
Killed
[michael@orion(~)]

How did I not know about this before?!?

Adding a Datastore to an RRD File

Sunday, December 30th, 2007

Mainly for personal future reference.

Adding a DS to a bunch of RRD files is a big pain, RRD doesn’t have any sort of native mechanism for doing this. The usual procedure is exporting the RRD data to XML, creating a new rrd file with the old datastores plus your new ones, then importing the data back in from the XML.

A while back I needed to do this for a load of RRDs so I wrote a quick and dirty bash script for it. Today I had reason to add a DS again but couldn’t find my script. A bit of googling was no help either, surely other people have this problem too? I discovered Nicola Worthington’s RRD::Simple contains add_source method so a few moments in TextMate later we have:

#!/usr/bin/perl

use strict;
use warnings;

use RRD::Simple();

my $rrd_path = /path/to/dir/of/rrds/;
my @rrd_files = <$rrd_path/*.rrd>;

my $rrd = RRD::Simple->new();

for my $file (@rrd_files) {
    print Processing $file…;
    $rrd->add_source($file, DS_name => DERIVE);
    print  ok.\n;
}

Our UPS Guy is a Douglas Adams Fan

Friday, May 25th, 2007

I was standing outside smoking as the UPS guy rolled up for his thrice weekly visit (wife’s home business), unfortunately I didn’t see the topic of this post until we had finished a short chat and he went to the end of the street to turn around. On the handle next to the driver’s side door he had is trusty towel hanging so that it would be within easy reach wherever he went today.

Transformer Houses

Tuesday, June 13th, 2006

Collyer1.jpg

Image from Cabinet Magazine

Appearantly the electric company in the Toronto area has built numerous substations that look from the outside like an average house in the neighborhood.  I imagine this adds substantial cost but I’ll bet people don’t complain too much about having one go in across the street when compared with typical substations.

See the BLDGBLOG for more photos and discussion.

Garage Bowling Alley

Monday, June 12th, 2006

pinsetter.jpg

We must all bow down to Tim Wallace of the Minneapolis area. He purchased a Brunswick pin setter on eBay. After having it delivered to his work, he spent a month disassembling it into pieces small enough to take home. He then reassembled it in his garage and built a 10 foot lane.

Tim’s Site - Be sure to check out the Pictures and Videos.

Via Make

Meat Gun

Friday, June 9th, 2006


Jerky Gun

Originally uploaded by mikegrb.
It’s a caulking gun for beef! Ground beef goes in, yummy jerky comes out. I may be missing a few steps but that is the general gist of it.

Free

Monday, June 5th, 2006




Free

Originally uploaded by mikegrb.

Free, as in water.

I am such a nerd

Wednesday, May 25th, 2005

I am nerdier than 99% of all people. Are you nerdier? Click here to find out!

I am a Computer God

Tuesday, May 17th, 2005


My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!

Hooray! for perfect scores!

mmm juice

Monday, May 2nd, 2005

Hey, anybody up for a wirelessly-controlled programmable bartender, er, juice-maker? Yeah, we’ll take it! This thing takes recipes via keyboard or wireless remote and dispenses the right mixture into the cup below. And believe it or not, kids be getting academic credit for this piece — surely a proud moment for Cornell Engineering.

http://www.people.cornell.edu/pages/vhl4/