Archive for the ‘geek’ Category

multi-multi-multi function office machines

Thursday, August 28th, 2008

Currently in a waiting room and CNN is on. There was just a commercial for a Sharp deep freezer sized copier/scanner/printer/sink. The business person googled for a restaurant to take a client to on the built in touch screen then presses a button to print a full-color map to the restaurant. What business person would go to the copy building (a room is not big enough) to google a restaurant?

Sorry check back later for pics, Steve Jobs says I don’t need copy & paste as I’m sending this from the wordpress app on my iPhone.

Update:

One note of clearification, as crazy as the feature set on these machines is, I still wouldn’t mind having one to use whenever I wanted, imagine what you could do with it! The commercial I saw is available in flash form at
http://www.sharpusa.com/files/workwithoutlimits.swf.

Weather in Screen Statusbar

Thursday, June 5th, 2008


Caspar Clemens Mierau recently wrote about a nifty Debian package named weather-util and his method for embedding the current temperature into the screen status bar. Quite nifty. I did the same with one small exception, including the predicted probability of precipitation if it exists.

My one liner that runs from cron (split to multiple lines for readability):

 weather -iKACY -f | head -n 9  | \
     awk '/Temperature/ { print $2 "F" }
          /Relative/ { print $3 }
          /precipitation/ { sub (/ chance of.+$/, ""); print "POP " $NF }' | \
     xargs echo > /home/michael/.weather

More details on the full implementation in the original post over at Caspar Clemens Mierau’s blog. And yes, I stole his loadavg stuff too ;)

UPDATE:

Silly me, upon further investigation, two things to note. First, the -i option applies only to current conditions and not to the forecast. In my case I actually want weather -f ACY and /etc/weatherrc takes care of the rest. Secondly, the field number for the precipitation percentage changes, oops. I’ve correctly accounted for this in the updated awk script above.

After making these changes I decided the awk script was getting a bit long for a single line so I went all out creating ~/bin/weather.awk:

#!/usr/bin/awk -f

/Temperature/       { temp = $2 }
/Relative Humidity/ { rh = $3   }
/precipitation/     { sub (/ chance of.+$/, "");
                      precip = $NF;
                      exit
                   }

END{ print temp "F " rh " POP " precip }

My crontab entry now looks like:

*/5 * * * *     weather -f ACY | /home/michael/bin/weather.awk > /home/michael/.weather

Much simpler.

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?!?

Dear Lazzy Web, fingerprint scanning?

Tuesday, April 1st, 2008

Anybody know of some open source fingerprint scanning software for OS X? Bonus points if it has magic integration with stuffs like the keychain, auto log-in, screen saver disable, etc.

Failing available open source software, what about commercial software? I’m aware of software from upek that supports their Eikom as well as ancient software from Sony for their Puppy scanner. I’m looking for something that would support multiple scanners, ideally the U.are.U stuff. Though if anybody wanted to trade a pair of USB U.are.U scanners for an Eikom one, that would be great too ;)

Don’t Click Here

Thursday, March 20th, 2008

Click this link!

[18:54:56] < bhale> mikegrb: they should arrest the googlebot

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;
}

TextMate Rocks

Wednesday, November 21st, 2007

TextMate is the best text editor ever.

That is all.

nerd god I am

Friday, October 26th, 2007


NerdTests.com says I'm an Uber-Dorky Nerd God.  What are you?  Click here!

Dynex Support Sucks

Thursday, January 11th, 2007

Dynex is the Best Buy brand. We were recently there and I noticed a $20 webcam that said it supported OS X 10.1 and greater on the box so I decided to purchase it. I installed the included drivers and software and started up their software. I just get a black screen with “No video input.” The LED on the webcam does turn on and off appropriately. I took it back and exchanged it thinking the unit was deffective. The new one had the same problem.
Unfortunately their included drivers are as ancient as the version of OS X referenced on the box. There are a few commercial and open source driver sets available for web cam support on OS X but unfortunately this camera isn’t supported by any of them. They said they had 24×7x365 support on their website so I figured, what the heck, maybe they have some nice shiny new drivers they forgot to link to on the website.

This is the call:

“So what seems to be the problem?”
“Well I have a Mac and the box said the Mac is supported so I installed the drivers and software that came with it and the software that came with it says there is no video from the cam”
“Oh, well since you said you have a Mac you will need to contact the manufacturer of the computer
to see if…”

“There is nothing wrong with the computer.”
“Right but maybe there is some sort of driver that you need for the Mac to make it work.”
“Exactly, and that driver comes from the manufacturer of the device, that would be Dynex, whom you
represent.”

Click.

Just to be clear, that click there at the end is them hanging up on me. I guess they couldn’t argue with that.