We built this tool to help people quickly download an archive of their Instagram photos.
My Twitter social graph visualized by Recollect
Ever since I moved to Santiago, Chile in July, I’ve asked myself “What time is it in San Francisco?” multiple times a day. Sometimes it’s for something practical (knowing whether or not I should be on a conference call) and sometimes it’s for something stupid (figuring out whether or not it would be a good time to tweet because the majority of my followers won’t even see it). Either way, I need to know.
I tried to find an application that runs in the OS X Menubar and displays the time for a different time zone and I did find a few programs that sort of did that:
Unfortunately, they didn’t do just that. I couldn’t figure out how to prevent World Clock Deluxe from opening up a floating clock in addition to the menubar and iStat Menus wanted me to click the clock every time I wanted to see the alternate time.
Today I decided to just write it myself. Armed with a vague recollection of iOS development experience and the power of Google, I took the shell of a menubar demo and extracted some code from Menubar Countdown and tweaked it until it worked. Then I slapped an icon from Glypish onto it and called it a day.
Hipster looks like this in your menubar:

You can download it here.
Unzip the file and drag Hipster into your Applications folder. Run it.
If you want it to run on startup, go to:
System Preferences -> Users and Groups -> Login Items
and hit the [+] and select Hipster from your Applications.
You may notice that there is no Preferences option. In fact, the only option is Quit Hipster. I realize the ridiculousness in a menubar application that only displays the time for San Francisco and my only defense is that this is my first Cocoa Mac Application and I have no idea how to create a Preferences pane.
Source code is available on github - if you are able to create a basic Preferences pane that lets you specify a time zone, I will happily accept a pull request.
You can change the time zone by opening up StatusBarAppAppDelegate.m and looking at line 41. Change America/Los_Angeles to whatever you need it to be and hit Build in Xcode.
The other night I logged into our dev server to check something and got tired of seeing our standard banner, so I wrote a small bash script called sushi-motd.
sushi-motd displays a random piece of sushi ASCII-art whenever you SSH into your server.

You can download it here.
I had to set-up a new MacBook Pro last week, a replacement for my laptop that was stolen a few weeks ago. If you count the interim laptop that I was using while waiting for my electronics mule to get back to Chile, that will make four Macs this year that I’ve had to get into a state where I can use them. I’ve decided to document this process, mostly as a personal reference but hopefully beneficial to you as well.
iTerm2 – I spend a lot of time at the command line. iTerm2 makes that time more pleasant and productive. Two features I particularly like are split panes and full screen mode.
Scroll Reverser – I hate change and so should you. I’ve mostly gotten used to the trackpad scrolling in Lion but I can’t handle the mouse wheel going the opposite direction.
Right Zoom – This makes the green button in the top left of every window actually do something.
Caffeine – Sometimes you don’t want your Mac to go to sleep
Google Chrome – For better or worse, my browser of choice. I’ve given up on the dev builds, however, that way lies faster Javascript engines but madness.
Firefox – Because, well, Firebug. When I put on my frontend hat, I usually switch to Firefox. When the Net tab in Firebug doesn’t do what I need it to do, I use Charles.
Dropbox – Your files in the CLOUD.
1Password – I don’t know how I managed my passwords before this. ⌘-\ is extremely satisfying.
Textmate – Theoretically we’re going to get v2.0 this year, I’m not holding my breath.
Git – Obvious VCS is obvious.
Github for Mac – Streamlines the checkin process of selecting files for checkin, viewing diffs, and writing commit messages
Macports – Homebrew doesn’t set my CPU on fire but sometimes your legs need to be heated up. Install XCode first.
EC2 Tools – All those instances aren’t going to manage themselves. Unzip and copy bin and lib directories to ~/.ec2/. Symlink in the master key from the Dropbox folder.
Evernote – Notes in the CLOUD, syncs to my iPhone. Good for doing research.
Skitch – Take screen captures, annotate and show them to people.
Taskpaper – Simple TODO lists
Mou – Markdown editor for wikis and blog. I wrote this entire post in Mou.
Microsoft Word and Excel 2011 – At the end of the day, I need to edit doc and xls files with their native apps.
Adobe Photoshop and Illustrator CS5 – There’s no substitute for the real thing.
Omnigraffle – Lightweight wireframing. I like these stencils.
Parallels Desktop – Run a Ubuntu VM for testing package installation (although lately I’ve just been creating AMI’s of existing EC2 instances and spinning up clones), run a Windows VM for testing IE and playing old games
Twitter – Tweetie is still the sexiest Twitter client around.
Adium – Necessary evil. By default only connects to company Jabber account and then I manually connect the other services when I want the possibility of being distracted. Disable all sounds and disable Growl. Nothing you need to know has ever appeared in a Growl notification.
Calibre – For managing my Kindle. Install DRM removal plugin to make backups of the books I’ve purchased and put them in Dropbox.
VLC – For all the non-standard video files that do not exist from USENET, which does not exist.
sabnzbd – USENET client with Newzbin integration
Transmission – Torrent client with a clean UI
KisMAC – Sometimes you need an open wireless network and by open I mean WEP. Combine with aircrack-ng in Macports.
Adobe Photoshop Lightroom 3 – For post-processing photos off my SLR and putting them on Flickr. Geocoding plugin for importing GPX traces and geotagging.
kolor autopano giga – Stitch series of images together for panoramas.
Exposure 3 – Instagram for your SLR, makes SLR shots look like various film cameras
exiftool – CLI tool for reading and writing EXIF from images, useful for copying camera information to merged 3D camera shots
Most of this is to ensure that ⌥⌘→ and ⌥⌘← are the universal keyboard shortcuts for Next Tab and Previous Tab.
Disable Move left a space
Disable Move right a space
iTerm2 - Select Next Tab - ⌥⌘→
iTerm2 - Select Previous Tab - ⌥⌘←
Google Chrome - Bookmark This Page… - ˆ⌥⇧⌘D
The reason Google Chrome’s Bookmark This Page keyboard is so weird is so that we don’t conflict with the Pinboard extension’s keyboard shortcut.
Secondary click – Click in bottom right corner
Usually I just symlink this to a file in my Dropbox folder, but for reference:
Colored LS output in iTerm2:
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
Environment variables for EC2:
# Setup Amazon EC2 Command-Line Tools
export EC2_HOME=~/.ec2
export PATH=$PATH:$EC2_HOME/bin:/opt/local/bin:/opt/local/sbin
export EC2_PRIVATE_KEY=`ls $EC2_HOME/pk-*.pem`
export EC2_CERT=`ls $EC2_HOME/cert-*.pem`
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/
Connection sharing will ultimately make your uploads to dev server faster as long as you keep an SSH window open to it
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
Host aliases are your friend. For example, alias dev.yourcompany.com to dev and then bash alias the command dev to ssh dev.
I use the Pastel (Dark Background) color scheme.
Scrollback buffer – check Unlimited scrollback.
Allow word movement in iTerm2, add ~/.inputrc
"\e[1;5D": backward-word
"\e[1;5C": forward-word
Dropbox will take a while to sync, log-in to their website and download a zip file of 1Password.agilekeychain and unzip it in the Dropbox folder so we can at least login to websites while it’s syncing.
Generate SSH keys:
mkdir .ssh
cd .ssh
ssh-keygen -t rsa -C "bertrand@fan.net"
cat id_rsa.pub | pbcopy
Github SSH public keys – Add another public key – ⌘V.
git config --global user.name "Bertrand Fan"
git config --global user.email "bertrand@fan.net"
Pastels on Dark is the only way to go. Ackmate for faster global searches. If you don’t have an upload to dev server script, this one is a quick substitute.
After installation:
sudo port -v selfupdate
Packages I usually install:
Pinboard – The only real functionality I want out of a pinboard extension is to be able to hit ⌘D and have it open a bookmark dialog. In the options, check Enable Keyboard Shortcuts, set Bookmark Page to meta-d and Browse Bookmarks and Read Later to shortcuts you’ll never hit, e.g. alt + ctrl + meta + shift + b. This is to compensate a conflict with the 1Password extension.
1Password – Install from 1Password itself by selecting Install Browser Extensions
Screen Capture – Useful for taking whole page screenshots of webpages.
Window Resizer – Use in conjunction with Screen Capture for taking demo snapshots of webpages
SABConnect++ – Newzbin integration with sabnzbd
InstaChrome – Instapaper integration
And that’s pretty much my working environment. There’s a lot of room for improvement and I’m open to suggestions.
[video]
This is pretty much what I stare at all day long. It’s hard getting the photos exactly straight and we’re running out of scotch tape.
(Source: backofawebpage)
Almost certainly the best lighthouse log entry on Flickr.
This is a side-project that I’ve been working on for a while.
Like most people, I have a large collection of digital music, which is awesome, but sometimes I miss the process of physically choosing an album. Also, when you have friends over, it’s a little weird to hand them a laptop and say “Pick an album!”. When you have thousands of artists to choose from, the paradox of choice kicks in and it’s a bit like asking them to pick a 401k plan.
This is an early prototype of it working in action:
The small vinyl records are Christmas ornaments that I embedded RFID tags into and then pasted their album art that I downloaded from discogs and had printed on quality photo paper at a print shop. The record player is simply a photo of a record player I found on Flickr with an RFID reader underneath.
I start with a Christmas ornament of a vinyl record.

Then I peel off it’s label and clip the string and plastic loop.

This is a disc RFID tag.

I stick the disc RFID onto the album.

Then I place the album art on top of the RFID.

The components are a RedBee RFID reader with XBee wireless modules, a wireless router running DD-WRT, and a Popcorn Hour A-100.
The RedBee RFID reader reads the RFID tag and wirelessly transmits it to the XBee module attached via USB to my wireless router, which then replays the RFID tag to my Popcorn Hour, which finally selects the corresponding album and plays it.
The XBee wireless module is attached to the router via USB. I’ve flashed the router with DD-WRT, which includes an implementation of the FTDI Virtual COM Port drivers.
Thus, we just need to read from the virtual COM Port and send the RFID tag to the Popcorn Hour via netcat:
cat /dev/usb/tts/0 | nc 192.168.1.135 3333
Starting from a stock Popcorn Hour, I modified it to allow telnet access and then used the NMT Community Software Installer to install mpd.1
I found mpd when researching mp3 player daemons that could be accessed via the command line. It’s an amazing project that’s worth checking out if you’re interested in running a music server. They have free clients available for almost every platform, including iPhone and Mac OS X.
The Popcorn Hour reads data from the router via netcat and then passes the RFID tag to our play.php script.2
nc -l -p 3333 | while read x ; do /mnt/syb8634/server/php /opt/sybhttpd/localhost.drives/HARD_DISK/RFID/play.php "$x" ; done
And play.php simply does an array lookup against the RFID -> Artist/Album hash and launches mpc, the command-line client for mpd. It also checks if the RFID tag it just read is the same as the one currently playing.
<?php
$albums = array(
'128 208 4 44 154' => array('A Tribe Called Quest', 'The Anthology'),
'128 208 248 94 105' => array('Broken Bells', 'Broken Bells'),
// etc...
);
$line = $argv[1];
$line = preg_replace("/>?T:NACK /", "", $line);
$line = trim($line);
// Sometimes the RFID reader likes to send junk data
if (!preg_match('/[0-9 ]*/is', $line)) {
exit();
}
$currently_playing = '';
if (file_exists('/tmp/currently_playing.txt')) {
$fp = fopen('/tmp/currently_playing.txt', 'r');
$currently_playing = fread($fp, filesize('/tmp/currently_playing.txt'));
fclose($fp);
}
if ($line != '' && $line != $currently_playing) {
if (array_key_exists($line, $albums)) {
exec('mpc stop');
exec('mpc clear');
exec('mpc search artist "' . $albums[$line][0] . '" album "' . $albums[$line][1] . '" | mpc add -');
exec('mpc play');
}
$fp = fopen('/tmp/currently_playing.txt', 'w');
fwrite($fp, $line);
fclose($fp);
}
?>
That’s pretty much it! When I make new albums, I just transfer them to the Popcorn Hour via SMB, add the corresponding RFID tag to the array, and update the music database.
The hardware choices I’ve made here were mostly based on stuff I already had. The Popcorn Hour could easily be replaced by any computer with a sound card that can run mpd and the ftdi drivers, but if you don’t have a spare netbook or PC lying around, the Popcorn Hour seems to be the right price point (especially the refurbished A-110 at $105) for a dedicated RFID mp3 player.
The RedBee RFID reader is slightly more expensive that most RFID readers, but that is because it can use XBee wireless modules. If you don’t need wireless, you can get away with cheaper USB RFID readers.
The only tricky thing to find is probably the Christmas ornaments that look like records. I bought these from Restoration Hardware’s online store a few years ago during an after Christmas sale, but I haven’t been able to find a cheap source for them. If you do, let me know. One alternative that I was thinking of would be to remove the disc inside of 3.5” floppy disks.
If you decide to try making one, please let me know (bertrand@fan.net) how it turns out!
It’s worth noting that the ftdi_usb drivers are also available for the Popcorn Hour, thus you could theoretically bypass the wireless router altogether by attaching the XBee wireless module directly to the Popcorn Hour, but I found the drivers to be too unstable - perhaps due to the memory limitations of the unit.