Entries Tagged as 'geek'

Thursday, November 12th, 2009

GEEK: talmudic notes in vim?

When reading new code, especially code in a language I’m unfamiliar with, I sometimes have to translate each symbol/method very methodically in order to understand what the code is trying to do. Often, I’ll put my notes in the code as comments. While this helps me, this can make the code more bulky and difficult [...]

Friday, June 5th, 2009

GEEK: Serial key recovery on Mac OS X?

Anyone know how to recover the serial numbers for software installed on a Mac? I have some software installed on one Mac, which I would like to install on another Mac. However, I’ve since lost the documentation and serial number. There are several programs that recover serial numbers from installed software on Windows, but none [...]

Tuesday, June 2nd, 2009

GEEK: tips collection

This post is for small snippets of code that don’t warrant a post of their own. Use imagemagick’s convert command to reduce an image to 640×427 convert -geometry 640×427 -quality 75 _MG_9954.thumb.jpg _MG_9954.reduced.thumb.jpg — Copy a file located on a remote machine (target) to the local directory (.) via an ssh tunnel through a firewall [...]

Monday, February 9th, 2009

GEEK: prune directories, files from find output

Sometimes you want to exclude a directory and/or files from a search. This alias: cfind=’find . \( -type d -name .svn -prune -o -path ./stock-data/tests/data -prune \) -o \( -type f \! -name “*.csv” -print0 \) | xargs -0 grep’ …means: “Recursively loop through all of the files and directories in the current directory and [...]

Sunday, July 27th, 2008

GEEK: what the directories on my camera’s memory card mean

Really boring stuff below, of likely interest only to me.

Tuesday, July 22nd, 2008

GEEK: how to add a user to the admin group on Mac OS X

Here’s how to add a user to the admin group using dscl: dscl . append /Groups/admin GroupMembership crasch Remove a user: dscl . delete /Groups/admin GroupMembership crasch Reading the membership of the admin group: dscl . read /Groups/admin GroupMembership

Wednesday, July 16th, 2008

GEEK: Running a ruby script via crontab

So, I’m trying to set up a ruby script that screenscrapes another website, writes the results to a local file, then rsyncs the file to another machine behind a firewall. This post details the problems I ran into while trying to get cron to run the ruby script and rsync to the remote host.

Wednesday, June 4th, 2008

GEEK: nofollow tag

What if you want to link to a website for the purposes of discussion, but you don’t want to thereby boost the Google rank of the site? Add the no follow tag to the link. Google, MSN, and Yahoo have all announced that they will respect the tag, and won’t allow the link to boost [...]

Wednesday, March 12th, 2008

GEEK: nationwide craiglist search

Suppose you want to find a listing of all Craigslist ads featuring a 2005 Chevy Astro Vans with AWD between $5000 and $15000 dollars. You could do this search. Craizedlist.org might also be of interest to you.

Wednesday, December 12th, 2007

GEEK: shell script question

Suppose you want pass in a complex query to a command line sql interpreter from within a shell script. You can do so with a command like this: sql92