<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>ruby, rails, san francisco, photography, startups, food</description><title>Bob Zoller</title><generator>Tumblr (3.0; @kludgebox)</generator><link>http://bob.zoller.us/</link><item><title>PhoneGap "deviceready" gotcha</title><description>&lt;p&gt;I was hacking on a &lt;a href="http://phonegap.com/"&gt;PhoneGap&lt;/a&gt; app yesterday, and at one point the &lt;code&gt;deviceready&lt;/code&gt; event stopped firing.  Poked around and discovered that phonegap.js actually redefines &lt;code&gt;document.addEventListener&lt;/code&gt; with its own custom version.  My problem was that I was attaching the event listener &lt;em&gt;before&lt;/em&gt; I loaded phonegap.js … which meant I never called their custom &lt;code&gt;addEventListener&lt;/code&gt; and hence never got the event.&lt;/p&gt;</description><link>http://bob.zoller.us/post/5172818237</link><guid>http://bob.zoller.us/post/5172818237</guid><pubDate>Tue, 03 May 2011 16:06:59 -0700</pubDate><category>phonegap</category><category>dom</category><category>javascript</category></item><item><title>A ruby script that inserts proper TimeStamp nodes into a Google Latitude KML export.</title><description>&lt;p&gt;I got the idea to use my Google Latitude history to fill in missing GPS data for pictures I take on my DSLR.  I use Aperture, and the free &lt;a href="http://www.uberplugins.com/products/maperturepro.php"&gt;Maperture Pro&lt;/a&gt; has the ability to import KML files, but the output of the Latitude KML download wouldn’t work.  After some digging, I realized that Latitude doesn’t insert proper timestamp elements in the KML output.  I hacked up this ruby script to parse the description elements (which contain the full timestamp) and insert the actual timestamp elements.&lt;/p&gt;

&lt;p&gt;Caveat: the Latitude data is not great… but it’s usually better than nothing.&lt;/p&gt;

&lt;p&gt;&lt;script src="https://gist.github.com/926866.js?file=gistfile1.rb"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://bob.zoller.us/post/5172627399</link><guid>http://bob.zoller.us/post/5172627399</guid><pubDate>Tue, 03 May 2011 16:00:40 -0700</pubDate><category>ruby</category><category>google latitude</category><category>gps</category><category>aperture</category></item><item><title>create a simple .deb package</title><description>&lt;p&gt;&lt;pre&gt;
&lt;code&gt;
#!/bin/bash

# This script should be run from within the directory with the wav files.

# First, create the empty tree under a new "build" directory
# (the name "build" is completely arbitrary here)
mkdir -p build/usr/bin

# Put the sounds in the sounds directory
cp -v degrib/src/degrib/degrib build/usr/bin

# move into the build directory, make a docs directory
cd build
mkdir -p usr/share/doc/degrib

# write the README file
cat &gt; usr/share/doc/degrib/README  control 
Description: degrib from the NWS.
 
 more info: &lt;a href="http://www.nws.noaa.gov/mdl/degrib/"&gt;http://www.nws.noaa.gov/mdl/degrib/&lt;/a&gt;
END

# Setting this environment variable fixes Apple's modified GNU tar so that
# it won't make dot-underscore AppleDouble files. Google it for details...
export COPY_EXTENDED_ATTRIBUTES_DISABLE=1

# create the data tarball
# (the tar options "czvf" mean create, zip, verbose, and filename.)
tar czvf data.tar.gz usr/bin/ usr/share/doc/

# create the control tarball
tar czvf control.tar.gz control

# create the debian-binary file
echo 2.0 &gt; debian-binary

# create the ar (deb) archive
ar -r degrib-amd64.deb debian-binary control.tar.gz data.tar.gz

# move the new deb up a directory
mv degrib-amd64.deb ..

# remove the tarballs, and cd back up to where we started
rm data.tar.gz control.tar.gz
cd ..
&lt;/code&gt;
&lt;/pre&gt;&lt;/p&gt;</description><link>http://bob.zoller.us/post/156269487</link><guid>http://bob.zoller.us/post/156269487</guid><pubDate>Wed, 05 Aug 2009 01:12:58 -0700</pubDate></item><item><title>Lea-Anne line dancing</title><description>&lt;iframe width="400" height="299" src="http://www.youtube.com/embed/QAqQIwUHc6c?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://youtube.com/?v=QAqQIwUHc6c"&gt;Lea-Anne line dancing&lt;/a&gt;&lt;/p&gt;</description><link>http://bob.zoller.us/post/95661461</link><guid>http://bob.zoller.us/post/95661461</guid><pubDate>Sun, 12 Apr 2009 22:38:56 -0700</pubDate></item><item><title>The Magic Behind Amazon's 2.7 Billion Dollar Question</title><description>&lt;a href="http://www.uie.com/articles/magicbehindamazon"&gt;The Magic Behind Amazon's 2.7 Billion Dollar Question&lt;/a&gt;</description><link>http://bob.zoller.us/post/87628803</link><guid>http://bob.zoller.us/post/87628803</guid><pubDate>Wed, 18 Mar 2009 11:13:36 -0700</pubDate></item><item><title>Robin Thicke - Lost Without You</title><description>&lt;iframe width="400" height="299" src="http://www.youtube.com/embed/jvO6gZYPICs?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://youtube.com/?v=jvO6gZYPICs"&gt;Robin Thicke - Lost Without You&lt;/a&gt;&lt;/p&gt;</description><link>http://bob.zoller.us/post/78458000</link><guid>http://bob.zoller.us/post/78458000</guid><pubDate>Sun, 15 Feb 2009 01:09:17 -0800</pubDate></item><item><title>Scott Weiland - Interstate Love Song</title><description>&lt;iframe width="400" height="299" src="http://www.youtube.com/embed/DFaF1Z5OfrM?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://youtube.com/?v=DFaF1Z5OfrM"&gt;Scott Weiland - Interstate Love Song&lt;/a&gt;&lt;/p&gt;</description><link>http://bob.zoller.us/post/78228305</link><guid>http://bob.zoller.us/post/78228305</guid><pubDate>Sat, 14 Feb 2009 00:01:15 -0800</pubDate></item><item><title>crazy chinatown parade float</title><description>&lt;iframe width="400" height="299" src="http://www.youtube.com/embed/162LBX4YNYM?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://youtube.com/?v=162LBX4YNYM"&gt;crazy chinatown parade float&lt;/a&gt;&lt;/p&gt;</description><link>http://bob.zoller.us/post/78228304</link><guid>http://bob.zoller.us/post/78228304</guid><pubDate>Sat, 14 Feb 2009 00:01:15 -0800</pubDate></item><item><title>Scott Weiland - Unglued</title><description>&lt;iframe width="400" height="299" src="http://www.youtube.com/embed/D3U5jiyhRIY?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://youtube.com/?v=D3U5jiyhRIY"&gt;Scott Weiland - Unglued&lt;/a&gt;&lt;/p&gt;</description><link>http://bob.zoller.us/post/78228306</link><guid>http://bob.zoller.us/post/78228306</guid><pubDate>Sat, 14 Feb 2009 00:01:15 -0800</pubDate></item><item><title>The Mark Cuban Stimulus Plan - Open Source Funding « blog maverick</title><description>&lt;a href="http://blogmaverick.com/2009/02/09/the-mark-cuban-stimulus-plan-open-source-funding/"&gt;The Mark Cuban Stimulus Plan - Open Source Funding « blog maverick&lt;/a&gt;</description><link>http://bob.zoller.us/post/77376938</link><guid>http://bob.zoller.us/post/77376938</guid><pubDate>Tue, 10 Feb 2009 21:32:49 -0800</pubDate></item><item><title>8th Annual Year in Ideas - Drone-pilot Burnout - NYTimes.com</title><description>&lt;a href="http://www.nytimes.com/2008/12/14/magazine/14Ideas-Section2-B-t-001.html?_r=1"&gt;8th Annual Year in Ideas - Drone-pilot Burnout - NYTimes.com&lt;/a&gt;</description><link>http://bob.zoller.us/post/77284647</link><guid>http://bob.zoller.us/post/77284647</guid><pubDate>Tue, 10 Feb 2009 14:32:33 -0800</pubDate></item><item><title>70s - The Futuro house</title><description>&lt;a href="http://www.berting.nl/futuro/"&gt;70s - The Futuro house&lt;/a&gt;</description><link>http://bob.zoller.us/post/70236391</link><guid>http://bob.zoller.us/post/70236391</guid><pubDate>Tue, 13 Jan 2009 09:50:06 -0800</pubDate></item><item><title>Jaydiohead :: Jay-Z x Radiohead :: Minty Fresh Beats</title><description>&lt;a href="http://jaydiohead.com/"&gt;Jaydiohead :: Jay-Z x Radiohead :: Minty Fresh Beats&lt;/a&gt;</description><link>http://bob.zoller.us/post/69302647</link><guid>http://bob.zoller.us/post/69302647</guid><pubDate>Thu, 08 Jan 2009 20:47:04 -0800</pubDate></item><item><title>Rate limiting with memcached</title><description>&lt;a href="http://simonwillison.net/2009/Jan/7/ratelimitcache/"&gt;Rate limiting with memcached&lt;/a&gt;</description><link>http://bob.zoller.us/post/69302648</link><guid>http://bob.zoller.us/post/69302648</guid><pubDate>Thu, 08 Jan 2009 20:47:04 -0800</pubDate></item><item><title>Samuel Smith's Organically Produced Lager Beer</title><description>&lt;p&gt;&lt;center&gt;
&lt;a href="http://beeradvocate.com/beer/profile/113/778"&gt;&lt;img border="0" src="http://beeradvocate.com/im/beers/778.jpg"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;delicious.&lt;/b&gt;
&lt;/center&gt;&lt;/p&gt;</description><link>http://bob.zoller.us/post/68857709</link><guid>http://bob.zoller.us/post/68857709</guid><pubDate>Tue, 06 Jan 2009 20:30:32 -0800</pubDate></item><item><title>Johnny 5 Combo Kit</title><description>&lt;a href="http://www.lynxmotion.com/Product.aspx?productID=592&amp;CategoryID=103"&gt;Johnny 5 Combo Kit&lt;/a&gt;</description><link>http://bob.zoller.us/post/47587679</link><guid>http://bob.zoller.us/post/47587679</guid><pubDate>Wed, 27 Aug 2008 02:33:20 -0700</pubDate></item><item><title>Bloggers Are Hard to Please and Hard to Pitch: Some Mistakes in Pitches from Startups</title><description>&lt;a href="http://profy.com/2008/08/10/startups-pitch-bloggers-mistakes/"&gt;Bloggers Are Hard to Please and Hard to Pitch: Some Mistakes in Pitches from Startups&lt;/a&gt;</description><link>http://bob.zoller.us/post/45447350</link><guid>http://bob.zoller.us/post/45447350</guid><pubDate>Sun, 10 Aug 2008 12:55:47 -0700</pubDate></item><item><title>script/runner script that doesn't require an absolute path</title><description>&lt;p&gt;the output from Rails’ &lt;em&gt;script/runner -h&lt;/em&gt; says you can create custom scripts with a fancy shebang line:

&lt;pre&gt;
You can also use runner as a shebang line for your scripts like this:
-------------------------------------------------------------
#!/usr/bin/env /Users/bob/Projects/glowworm/script/runner

Product.find(:all).each { |p| p.price *= 2 ; p.save! }
-------------------------------------------------------------
&lt;/pre&gt;

but I hate the idea of hardcoding a path like that.  Here’s a workaround: open up your new script, something like &lt;em&gt;script/my_custom_script&lt;/em&gt; and fill it like so

&lt;pre&gt;&lt;code class="ruby"&gt;
#!/usr/bin/env ruby
unless $0 =~ /runner/
  system("#{File.dirname(__FILE__)}/runner", __FILE__)
  exit 0
end

puts 'your code goes here'
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;</description><link>http://bob.zoller.us/post/43855416</link><guid>http://bob.zoller.us/post/43855416</guid><pubDate>Mon, 28 Jul 2008 13:59:31 -0700</pubDate></item><item><title>file search similar to TextMate's CMD-T, in bash.</title><description>&lt;p&gt;I’m a command line guy.  I code Rails apps in vim.  I’m happy.  I am, however, slightly jealous of TextMate’s CMD-T feature, where you can open a file just by typing a part of the name.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://dustymatthews.com/"&gt;Dusty&lt;/a&gt; pointed me to a &lt;a href="http://vim.wikia.com/wiki/File_search_similar_to_cmd-t_in_TextMate"&gt;vim tip for CMD-T like search in vim&lt;/a&gt;, but I don’t usually open files from within vim - I do it from the command line.&lt;/p&gt;

&lt;p&gt;Here’s my hacked up way to get the same feature from within my normal bash shell.  It requires &lt;a href="http://www.linuxjournal.com/article/2460"&gt;dialog&lt;/a&gt;, which I installed with a &lt;em&gt;sudo port install dialog&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;add this code to your .bash_login (or equivalent)&lt;/h3&gt;
&lt;pre&gt;
function _vfind {

  find -E . -type f -name "*$1*" ! -regex '.*/(\.git|\.svn|vendor|log).*' | sed 's/^\.\///' &gt; /tmp/_$$_vfind_files

  FOUND=`wc -l /tmp/_$$_vfind_files | awk '{ print $1 }'`

  if [ "$FOUND" = "0" ]; then
    echo 'no matching files...'
    return
  fi

  cat /tmp/_$$_vfind_files | awk '{ print NR " " $0 }' | xargs dialog --menu 'Choose a file:' 0 0 0 2&gt;/tmp/_$$_vfind_num

  tput clear

  if [ $? -eq 0 ]; then
    FILENUM=`cat /tmp/_$$_vfind_num`
    vi `awk "FNR == $FILENUM" /tmp/_$$_vfind_files`
  fi

  rm -f /tmp/_$$_vfind_files /tmp/_$$_vfind_num
}

alias f=_vfind
&lt;/pre&gt;

Close and re-open your terminal, or simply &lt;em&gt;source ~/.bash_login&lt;/em&gt;, and try it out:
&lt;pre&gt;
# cd my_rails_app
# f helper
&lt;/pre&gt;

&lt;h3&gt;And here’s what you get:&lt;/h3&gt;
&lt;img src="http://img.skitch.com/20080718-gyy11fp3ti2gjwm12r3h9329q6.jpg" alt="/Users/bob/Projects/activeconference : .bash_login"/&gt;&lt;p&gt;Arrow around, hit enter to open a file, or escape to cancel.  We’ll see if I stick with this in my daily workflow ;)&lt;/p&gt;</description><link>http://bob.zoller.us/post/42683641</link><guid>http://bob.zoller.us/post/42683641</guid><pubDate>Fri, 18 Jul 2008 00:39:19 -0700</pubDate></item><item><title>shared git repo (using ssh transport)</title><description>&lt;p&gt;As a quick followup to my last post, here’s the steps I took to make my remote git repo usable by a group of developers, not just me:

&lt;h4&gt;/etc/group&lt;/h4&gt;
After you’ve added accounts for everyone, make a group and add everyone to it.  This line should look something like:
&lt;pre&gt;&lt;code&gt;
coders:x:114:bob,docyes,phillip
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;git repo-config&lt;/h4&gt;
After creating the remote repo (&lt;em&gt;git —bare init&lt;/em&gt;), we need to set the core.sharedRepository variable to “group” - this tells git to create directories and files with group-write permissions.
&lt;pre&gt;&lt;code&gt;
git repo-config core.sharedRepository group
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;fix permissions&lt;/h4&gt;
Now that git will do the right thing, we need to fix the permissions on the existing files and directories.
&lt;pre&gt;&lt;code&gt;
sudo chgrp -R coders .
sudo chmod -R g+ws .
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;</description><link>http://bob.zoller.us/post/41707381</link><guid>http://bob.zoller.us/post/41707381</guid><pubDate>Wed, 09 Jul 2008 22:57:00 -0700</pubDate></item></channel></rss>

