<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>cameronspickert.com</title>
    <link>http://cameronspickert.com/</link>
    <atom:link href="http://cameronspickert.com/rss.xml" rel="self" type="application/rss+xml" />
    <description>stuff from cameronspickert</description>
    <language>en-us</language>
    <pubDate>Thu, 19 Jan 2012 15:25:27 -0800</pubDate>
    <lastBuildDate>Thu, 19 Jan 2012 15:25:27 -0800</lastBuildDate>

    
    <item>
      <title>Using multiple Dropbox accounts in Mac OS X</title>
      <link>http://cameronspickert.com/2012/01/17/using-multiple-dropbox-accounts-in-mac-os-x.html</link>
      <pubDate>Tue, 17 Jan 2012 00:00:00 -0800</pubDate>
      <author>cameron@cameronspickert.com (Cameron Spickert)</author>
      <guid>http://cameronspickert.com/2012/01/17/using-multiple-dropbox-accounts-in-mac-os-x</guid>
      <description>&lt;p&gt;This post &lt;a href='http://forums.dropbox.com/topic.php?id=3166'&gt;has been written before&lt;/a&gt;, but it&amp;#8217;s such a useful hack that I figured I&amp;#8217;d share it here for those who haven&amp;#8217;t seen it. It&amp;#8217;s particularly useful for people who want to use separate &amp;#8220;home&amp;#8221; and &amp;#8220;work&amp;#8221; Dropbox accounts.&lt;/p&gt;

&lt;h3 id='running_two_instances_of_dropboxapp'&gt;Running two instances of Dropbox.app&lt;/h3&gt;

&lt;p&gt;The trick is to get Mac OS X to run multiple instances of Dropbox.app at the same time. As far as I&amp;#8217;m aware, there&amp;#8217;s no way to do this through the Finder (for any application). Fortunately, it&amp;#8217;s easy to do in two Terminal commands:&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='bash'&gt;mkdir -p &lt;span class='s2'&gt;&amp;quot;$HOME/.dropbox-alt&amp;quot;&lt;/span&gt;
&lt;span class='nv'&gt;HOME&lt;/span&gt;&lt;span class='o'&gt;=&lt;/span&gt;&lt;span class='s2'&gt;&amp;quot;$HOME/.dropbox-alt&amp;quot;&lt;/span&gt; open -n -a Dropbox.app
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;(You can replace &lt;code&gt;.dropbox-alt&lt;/code&gt; with whatever you want).&lt;/p&gt;

&lt;p&gt;The first line simply creates a new hidden folder in your home folder, if it doesn&amp;#8217;t already exist. Although it looks like the second line should be two commands, it&amp;#8217;s really just one. Invoking &lt;code&gt;open&lt;/code&gt; with the &lt;code&gt;-n&lt;/code&gt; flag causes a new instance of the application to launch (and if you use the &lt;code&gt;-a&lt;/code&gt; flag, you don&amp;#8217;t need to specify the full path to the Dropbox app). Setting the &lt;code&gt;HOME&lt;/code&gt; environment variable to its new value fools the new Dropbox instance into thinking your home folder is at &lt;code&gt;$HOME/.dropbox-alt&lt;/code&gt;. Since Dropbox normally stores its settings in your home directory, you can have a new set of preferences in this folder that doesn&amp;#8217;t conflict with your primary account.&lt;/p&gt;

&lt;p&gt;After you run those lines in Terminal for the first time, the new Dropbox instance will prompt you to set up your account. Once you go through the initial setup, running those commands will simply launch the second Dropbox instance and begin syncing your files.&lt;/p&gt;

&lt;h3 id='launch_a_second_dropbox_instance_automatically'&gt;Launch a second Dropbox instance automatically&lt;/h3&gt;

&lt;p&gt;While it&amp;#8217;s not difficult to run these commands, it can get tedious after a few logins. Wouldn&amp;#8217;t it be nice if you could start your alternative Dropbox from Finder, or start it automatically when you log in? With Automator, you can do just that.&lt;/p&gt;

&lt;p&gt;Here are the steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Launch Automator (/Applications/Automator.app).&lt;/li&gt;

&lt;li&gt;Create a new &amp;#8220;Application&amp;#8221; document.&lt;/li&gt;

&lt;li&gt;In the Actions library, search for &amp;#8220;Run Shell Script&amp;#8221;.&lt;/li&gt;

&lt;li&gt;Double click or drag the &amp;#8220;Run Shell Script&amp;#8221; action into the workflow (on the right).&lt;/li&gt;

&lt;li&gt;Select &lt;code&gt;/bin/sh&lt;/code&gt; from the &amp;#8220;Shell&amp;#8221; menu, and paste the two Terminal lines above in the text area.&lt;/li&gt;

&lt;li&gt;Save the result to your Applications folder (call it &amp;#8220;Dropbox Alt.app&amp;#8221; or something similar).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now you can launch your secondary Dropbox instance by running the application you just created! To add it as a login item:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to System Preferences and search for &amp;#8220;Login Items&amp;#8221; in the search bar.&lt;/li&gt;

&lt;li&gt;Click the plus and add your &amp;#8220;Dropbox Alt&amp;#8221; application.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hope you find this as useful as I do!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Moving to Jekyll</title>
      <link>http://cameronspickert.com/2011/12/15/moving-to-jekyll.html</link>
      <pubDate>Thu, 15 Dec 2011 00:00:00 -0800</pubDate>
      <author>cameron@cameronspickert.com (Cameron Spickert)</author>
      <guid>http://cameronspickert.com/2011/12/15/moving-to-jekyll</guid>
      <description>&lt;p&gt;It&amp;#8217;s been a while since I&amp;#8217;ve posted anything around here, and I&amp;#8217;d like to change that. Part of the reason for the lack of updates (or so I tell myself) is because &lt;a href='http://nanoc.stoneship.org/'&gt;nanoc&lt;/a&gt;, while extremely flexible and customizable, proved increasingly difficult to use over time. A major version update broke my build process, and I ended up spending more time engineering my blog than writing&amp;#8211;I even had to write &lt;a href='http://rubygems.org/gems/nanoc-git'&gt;my own gem&lt;/a&gt; to deploy my site to GitHub. I&amp;#8217;m hoping that using a system that integrates better with GitHub will let me get back to what I originally set out to do with this site.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Implementing Oplop in Python</title>
      <link>http://cameronspickert.com/2011/10/08/implementing-oplop-in-python.html</link>
      <pubDate>Sat, 08 Oct 2011 00:00:00 -0700</pubDate>
      <author>cameron@cameronspickert.com (Cameron Spickert)</author>
      <guid>http://cameronspickert.com/2011/10/08/implementing-oplop-in-python</guid>
      <description>&lt;p&gt;I&amp;#8217;ve been using &lt;a href='http://oplop.appspot.com/'&gt;Oplop&lt;/a&gt; for a while now. It&amp;#8217;s a great alternative to database-style password management programs like &lt;a href='http://www.agilebits.com/onepassword'&gt;1Password&lt;/a&gt;, providing the same level of security without compromising portability. While 1Password lets you take your passwords with you via an encrypted file and mobile, web and desktop apps, Oplop makes it so you don&amp;#8217;t have to take anything with you at all!&lt;/p&gt;

&lt;p&gt;One thing I don&amp;#8217;t like about Oplop, however, is having to go to &lt;a href='http://oplop.appspot.com/'&gt;oplop.appspot.com&lt;/a&gt; every single time I need to retrieve my passwords. So I decided to implement &lt;a href='http://code.google.com/p/oplop/wiki/HowItWorks'&gt;the algorithm&lt;/a&gt; as a Python script with a simple command line interface.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='python'&gt;&lt;span class='c'&gt;#!/usr/bin/env python&lt;/span&gt;

&lt;span class='sd'&gt;&amp;quot;&amp;quot;&amp;quot;Generate a password using the Oplop password hashing algorithm.&lt;/span&gt;
&lt;span class='sd'&gt;For more information: http://code.google.com/p/oplop/wiki/HowItWorks&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span class='kn'&gt;from&lt;/span&gt; &lt;span class='nn'&gt;sys&lt;/span&gt; &lt;span class='kn'&gt;import&lt;/span&gt; &lt;span class='n'&gt;argv&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;stdout&lt;/span&gt;
&lt;span class='kn'&gt;from&lt;/span&gt; &lt;span class='nn'&gt;hashlib&lt;/span&gt; &lt;span class='kn'&gt;import&lt;/span&gt; &lt;span class='n'&gt;md5&lt;/span&gt;
&lt;span class='kn'&gt;from&lt;/span&gt; &lt;span class='nn'&gt;base64&lt;/span&gt; &lt;span class='kn'&gt;import&lt;/span&gt; &lt;span class='n'&gt;urlsafe_b64encode&lt;/span&gt; &lt;span class='k'&gt;as&lt;/span&gt; &lt;span class='n'&gt;b64&lt;/span&gt;
&lt;span class='kn'&gt;import&lt;/span&gt; &lt;span class='nn'&gt;re&lt;/span&gt;

&lt;span class='n'&gt;PASS_LEN&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='mi'&gt;8&lt;/span&gt;
&lt;span class='n'&gt;DIGIT_RE&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;re&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;compile&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s'&gt;&amp;#39;\d+&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;

&lt;span class='k'&gt;def&lt;/span&gt; &lt;span class='nf'&gt;oplop&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;nickname&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;master_password&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;pass_len&lt;/span&gt;&lt;span class='o'&gt;=&lt;/span&gt;&lt;span class='n'&gt;PASS_LEN&lt;/span&gt;&lt;span class='p'&gt;):&lt;/span&gt;
    &lt;span class='n'&gt;hashed&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;b64&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;md5&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;master_password&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='n'&gt;nickname&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;digest&lt;/span&gt;&lt;span class='p'&gt;())&lt;/span&gt;
    &lt;span class='n'&gt;digits&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;DIGIT_RE&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;findall&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;hashed&lt;/span&gt;&lt;span class='p'&gt;[:&lt;/span&gt;&lt;span class='n'&gt;pass_len&lt;/span&gt;&lt;span class='p'&gt;])&lt;/span&gt;
    &lt;span class='k'&gt;if&lt;/span&gt; &lt;span class='ow'&gt;not&lt;/span&gt; &lt;span class='n'&gt;digits&lt;/span&gt;&lt;span class='p'&gt;:&lt;/span&gt;
        &lt;span class='n'&gt;digits&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;DIGIT_RE&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;findall&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;hashed&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
        &lt;span class='n'&gt;hashed&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;digits&lt;/span&gt; &lt;span class='ow'&gt;and&lt;/span&gt; &lt;span class='n'&gt;digits&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='mi'&gt;0&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='ow'&gt;or&lt;/span&gt; &lt;span class='s'&gt;&amp;#39;1&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt; &lt;span class='o'&gt;+&lt;/span&gt; &lt;span class='n'&gt;hashed&lt;/span&gt;
    &lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='n'&gt;hashed&lt;/span&gt;&lt;span class='p'&gt;[:&lt;/span&gt;&lt;span class='n'&gt;pass_len&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt;

&lt;span class='k'&gt;if&lt;/span&gt; &lt;span class='n'&gt;__name__&lt;/span&gt; &lt;span class='o'&gt;==&lt;/span&gt; &lt;span class='s'&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;:&lt;/span&gt;
    &lt;span class='kn'&gt;import&lt;/span&gt; &lt;span class='nn'&gt;argparse&lt;/span&gt;
    &lt;span class='n'&gt;parser&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;argparse&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;ArgumentParser&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;description&lt;/span&gt;&lt;span class='o'&gt;=&lt;/span&gt;&lt;span class='n'&gt;__doc__&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
    &lt;span class='n'&gt;parser&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;add_argument&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s'&gt;&amp;#39;nickname&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;help&lt;/span&gt;&lt;span class='o'&gt;=&lt;/span&gt;&lt;span class='s'&gt;&amp;#39;Account nickname&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
    &lt;span class='n'&gt;parser&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;add_argument&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='s'&gt;&amp;#39;master_password&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;help&lt;/span&gt;&lt;span class='o'&gt;=&lt;/span&gt;&lt;span class='s'&gt;&amp;#39;Master password&amp;#39;&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;
    &lt;span class='n'&gt;args&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;parser&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;parse_args&lt;/span&gt;&lt;span class='p'&gt;()&lt;/span&gt;
    &lt;span class='n'&gt;stdout&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;write&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;oplop&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;args&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;nickname&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;args&lt;/span&gt;&lt;span class='o'&gt;.&lt;/span&gt;&lt;span class='n'&gt;master_password&lt;/span&gt;&lt;span class='p'&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;From here, I just need to come up with a way to get passwords generated by the script into web forms and applications automatically. For now, &lt;a href='http://www.alfredapp.com/'&gt;Alfred&lt;/a&gt; (&lt;a href='http://www.alfredapp.com/powerpack/'&gt;+ Powerpack&lt;/a&gt;) and &lt;code&gt;pbcopy&lt;/code&gt; are doing nicely.&lt;/p&gt;

&lt;p&gt;&lt;a href='https://gist.github.com/1259200'&gt;Here&amp;#8217;s the Gist&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Easily create a UIImage from a UIView</title>
      <link>http://cameronspickert.com/2011/08/30/easily-create-a-uiimage-from-a-uiview.html</link>
      <pubDate>Tue, 30 Aug 2011 00:00:00 -0700</pubDate>
      <author>cameron@cameronspickert.com (Cameron Spickert)</author>
      <guid>http://cameronspickert.com/2011/08/30/easily-create-a-uiimage-from-a-uiview</guid>
      <description>&lt;p&gt;One of my projects at Aviary necessitated generating a static UIImage from a UIView. Fortunately, Quartz makes it really simple to do this. Here&amp;#8217;s a quick category on UIView showing how it can be done.&lt;/p&gt;

&lt;p&gt;To explain: &lt;code&gt;-createImageFromRect:&lt;/code&gt; method generates an image by rendering the portion of the view bounded by &amp;#8220;frame&amp;#8221; in an image context. Note that CALayer&amp;#8217;s &lt;code&gt;-renderInContext:&lt;/code&gt; method renders the entire layer tree, creating a flat image from the view hierarchy.&lt;/p&gt;
&lt;div class='highlight'&gt;&lt;pre&gt;&lt;code class='objc'&gt;&lt;span class='cm'&gt;/* implementation UIView (UIImageCreation) */&lt;/span&gt;

&lt;span class='o'&gt;-&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;UIImage&lt;/span&gt; &lt;span class='o'&gt;*&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;&lt;span class='nl'&gt;createImageFromRect:&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;CGRect&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;&lt;span class='n'&gt;frame&lt;/span&gt;
&lt;span class='p'&gt;{&lt;/span&gt;
    &lt;span class='n'&gt;UIGraphicsBeginImageContext&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;frame&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;size&lt;/span&gt;&lt;span class='p'&gt;);&lt;/span&gt;
    &lt;span class='n'&gt;CGContextRef&lt;/span&gt; &lt;span class='n'&gt;context&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;UIGraphicsGetCurrentContext&lt;/span&gt;&lt;span class='p'&gt;();&lt;/span&gt;

    &lt;span class='n'&gt;CGPoint&lt;/span&gt; &lt;span class='n'&gt;origin&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;self&lt;/span&gt; &lt;span class='n'&gt;bounds&lt;/span&gt;&lt;span class='p'&gt;].&lt;/span&gt;&lt;span class='n'&gt;origin&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
    &lt;span class='n'&gt;CGPoint&lt;/span&gt; &lt;span class='n'&gt;offset&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;frame&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;origin&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;

    &lt;span class='n'&gt;CGContextTranslateCTM&lt;/span&gt;&lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;context&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;origin&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;x&lt;/span&gt; &lt;span class='o'&gt;-&lt;/span&gt; &lt;span class='n'&gt;offset&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;x&lt;/span&gt;&lt;span class='p'&gt;,&lt;/span&gt; &lt;span class='n'&gt;origin&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;y&lt;/span&gt; &lt;span class='o'&gt;-&lt;/span&gt; &lt;span class='n'&gt;offset&lt;/span&gt;&lt;span class='p'&gt;.&lt;/span&gt;&lt;span class='n'&gt;y&lt;/span&gt;&lt;span class='p'&gt;);&lt;/span&gt;

    &lt;span class='p'&gt;[[&lt;/span&gt;&lt;span class='n'&gt;self&lt;/span&gt; &lt;span class='n'&gt;layer&lt;/span&gt;&lt;span class='p'&gt;]&lt;/span&gt; &lt;span class='nl'&gt;renderInContext:&lt;/span&gt;&lt;span class='n'&gt;context&lt;/span&gt;&lt;span class='p'&gt;];&lt;/span&gt;

    &lt;span class='n'&gt;UIImage&lt;/span&gt; &lt;span class='o'&gt;*&lt;/span&gt;&lt;span class='n'&gt;image&lt;/span&gt; &lt;span class='o'&gt;=&lt;/span&gt; &lt;span class='n'&gt;UIGraphicsGetImageFromCurrentImageContext&lt;/span&gt;&lt;span class='p'&gt;();&lt;/span&gt;
    &lt;span class='n'&gt;UIGraphicsEndImageContext&lt;/span&gt;&lt;span class='p'&gt;();&lt;/span&gt;

    &lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='n'&gt;image&lt;/span&gt;&lt;span class='p'&gt;;&lt;/span&gt;
&lt;span class='p'&gt;}&lt;/span&gt;

&lt;span class='o'&gt;-&lt;/span&gt; &lt;span class='p'&gt;(&lt;/span&gt;&lt;span class='n'&gt;UIImage&lt;/span&gt; &lt;span class='o'&gt;*&lt;/span&gt;&lt;span class='p'&gt;)&lt;/span&gt;&lt;span class='n'&gt;createImage&lt;/span&gt;
&lt;span class='p'&gt;{&lt;/span&gt;
    &lt;span class='k'&gt;return&lt;/span&gt; &lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;self&lt;/span&gt; &lt;span class='nl'&gt;createImageFromRect:&lt;/span&gt;&lt;span class='p'&gt;[&lt;/span&gt;&lt;span class='n'&gt;self&lt;/span&gt; &lt;span class='n'&gt;bounds&lt;/span&gt;&lt;span class='p'&gt;]];&lt;/span&gt;
&lt;span class='p'&gt;}&lt;/span&gt;

&lt;span class='cm'&gt;/* end */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href='https://gist.github.com/1181935'&gt;Check out the Gist here&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Aviary HQ</title>
      <link>http://cameronspickert.com/2011/08/28/aviary-hq.html</link>
      <pubDate>Sun, 28 Aug 2011 00:00:00 -0700</pubDate>
      <author>cameron@cameronspickert.com (Cameron Spickert)</author>
      <guid>http://cameronspickert.com/2011/08/28/aviary-hq</guid>
      <description>&lt;p&gt;A lot has happened in the past month or two, but the biggest news from me is that I started working at Aviary, Inc. in mid-July. I&amp;#8217;ve been spending a good deal of time at the office, and I&amp;#8217;m loving every minute of it. Our building is in the heart of Manhattan, right next to Penn Station and Madison Square Garden. We have an amazing roof and a really sketchy elevator. Hmm, reminds me of somewhere in Bushwick.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Reflecting on Year One in NYC</title>
      <link>http://cameronspickert.com/2011/07/08/reflecting-on-year-one-in-nyc.html</link>
      <pubDate>Fri, 08 Jul 2011 00:00:00 -0700</pubDate>
      <author>cameron@cameronspickert.com (Cameron Spickert)</author>
      <guid>http://cameronspickert.com/2011/07/08/reflecting-on-year-one-in-nyc</guid>
      <description>&lt;p&gt;It&amp;#8217;s been an eventful year since I graduated last summer, made the transition from Cambridge to Bushwick. There&amp;#8217;s much more to this story, but I&amp;#8217;m hoping this quick retrospective will kickstart this blog back into action.&lt;/p&gt;

&lt;h3 id='work'&gt;Work&lt;/h3&gt;

&lt;p&gt;A year ago was an exciting time for us: some friends and I had made &lt;a href='http://itunes.apple.com/us/app/rover-unofficial-guide-to/id312281600?mt=8'&gt;a successful iPhone app&lt;/a&gt; together, been &lt;a href='http://online.wsj.com/article/SB10001424052748704188104575083293556739002.html'&gt;profiled by the Wall Street Journal&lt;/a&gt;, and received enough money from AT&amp;amp;T to work on mobile apps for schools AND live off of for a year. Times were good.&lt;/p&gt;

&lt;p&gt;We worked hard to get our work off the ground, finding our way with AT&amp;amp;T, some of their partner companies, and of course, universities, and ended up deploying the &lt;a href='http://itunes.apple.com/app/id441605750?mt=8'&gt;Columbia Business School mobile app&lt;/a&gt; last month after a year of hard work. While we didn&amp;#8217;t quite take our business to the level we wanted, we ended up with a product we can be proud of.&lt;/p&gt;

&lt;p&gt;As our team heads off in different directions, things are getting exciting once again. I&amp;#8217;ll have more to tell in a little over a week.&lt;/p&gt;

&lt;h3 id='life'&gt;Life&lt;/h3&gt;

&lt;p&gt;I&amp;#8217;m convinced I&amp;#8217;m a different person than I was when I arrived in New York City. It took a long time for me to get over how dirty, crowded and expensive it can be, but I&amp;#8217;m learning to love it here&amp;#8211;there really is no place like it. I&amp;#8217;ve particularly enjoyed the &lt;a href='/2011/02/04/music-is-life-is-music/'&gt;live music scene&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Bushwick has been great to me, and I&amp;#8217;ll miss it when I leave for Manhattan. I&amp;#8217;m consistently amazed at how lucky we got with our apartment&amp;#8211;even though our building has been an unexpected (or unwanted) adventure at times, we&amp;#8217;re around the corner from the L train, we now have a 24-hour grocery store across the street, and there are restaurants and shops popping up everywhere. We couldn&amp;#8217;t have asked for a better introduction to the city.&lt;/p&gt;

&lt;h3 id='happy_new_year_nyc'&gt;Happy New Year, NYC!&lt;/h3&gt;

&lt;p&gt;I have lots of goals for the next year: getting a bike and commuting above-ground, getting more involved in the NYC startup scene, and meeting more people, to name a few. It&amp;#8217;s definitely going to be a busy year. Oh, and &lt;a href='/2011/02/04/music-is-life-is-music/'&gt;more concerts&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And, once again, I hope to make this blog worth reading!&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Thompson LES</title>
      <link>http://cameronspickert.com/2011/05/31/thompson-les.html</link>
      <pubDate>Tue, 31 May 2011 00:00:00 -0700</pubDate>
      <author>cameron@cameronspickert.com (Cameron Spickert)</author>
      <guid>http://cameronspickert.com/2011/05/31/thompson-les</guid>
      <description>&lt;p&gt;I went to a birthday party at a top-floor room at the Thompson LES (LES = &amp;#8220;Lower East Side&amp;#8221;) on Sunday. As far as I can tell, it&amp;#8217;s the tallest building in the area, which made for an absolutely spectacular night-time view from the private deck. The room spans the length of the building and faces west, making for a perfect view of both the financial district, the Brooklyn Bridge, and midtown. I shudder to think what it would cost to actually stay here, and I&amp;#8217;m glad the only cost to me was a bottle of rum.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>New Ashiya</title>
      <link>http://cameronspickert.com/2011/05/29/new-ashiya.html</link>
      <pubDate>Sun, 29 May 2011 00:00:00 -0700</pubDate>
      <author>cameron@cameronspickert.com (Cameron Spickert)</author>
      <guid>http://cameronspickert.com/2011/05/29/new-ashiya</guid>
      <description>&lt;p&gt;&lt;em&gt;This is the first of what will hopefully be an ongoing series about places and businesses I&amp;#8217;ve visited.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;New Ashiya is a sushi restaurant on 1st Ave in the East Village. It looks pretty innocuous on the outside, but walk inside and you&amp;#8217;ll immediately see that this isn&amp;#8217;t your average Japanese restaurant. In addition to their regular menu, they have an all you can eat &lt;em&gt;and drink&lt;/em&gt; option for $33 per person. For 2 hours, you can order as much sushi, sake and beer as you can handle (without going overboard&amp;#8211;the menu warns of additional charges for wasted food). We opted to try every special roll on the menu (about 10 different kinds), plus some tuna and salmon sashimi. The highlight was definitely the black pepper tuna roll, something I&amp;#8217;ve never seen or tasted anywhere else. Oh, and we did lots of sake bombs.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>My Password Management Setup</title>
      <link>http://cameronspickert.com/2011/05/28/my-password-management-setup.html</link>
      <pubDate>Sat, 28 May 2011 00:00:00 -0700</pubDate>
      <author>cameron@cameronspickert.com (Cameron Spickert)</author>
      <guid>http://cameronspickert.com/2011/05/28/my-password-management-setup</guid>
      <description>&lt;p&gt;Since &lt;a href='/2011/05/27/internet-disaster-preparedness/'&gt;my last post&lt;/a&gt; on identity theft/worst case scenarios regarding user accounts on the web was a bit technical/unclear, I figured I&amp;#8217;d follow up with a better answer to the question: &amp;#8220;so what should I do about it?&amp;#8221; Since weak passwords and site-specific attacks are the biggest threat, I think the best way for me to answer that question is to walk through my current account management scheme.&lt;/p&gt;

&lt;p&gt;My system runs on one simple rule: &lt;strong&gt;don&amp;#8217;t use the same password twice&lt;/strong&gt;. When I register new accounts online, I use a different password every time. That way, if one site I use gets compromised, my other accounts won&amp;#8217;t be affected. Obviously, this would be impractical if I had to remember every single password I registered with, or even if I had to keep them all written down. So here are the supporting requirements of my system:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Keep memorization to a minimum.&lt;/strong&gt; I don&amp;#8217;t want to waste brain power memorizing hundreds of passwords.&lt;/li&gt;

&lt;li&gt;I should be able to access my passwords &lt;strong&gt;quickly&lt;/strong&gt;&amp;#8211;only slightly slower than the same amount of time it would take to recall them from memory and type them out.&lt;/li&gt;

&lt;li&gt;I should be able to access my passwords &lt;strong&gt;wherever I am&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I&amp;#8217;m basically looking for the convenience of using a single password everywhere, but with much better security. Fortunately, this is easily accomplished using a few tools and some initial setup time.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Oplop&lt;/strong&gt; (Web-based) - &lt;a href='https://oplop.appspot.com/'&gt;https://oplop.appspot.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Oplop is actually &lt;a href='http://code.google.com/p/oplop/wiki/HowItWorks'&gt;a specification&lt;/a&gt; for generating passwords, but there is also a &lt;a href='http://oplop.appspot.com'&gt;web-based implementation&lt;/a&gt; you can actually use. You choose a master password and a &amp;#8220;nickname,&amp;#8221; and it spits out a strong password. The beauty of Oplop is that given the same nickname and master password, it generates the same output every time. What this means is that you don&amp;#8217;t actually need to store anything at all; just pick a single master password and use an easily memorizable nickname for each of your accounts (like &amp;#8220;amazon&amp;#8221; for your Amazon account). That way, you only need to remember one master password, but you end up with separate passwords for each of your accounts online. You just need to use the generator each time you want to access your password (which, once you get used to it, is only a slight inconvenience that can be mitigated by using 1Password and a web browser plugin).&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;strong&gt;1Password&lt;/strong&gt; (Mac, Windows, iOS, Android) - &lt;a href='http://agilebits.com/onepassword'&gt;http://agilebits.com/onepassword&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You may be familiar with storing passwords for your various web user accounts in your browser (like when it asks if you want to &amp;#8220;Save this password&amp;#8221; for later). Rather than storing your information in the browser, you can store it in 1Password, which serves as a central repository for your sensitive information (in this way, it&amp;#8217;s similar to the Keychain feature of Mac OS X, but better). Everything you enter is protected by a master password and strong encryption. You can even store 1Password&amp;#8217;s database file (the &amp;#8220;.agilekeychain&amp;#8221; file) on a web-accessible file system like Dropbox and access it via an HTML interface. I use 1Password in addition to Oplop for a few reasons: to have an offline-accessible &amp;#8220;database&amp;#8221; of my passwords and other info; to be able to log in using a keystroke via the included browser plugins; and, to sync my information to Dropbox/my iPhone for mobile access.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These two tools allow me to satisfy my three requirements above. Both of them allow me to avoid memorizing any passwords except the master. When I&amp;#8217;m on my own computer, 1Password&amp;#8217;s browser plugins allow me to fill out login forms with a single keystroke. When I&amp;#8217;m on someone else&amp;#8217;s computer, I can look up my password on my iPhone or use Oplop to retrieve it.&lt;/p&gt;

&lt;p&gt;This isn&amp;#8217;t necessarily the simplest system to set up&amp;#8211;after all, it requires you to change all your current account passwords and your behavior. But I can guarantee that if you do both, you&amp;#8217;ll be protecting yourself better than most other internet users.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>On Internet Disaster Preparedness</title>
      <link>http://cameronspickert.com/2011/05/27/internet-disaster-preparedness.html</link>
      <pubDate>Fri, 27 May 2011 00:00:00 -0700</pubDate>
      <author>cameron@cameronspickert.com (Cameron Spickert)</author>
      <guid>http://cameronspickert.com/2011/05/27/internet-disaster-preparedness</guid>
      <description>&lt;p&gt;Most people don&amp;#8217;t worry about keeping themselves safe online. However, like backing up your files, it&amp;#8217;s something that many only realize they need when it&amp;#8217;s too late.&lt;/p&gt;

&lt;p&gt;Yesterday, a friend of mine met with an unpleasant surprise when she logged into her iTunes account: someone had gained access to her account, and had made a $100 purchase using her credit card. While this charge can and will be quickly revoked, she faces a more serious problem. Like most people, she uses the same password for many other accounts online, meaning that her other accounts could also be compromised.&lt;/p&gt;

&lt;p&gt;First, let&amp;#8217;s look at a couple of the possible ways she could have gotten hacked:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;She is a victim of &lt;a href='http://en.wikipedia.org/wiki/Session_hijacking'&gt;session hijacking&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Many sites use &lt;a href='http://en.wikipedia.org/wiki/HTTP_Secure'&gt;HTTPS&lt;/a&gt; to protect their users&amp;#8217; data from being intercepted by a third party. However, many sites still use the faster, but less secure HTTP protocol. Using tools like the widely publicized &lt;a href='http://codebutler.com/firesheep'&gt;Firesheep&lt;/a&gt;, attackers can take control of a user&amp;#8217;s login session. While most sites wouldn&amp;#8217;t allow them to change the account password without access to a registered email account, they could still access sensitive information and generally wreak havoc. As more sites adopt the use of HTTPS by default, this will become less of a problem, but a universal solution has not yet been implemented.&lt;/p&gt;

&lt;p&gt;In order to protect yourself from this kind of attack, you should do the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Think twice before accessing an HTTP-only service on a public wi-fi network. You can tell if you&amp;#8217;re using HTTP or HTTPS by looking at the beginning of the URL in your browser&amp;#8217;s address bar (&lt;code&gt;http://...&lt;/code&gt; vs. &lt;code&gt;https://...&lt;/code&gt;).&lt;/li&gt;

&lt;li&gt;Enable HTTPS as the default protocol on sites that offer the option. For example, in Facebook, go to your account settings and enable &amp;#8220;Secure Browsing (https)&amp;#8221; under &amp;#8220;Account Security&amp;#8221;.&lt;/li&gt;

&lt;li&gt;Use a secure proxy service like &lt;a href='http://www.the-cloak.com/anonymous-surfing-faq.html'&gt;the cloak&lt;/a&gt; or similar, or (for more advanced users), &lt;a href='http://en.wikipedia.org/wiki/Tunneling_protocol#Secure_Shell_tunneling'&gt;tunnel your traffic to a trusted server via SSH&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As with all of these attacks, if you become a victim, you should change your password immediately.&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The attacker knows her password, either by guessing or by exploiting a vulnerability in another site.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is by far the most dangerous situation. It&amp;#8217;s only likely to happen if you use the same password for many sites, but this is, unfortunately, the case for many people. Let me put this as simply as I can: &lt;strong&gt;you should not rely on sites to keep your password safe&lt;/strong&gt;. Recently, users registered on the Gawker network &lt;a href='http://www.slate.com/id/2277768/'&gt;learned this the hard way&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The best way to protect yourself against site vulnerabilities is to use a different password for every account you register. It&amp;#8217;s not as hard as you might expect, and there are a lot of different utilities out there that make it very easy to do. I use a combination of &lt;a href='http://code.google.com/p/oplop/wiki/HowItWorks'&gt;oplop&lt;/a&gt; and &lt;a href='http://agilebits.com/onepassword'&gt;1Password&lt;/a&gt;. Both of these utilities rely on the idea of a single &amp;#8220;master&amp;#8221; password that you memorize, but instead of exposing this master password to the outside world by using it to register accounts, you use it to generate and protect your set of unique, account-specific passwords, none of which are important to memorize. It&amp;#8217;s an extremely secure system, and very convenient once you get used to it.&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The attacker found and exploited a security vulnerability in iTunes that allowed him/her to gain access to the account.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is similar to the situation above, and the only way to protect yourself is to change your account password. If the service you&amp;#8217;re using is unreliable, you should strongly consider removing all personal information from your account and using something else.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In all situations, the best thing you can do is change your password(s), and be eternally skeptical any time a site guarantees the safety of your information. With our increased reliability on internet services to accomplish vital tasks like online banking, it is &lt;em&gt;always&lt;/em&gt; a good idea to be overly cautious.&lt;/p&gt;

&lt;p&gt;Also, I could write an entirely different post about this, but continuing in the spirit of being prepared for disasters: &lt;strong&gt;go back up your important files NOW&lt;/strong&gt;. With free services like &lt;a href='https://www.dropbox.com/'&gt;Dropbox&lt;/a&gt; readily available, you have no more excuses not to.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Music is Life is Music</title>
      <link>http://cameronspickert.com/2011/02/04/music-is-life-is-music.html</link>
      <pubDate>Fri, 04 Feb 2011 00:00:00 -0800</pubDate>
      <author>cameron@cameronspickert.com (Cameron Spickert)</author>
      <guid>http://cameronspickert.com/2011/02/04/music-is-life-is-music</guid>
      <description>&lt;p&gt;I got the title from some random ad in &lt;a href=&quot;http://foursquare.com/venue/69964&quot;&gt;my subway station&lt;/a&gt;, but it’s kind of true. Music has been an integral part of my life from piano lessons—for about 8 years of my life—to singing in high school and college, to playing guitar and listening to music on my iPhone and computer just about 24/7. Programming, traveling, relaxing: music plays a part in nearly everything I do.&lt;/p&gt;
&lt;p&gt;In all the ways I’ve interacted with music, one mode has affected me more than all the others: being at concerts. Back in middle school, I saw Tom Petty at Red Rocks, and I’ve been absolutely addicted ever since. Unfortunately, rather than satisfying that addiction, I’ve spent most of my time having withdrawals and flashbacks to the last great show. It’s not that the Denver area hasn’t historically attracted some big names—the Beatles even made a stop at Red Rocks on their 1964 world tour—and I certainly had a decent selection while I was in Boston. It’s just been all too easy for life and school to get in the way.&lt;/p&gt;
&lt;p&gt;One of the great things about living in New York is that almost every artist I currently listen to has performed in the city during the time I’ve lived here (since June 2010). Add decent public transportation to an abundance of great concerts, and you get a recipe for awesome. Or spending a lot of money on concert tickets. Or both.&lt;/p&gt;
&lt;p&gt;It’s true, concerts are loud (sometimes eardrum-splittingly so), crowded, messy and expensive. But there’s really nothing quite like hearing your favorite songs being played by their creators &lt;em&gt;for you&lt;/em&gt;, and for me, there’s no expense too great to have that. This is one addiction I don’t plan on giving up for the rest of my life.&lt;/p&gt;
&lt;p&gt;In case anyone is curious/cares, here is basically every major concert I’ve been to:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Tom Petty and the Heartbreakers&lt;/strong&gt; (Red Rocks Amphitheater - Morrison, CO)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Weird Al Yankovic&lt;/strong&gt; (Pepsi Center - Denver, CO)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interpol&lt;/strong&gt; (Fillmore Auditorium - Denver, CO)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Death Cab for Cutie&lt;/strong&gt; (Fillmore Auditorium - Denver, CO)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Foo Fighters&lt;/strong&gt; &amp;amp; &lt;strong&gt;Weezer&lt;/strong&gt; (Pepsi Center - Denver, CO)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Paul McCartney&lt;/strong&gt; (Pepsi Center - Denver, CO)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kid Sister&lt;/strong&gt;, &lt;strong&gt;The Cool Kids&lt;/strong&gt; &amp;amp; &lt;strong&gt;Kanye West&lt;/strong&gt; (American Museum of Natural History - New York, NY)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Third Eye Blind&lt;/strong&gt; (Harvard Yard - Cambridge, MA)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MIA&lt;/strong&gt; (Worcester, MA)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Black Kids&lt;/strong&gt; (Boston, MA)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wu Tang Clan&lt;/strong&gt; (Harvard Yard - Cambridge, MA)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Jason Mraz&lt;/strong&gt; (Orpheum Theatre - Boston, MA)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bob Dylan&lt;/strong&gt; (Wang Theatre - Boston, MA)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ratatat&lt;/strong&gt; (Harvard Yard - Cambridge, MA)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Flaming Lips&lt;/strong&gt; (Terminal 5 - New York, NY)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Robyn&lt;/strong&gt; (Radio City Music Hall - New York, NY)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interpol&lt;/strong&gt; (2/17/11 - Radio City Music Hall - New York, NY)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cold War Kids&lt;/strong&gt; (Radio City Music Hall - New York, NY)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fleet Foxes&lt;/strong&gt; (United Palace Theatre - New York, NY)&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    

  </channel> 
</rss>

