Site logo

A collection of things.
By Chris James Martin

Filed Under: I can't believe I live here.

27 Mar 2015 — San Francisco, CA

From Above

Good greif.

Flickr Heatmap Tiles in Satellite Eyes

11 Apr 2014 — San Francisco, CA

I love Satellite Eyes. I’ve been using it for the last few years(?) to beautify my desktop with local Stamen Watercolor Maps.

When I saw these Flickr heatmap tiles by Eric Fischer, I immediately wanted them as my desktop. Here’s how to do it.

  1. If you haven’t already, install Satellite Eyes.
  2. Head to the Satellite Eyes preferences.

    Sattelite Eyes Menu

  3. Click “Manage Map Styles…”

    Sattelite Eyes Preferences

  4. Add a new map style, set the source to:

    http://trafficways.org/cgi-bin/tile.cgi?map=flickr-apr10&opt=-cFFFF00%20-M%2037%20-B12:0.0066:1.0119%20-G0.5&z={z}&x={x}&y={y}

    Sattelite Eyes Map Styles

  5. Set Satellite Eyes to use the new map.

    Sattelite Eyes Select Map

  6. Enjoy!

Virtualenv with Virtualenvwrapper on Ubuntu

30 Mar 2013 — San Francisco, CA

I’m a big fan of using virtualenv to create isolated environments for Python projects. Here’s how I set everything up on Ubuntu 12.10.

Install pip

sudo apt-get install python-pip

Install virtualenv

sudo pip install virtualenv

Create a dir to store your virtualenvs (I use ~/.virtualenvs)

mkdir ~/.virtualenvs

At this point you are all set to use virtualenv with the standard commands. However, I prefer to use the extra commands included in virtualenvwrapper. Lets set that up.

Install virtualenvwrapper

sudo pip install virtualenvwrapper

Set WORKON_HOME to your virtualenv dir

export WORKON_HOME=~/.virtualenvs

Add virtualenvwrapper.sh to .bashrc

Add this line to the end of ~/.bashrc so that the virtualenvwrapper commands are loaded.

. /usr/local/bin/virtualenvwrapper.sh

Exit and re-open your shell, or reload .bashrc with the command . .bashrc and you’re ready to go.

Create a new virtualenv

mkvirtualenv myawesomeproject

to exit your new virtualenv, use deactivate.

Switch between enviornments with workon

To load or switch between virtualenvs, use the workon command:

workon myawesomeproject

You can read more about virtualenv here and virtualenvwrapper here. You might also want to look at this very similar (and probably better) python guide post.

Questions?

Photo Hack Day SF — The Plan

14 Jul 2012 — San Francisco, CA

En Route to Photo Hack Day SF

I love hack days. I usually go into these things with either no idea, or an idea that’s been bubbling in my head and will almost certainly be too ambitious for a day of hacking. Today is the latter, this should be fun.

A few months ago Cal built http://thisismyj.am, a parody of http://thisismyjam.com. This triggered the domain-buying lever in my brain and I wound up with http://thisismycam.com, which has been parked ever since. The sliver of an idea that inspired the domain purchase is a site that hooks up to Flickr, looks at a user’s photos, and builds a profile of all the cameras that they’ve used. Simple, right?

The plan, pull in photos, check exif, pull in camera info from amazon, build some pretty pages to display it all. Keep an eye on http://thisismycam.com for progress.

Fix MenuMeters for OSX Lion

14 Jun 2011 — San Francisco, CA

Update: The current version of MenuMeters (1.5) supports Lion. Get it here.

MenuMeters is one of those little things that I must install immediately after any fresh install of OSX. Unfortunately, the current build doesn’t run out of the box on OSX 10.7 “Lion,” but it’s easily fixed.

The problem lies with the hack MenuMeters uses to insert menus into the OSX menu bar, MenuCracker. We need to update the version included with MenuMeters to the latest version.

  1. Go ahead and install MenuMeters if you haven’t already; make note of where you install it (/Library or ~/Library).
  2. Download the latest version (currently 2.2) of MenuCracker from SourceForge.
  3. Replace MenuCracker.menu in (~)/Library/PreferencePanes/MenuMeters.prefPane/Contents/Resources/ with the version you just downloaded. If you’re lazy, you can paste this into your terminal:

     sudo cp -R /Volumes/MenuCracker\ 2.2/MenuCracker.menu /Library/PreferencePanes/MenuMeters.prefPane/Contents/Resources/
    
  4. Close/(re)Launch System Preferences, and enable MenuMeters. Boom.

How To Install wkhtmltopdf PHP Bindings

16 Mar 2011 — San Francisco, CA

This isn’t a difficult process, but I’m sure I’ll need it again, so here it is.

Pre-requisites:

  1. Download the latest version of libwkhtmltox and the source of wkhtmltopdf from Google Code.
  2. Copy lib/libwkhtmltox.so from libwkhtmltox to /usr/local/lib.
  3. Copy include/wkhtmltox from wkhtmltopdf to /usr/local/include.
  4. Run the following command (just to make sure it’s loaded):

     $ldconfig -v | grep wkhtml
    

PHP Bindings:

  1. Grab php-wkhtmltox from GitHub.
  2. Install.

Installation:

If development tools aren’t installed:

$apt-get install build-essential php5-dev  # (ubuntu)
$phpize
$./configure
$make install

Add extension=phpwkhtmltox.so to php.ini.

P.S. These instructions are for Ubuntu. If you’re on CentOS, things are more difficult, good luck.

Rainy Thursday

24 Feb 2011 — San Francisco, CA

Rainy Thursday

Even on a rainy Thursday in February, San Francisco is beautiful.

Remove greenpois0n Boot Logo After 4.2 Jailbreak

07 Feb 2011 — San Francisco, CA

I greatly appreciate the work of the iOS hacking community; I really do. I’ve never used a non-jailbroken iPhone (for long), and I can’t imagine upgrading to a new iOS version without a jailbreak and all the goodies I’ve come to rely on in my iPhone world.

However, I expect a jailbreak to do its thing and then disappear. Installing a utility like Cydia is acceptable (and expected), but I want my iPhone to look and operate from the UI/UX side just as it did before. This means I don’t want any themes installed, I don’t want the apple on boot to switch to a pineapple, and I certainly don’t want an animated skull logo every time I reboot my phone.

Anyway, enough bitching; the beauty of having a jailbroken phone means you can get in there and change it.

  1. Install OpenSSH from Cydia.
  2. SSH into your iPhone using the default account “mobile,” password “alpine.”
  3. Switch to root with:

     $su
    

    The password is also “alpine.”

  4. Run the following command:

     $rm /usr/bin/animate
    

That’s it! On the next reboot, you’ll only see the standard apple logo, yay! If you want to keep SSH installed on your phone, you should change the default password using passwd, right now.

Support Hayes Valley Farm on Kickstarter

30 Sep 2010 — San Francisco, CA

For the next month and a half, anyone visiting this site will see a widget on the left side of the page showing the progress of the Hayes Valley Farm Kickstarter project to help fund the farm in the coming year. Here’s why:

Liquid Light

Hayes Valley Farm is an amazing urban farming project taking place in the middle of Hayes Valley in San Francisco on the 2.2-acre lot that was formerly the on/off ramp for the central freeway. Since 1989, when the Loma Prieta earthquake damaged the elevated road and led to the central freeway ending on Octavia Boulevard, the lot has been vacant and lonely, unused and surrounded by a chain-link fence. The Hayes Valley Farm project started work in January, and in the last 8 months, the site has transformed. The chain-link fence remains, but it is decorated with art from students at a nearby school, the on-ramp has become a “freeway food forest,” hundreds of cubic yards of mulch have been spread and planted with fava beans and more to start healing and renewing the soil, and the community has come together to get their hands dirty while meeting and enjoying the company of those who live in the neighborhood and beyond. It really is an awesome thing to watch grow and be a part of.

To help raise funds for the coming year, the Hayes Valley Farm team has set up a Kickstarter project with the goal of raising $20,600 to buy tools and supplies, and more importantly, continue building the educational programs for local schools and community. Kickstarter is a great concept where “backers” pledge to donate a certain amount of money if the total pledges reach a pre-set goal in a set period of time. This model encourages projects to set goals based on what they really need, and backers know that while their donation alone may not mean the project’s success, their public pledge of support might encourage others to chip in and raise the amount the project really needs.

When I started writing this post, the project was at under $1000 pledged; two days later it was over $3000. Go check out their Kickstarter project page and the Hayes Valley Farm website, then join me as a backer and help them reach their goal!

East Clayton PodGuide

14 Sep 2005 — Athens, GA

After using Podcast AV for my first podcast and having a fairly painless experience, with the exception of having to manually write the final XML for the RSS feed, I thought I’d go out on a limb and try a new piece of software called Podcast Maker this time around. Podcast Maker was appealing because it’s supposed to do everything from enhancement to writing the final XML all for you in a GUI interface.

After fighting with Podcast Maker for 2 days, I decided that Podcast AV was the way to go… Podcast Maker seems to get into an infinite loop (problem in code where a process keeps repeating endlessly) on the “enhancing podcast” step which creates an mp3 file that just keeps growing until you have no more disk space - that’s a long time when you have 70 gigs free (I didn’t want to force quit and lose all my work). Hopefully, this was just some strange bug for me and they will have it figured out soon. Even after all the pain, I’ll still probably try it again in the future - if it worked it would be real nice.

I created this PodGuide walking around Downtown Athens with a PowerBook and a Bluetooth headset. I think I had the input level turned up too high in the sound settings on the PowerBook so it kept cracking up and I had to lower all the levels later and it’s kinda quiet. I’m learning… more on some other mobile recording methods I’ve discovered in a later post.

Use this link to subscribe to the PodGuide in iTunes:

feed://nmi.roundhere.net/podcasts/podguide.xml

  • Note: This is an enhanced podcast, so it will only work with an iPod.