James Chevalier http://blog.jameschevalier.us 2014-05-12T23:09:25-04:00 http://blog.jameschevalier.us James Chevalier Copyright (c) 2011-2012 James Chevalier Donoku http://blog.jameschevalier.us/donoku/ 2013-12-17T00:00:00-05:00 2013-12-17T00:00:00-05:00 http://blog.jameschevalier.us/donoku/ <p>I poked around at my first Sinatra project the other day: <a href="https://github.com/JamesChevalier/donoku">Donoku</a>. It's a simple two-page site to take donations through <a href="https://stripe.com/">Stripe</a> <a href="https://stripe.com/blog/stripe-checkout">Checkout</a>. It's built to be deployed to <a href="https://heroku.com">Heroku</a> &amp; forces SSL, since Heroku gives its "appname.herokuapp.com" domains SSL access for free.</p> <p>I've already used Donoku twice on my own! Once to accept donations for <a href="http://citystrides.com">CityStrides</a>, and once to accept donations for my <a href="http://jimforward6.com">campaign</a> to be Holyoke's Ward 6 City Councilor.</p> <p> To force SSL, I used the <a href="http://rubygems.org/gems/rack-ssl-enforcer">rack-ssl-enforcer</a> gem. It's really simple to use... Just add the gem to your Gemfile, then require it in your app.rb file &amp; add a single line to require SSL everywhere outside of localhost &amp; the test environment:<br /> <div class="highlight"><pre><code class="ruby"> <span class="nb">require</span> <span class="s1">&#39;rack/ssl-enforcer&#39;</span> <span class="n">use</span> <span class="no">Rack</span><span class="o">::</span><span class="no">SslEnforcer</span><span class="p">,</span> <span class="n">except_hosts</span><span class="p">:</span> <span class="sr">/127.0.0.1$/</span><span class="p">,</span> <span class="ss">:except_environments</span> <span class="o">=&gt;</span> <span class="s1">&#39;test&#39;</span> </code></pre></div> You can see it in action at the top of <a href="https://github.com/JamesChevalier/donoku/blob/master/app.rb">Donoku's app.rb file</a>. </p> <p>There's a little bit of a <a href="http://mailchimp.com/">MailChimp</a> integration, as well. After the donation goes through, people are directed to the 'thank you' page that includes a mailing list signup form. There's nothing crazy going on, but it works.</p> <p>It's also one of my first attempts at using <a href="http://rubygems.org/gems/minitest">MiniTest</a> instead of <a href="http://rubygems.org/gems/rspec">rspec</a>. I like it just fine, but the familiarity that I have with rspec keeps me moving faster & the abundence of rspec documentation online gets me un-stuck quicker. I'm glad I tried it, but I'll be sticking with rspec (and might even switch Donoku over at some point).</p> How to make SublimeLinter work with Ruby & RVM http://blog.jameschevalier.us/how-to-make-sublimelinter-work-with-ruby-rvm/ 2012-12-28T00:00:00-05:00 2012-12-28T00:00:00-05:00 http://blog.jameschevalier.us/how-to-make-sublimelinter-work-with-ruby-rvm/ <p>If you're using SublimeLinter with Sublime Text 2 on Rails projects using RVM, then you might have noticed some lines are displayed as being errors when they're actually not.</p> <p><img src="/assets/attachments/linter.png" alt="format.html lines are reported as containing errors" border="0" title="Example SublimeLinter False Positive"/></p> <p>This is because SublimeLinter is using the system ruby, instead of the ruby for your gemset. See, the Ruby linter that SublimeLinter uses is extremely simple. It just runs the code through <code>ruby -wc</code> and marks any output in the code. But that's the problem. Sublime Text 2 isn't using the <code>ruby</code> that your Rails app uses.</p> <p> You can change the SublimeLinter settings to correct this issue by opening the <code>Sublime Text 2</code> menu, going into Preferences -> Package Settings -> SublimeLinter, and selecting <code>Settings - User</code>. Add this text to the file, save it, and restart Sublime Text 2: <br /> <script src='https://gist.github.com/4404298.js?file=SublimeLinter.sublime-settings'></script><noscript><pre><code></code></pre></noscript> </p> <p> The old way we had to fix this problem was to go through the package files themselves: <ul> <li>Hold the option key down</li> <li>Click the <code>Go</code> menu in Finder</li> <li>Select <code>Library</code></li> <li>Navigate into <code>Application Support/Sublime Text 2/Packages/SublimeLinter/sublimelinter/modules</code></li> <li>Open the file <code>ruby.py</code> in Sublime Text 2</li> <li>Change line 10 from <code>'executable': 'ruby',</code> to <code>'executable': '/Users/YOUR-USER-NAME/.rvm/bin/rvm-auto-ruby',</code></li> <li>Restart Sublime Text 2</li> </ul> </p> <p>The drawback to this workaround was that if/when SublimeLinter was updated, you would lose this edit. Good thing we don't need to worry about that, anymore!</p> The tech behind getting Blizzalert into its third season http://blog.jameschevalier.us/the-tech-behind-getting-blizzalert-into-its-third-season/ 2012-12-09T00:00:00-05:00 2012-12-09T00:00:00-05:00 http://blog.jameschevalier.us/the-tech-behind-getting-blizzalert-into-its-third-season/ <p>I've re-launched <a href="https://blizzalert.com" target="_blank">Blizzalert</a> for its third season!</p> <p>Blizzalert is a web service that provides snowfall omniscience via SMS. It monitors the weather at over <a href="https://blizzalert.com/mountains" target="_blank">400 mountains</a> across the United States, keeping track of snowfall. You select which mountains you want to watch, and Blizzalert sends text messages letting you know how much snow is coming, where, and when - all before it happens. I wrote a bit about the internals in my post <a href="http://blog.jameschevalier.us/never-miss-new-snow-with-blizzalert/">Never Miss New Snow With Blizzalert</a>.</p> <p>This re-launch is exciting, because I've completely re-written the site &amp; service. It's now a <a href="http://rubyonrails.org/" target="_blank">Ruby on Rails</a> app, and I'm using <a href="http://foundation.zurb.com" target="_blank">Foundation</a> to make the site responsive - it looks great on desktop computers, tablets, and phones.</p> <p>Blizzalert still uses the <a href="http://www.weather.gov/" target="_blank">National Oceanic and Atmospheric Administration</a>'s <a href="http://graphical.weather.gov/xml/" target="_blank">API</a> to monitor the weather at all of the areas, and it still uses <a href="http://www.twilio.com/" target="_blank">Twilio</a> to send text messages to customers. The rest of the site is completely overhauled, because of my migration from <a href="http://php.net/" target="_blank">PHP</a>/<a href="http://codeigniter.com" target="_blank">CodeIgniter</a> to Ruby on Rails.</p> <p> I was able to use a number of <a href="http://rubygems.org/" target="_blank">Ruby gems</a> to make development easier. Here are some of the gems that were particularly helpful, and how they helped: <ul> <li><a href="http://rubygems.org/gems/airbrake" target="_blank">airbrake</a><br /><em>Send your application errors to our hosted service and reclaim your inbox.</em><br />I'm using the airbrake gem, and sending all of my error logs to my own instance of <a href="https://github.com/errbit/errbit" target="_blank">Errbit</a> that I've got running on <a href="http://www.heroku.com/" target="_blank">Heroku</a>. Errbit is indispensible for running Rails apps - use it or something like it to make error handling in production a snap.</li> <li><a href="http://rubygems.org/gems/combined_time_select" target="_blank">combined_time_select</a><br /><em>Generates a time_select field like Google calendar.</em><br />This was pretty useful for creating a nice form for time input, which I need to give people a way to choose their earliest blizzalert time.</li> <li><a href="http://rubygems.org/gems/newrelic_rpm" target="_blank">newrelic_rpm</a><br /><em>New Relic is a performance management system, developed by New Relic, Inc. New Relic provides you with deep information about the performance of your web application as it runs in production. The New Relic Ruby Agent is dual-purposed as a either a Gem or plugin.</em><br />If you're building/running a site, you need to be using New Relic. The visibility into your app/server that this service provides is amazing, and web developers are blind without it.</li> <li><a href="http://rubygems.org/gems/phone" target="_blank">phone</a><br /><em>Phone number parsing, validation and formatting.</em><br />This was really useful to normalize all phone numbers coming into Blizzalert, and for displaying them nicely on user pages.</li> <li><a href="http://rubygems.org/gems/stripe" target="_blank">stripe</a><br /><em>Stripe is the easiest way to accept payments online.</em><br />I still can't get over how easy it is to use stripe. At this point, I wouldn't consider another service to accept payments oneline.</li> <li><a href="http://rubygems.org/gems/stripe_event" target="_blank">stripe_event</a><br /><em>Stripe webhook integration for Rails applications.</em><br />By adding this gem, I get to handle stripe webhooks with simple blocks right from the initializer file. It would have been much more time consuming to handle all of that on my own!</li> <li><a href="http://rubygems.org/gems/twilio-ruby" target="_blank">twilio-ruby</a><br /><em>A simple library for communicating with the Twilio REST API, building TwiML, and generating Twilio Client Capability Tokens</em><br />This gem made Twilio integration easy.</li> <li><a href="http://rubygems.org/gems/whenever" target="_blank">whenever</a><br /><em>Clean ruby syntax for writing and deploying cron jobs.</em><br />This gem allowed me to easily add/modify cronjobs right from the Rails app. I don't work with cron directly, any more. Now, I just edit the whenever's configuration file &amp; <a href="http://capistranorb.com/" target="_blank">capistrano</a> handles the rest during deploy.</li> </ul> </p> Little-Corner is now a Heroku-ready Rails app http://blog.jameschevalier.us/little-corner-is-now-a-Heroku-ready-Rails-app/ 2012-11-03T00:00:00-04:00 2012-11-03T00:00:00-04:00 http://blog.jameschevalier.us/little-corner-is-now-a-Heroku-ready-Rails-app/ <p><a href="https://github.com/JamesChevalier/Little-Corner" target="_blank">Little-Corner</a> is an open source project of mine that you can use to easily make yourself a website. It automaticlaly pulls your entire web presence into one place, like <a href="http://about.me" target="_blank">About.me</a> or <a href="http://flavors.me" target="_blank">Flavors.me</a>. Currently it supports connecting to <a href="http://delicious.com" target="_blank">Delicious</a>, <a href="http://foursquare.com" target="_blank">Foursquare</a>, <a href="http://github.com" target="_blank">GitHub</a>, <a href="http://www.google.com/analytics/" target="_blank">Google Analytics</a>, <a href="http://gravatar.com" target="_blank">Gravatar</a>, <a href="http://instagram.com" target="_blank">Instagram</a>, <a href="http://last.fm" target="_blank">Last.FM</a>, <a href="http://soundcloud.com" target="_blank">Soundcloud</a>, <a href="http://twitter.com" target="_blank">Twitter</a>, and your blog (via RSS).</p> <p>I've updated Little-Corner to use <a href="http://rubyonrails.org/" target="_blank">Ruby on Rails</a>. It used to be written in PHP and used <a href="http://codeigniter.com" target="_blank">CodeIgniter</a>, which I <a href="http://blog.jameschevalier.us/little-corner-my-open-source-project-to-make-you-a-better-website/">previously wrote about</a>. The move to Ruby on Rails will make it easier for me to maintain, and easier for you to get it online.</p> <p>It also now uses Zurb's <a href="http://foundation.zurb.com" target="_blank">Foundation</a> as its design framework. By using Foundation, your website is automatically a responsive site that looks great on computers, tablets, and phones. I've slightly modified it to use a single large image as the site's background, and to add transparency to panels. The transparency allows your background image to be seen through the content being displayed, and maintains the comfortable black-text-on-white-background view.</p> <p>Getting the app online is easy, too, because it's easily deployable to <a href="http://heroku.com">Heroku</a>. You could also modify it to deploy to your own server (like I do, to run it on my <a href="http://www.linode.com/?r=4b85e2ea3c6b78b139cc41e341ae37fdac438c54" target="_blank">Linode</a> instance).</p> Sip as a replacement for Pick as a replacement for Digital Color Meter in Mac OS X http://blog.jameschevalier.us/sip-as-a-replacement-for-pick-as-a-replacement-for-digital-color-meter-in-mac-os-x/ 2012-10-14T00:00:00-04:00 2012-10-14T00:00:00-04:00 http://blog.jameschevalier.us/sip-as-a-replacement-for-pick-as-a-replacement-for-digital-color-meter-in-mac-os-x/ <p><a href="/thoughts/pick-as-a-replacement-for-digital-color-meter-in-mac-os-x-lion/">This</a> is getting to be a bit ridiculous, so I hope <a href="http://click.linksynergy.com/fs-bin/click?id=vwHUN9G4nyY&amp;subid=&amp;offerid=146261.1&amp;type=10&amp;tmpid=3909&amp;RD_PARM1=https%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fsip%2Fid507257563%3Fmt%3D12" target="_blank">Sip</a> is here to stay.</p> <p>Since Digital Color Meter no longer provides Hex values for colors, we need a specialized app for this. We need something that will allow us to click on any color on the screen - regardless of which app it's in - in order to get its Hex color code.</p> <p><a href="http://click.linksynergy.com/fs-bin/click?id=vwHUN9G4nyY&amp;subid=&amp;offerid=146261.1&amp;type=10&amp;tmpid=3909&amp;RD_PARM1=https%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fsip%2Fid507257563%3Fmt%3D12" target="_blank">Sip</a> allows you to type ⌃⌥P to turn your cursor into a color picker. When you click on a color, a nice little plinky sound plays &amp; the color code is copied to your clipboard.</p> <p style="text-align:center;"><img title="Sip" src="//assets/attachments/sip.png" alt="" /><br /><small>Sip Color Picker</small></p> <p>You have a huge selection of color formats to choose from - you aren't limited to just CSS Hex. A few of the color formats look like they would be useful for iOS developers. They keyboard shortcuts are customizable, and allow you to switch through previously sipped colors.</p> <p>The code that's copied to your clipboard is customizable, as well (all caps, whether the # prefix is included, etc). This is useful, as some code editors will highlight the # when a color code is double-clicked and some only select the code itself.</p> <p>You can also choose how much of a history to keep saved in the menu (this defaults to 10). This makes it very easy to spend some time collecting colors, then spend some time using those colors - rather than forcing yourself to go back &amp; forth one at a time.</p> <p>The magnifier size is customizable from a choice of small, medium, and large (more like small, large, and Woah). The amount of magnification that occurs is dependent on the size of the magnifier, so you're going to get a more detailed color picker by using the Woah sized magnifier.</p> <p>So, for now at least, <a href="http://click.linksynergy.com/fs-bin/click?id=vwHUN9G4nyY&amp;subid=&amp;offerid=146261.1&amp;type=10&amp;tmpid=3909&amp;RD_PARM1=https%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fsip%2Fid507257563%3Fmt%3D12" target="_blank">Sip</a> is what I use to grab the Hex code throughout Mac OS X.</p> Launch Soon is a Heroku-ready viral Coming Soon page http://blog.jameschevalier.us/launch-soon-is-a-heroku-ready-viral-coming-soon-page/ 2012-10-08T00:00:00-04:00 2012-10-08T00:00:00-04:00 http://blog.jameschevalier.us/launch-soon-is-a-heroku-ready-viral-coming-soon-page/ <p>Launch Soon is a project of mine that allows you to quickly and easily set up a Coming Soon page. It collects email addresses in a <a href="http://mailchimp.com" target="_BLANK">Mailchimp</a> list, and provides users with a custom link that they can share with others. When someone signs up from a custom link, the referral is tallied in the Mailchimp list. This gives the site owners the ability to see who is referring the most traffic, and contact them separately through Mailchimp Segments.</p> <p>I originally created the open source <a href="http://launchrock.com/" target="_BLANK">LaunchRock</a> clone in PHP, and wrote about it <a href="/web-project/my-open-source-viral-launching-soon-project/">here</a>. I decided to rewrite the site to use Ruby on Rails so that I could make it even easier for people to get running. This can now easily be run for free on Heroku, hooks directly into Mailchimp, and doesn't use a database at all.</p> <p>I decided to use Mailchimp as the only data store so that all the data needed to contact interested users is in one place. This makes the Mailchimp list much more powerful, and removes the need for an admin interface to Launch Soon. With all of this in place, your Coming Soon page is completely disposable - as it should be.</p> <p>You can see an example of it running at <a href="http://launch-soon-example.herokuapp.com">http://launch-soon-example.herokuapp.com</a>.</p> <p>The actual project and the instructions for getting it running is up on GitHub <a href="https://github.com/JamesChevalier/Launch-Soon" target="_BLANK">here</a>. Contributions are welcome, so feel free to submit pull requests! Talk to me <a href="http://twitter.com/JamesChevalier" target="_BLANK">on Twitter</a> or contact me through <a href="http://jameschevalier.us/contact" target="_BLANK">my site</a> if you have any questions.</p> How to Use Console to view the log files for your Rails App http://blog.jameschevalier.us/how-to-use-console-to-view-the-log-files-for-your-rails-app/ 2012-07-16T00:00:00-04:00 2012-07-16T00:00:00-04:00 http://blog.jameschevalier.us/how-to-use-console-to-view-the-log-files-for-your-rails-app/ <p>By viewing the log for your Rails app from within Console, you can quickly clear your view of the log between tests so that you don't have to sift through irrelevant data. Just use the <strong>Clear Display</strong> button before accessing the site. It's non-destructive, so navigating away from the log file &amp; then viewing it again will display the entire log file. You can also delete the log file right from Console to keep it from getting out of hand.</p> <p>If you're using Pow, run these commands in the Terminal: <div class="highlight"><pre><code class="bash"><span class="nb">cd</span> ~/Library/Logs/Pow/apps ln -s /path/to/your/rails/app/log name-of-your-rails-app </code></pre></div> </p> <p>Now you can view the logs in Console under the FILES section in ~/Library/Logs/Pow/apps/name-of-your-rails-app/development.log</p> <p>If you're not using Pow (<a title="You're not using Pow?!" href="/thoughts/pow-makes-multi-site-rails-apps-easy/">you're not using Pow?!</a>), run these commands in the Terminal: <div class="highlight"><pre><code class="bash"><span class="nb">cd</span> ~/Library/Logs mkdir Rails <span class="nb">cd </span>Rails ln -s /path/to/your/rails/app/logs name-of-your-rails-app </code></pre></div> </p> <p>Now you can view the logs in Console under the FILES section in ~/Library/Logs/Rails/name-of-your-rails-app/development.log</p> <h5>Update:</h5> <p>Mountain Lion removed the feature of Console being able to display symlinked folders. I've looked around for another way to add folders to Console, but I haven't found anything really useful yet.</p> <p>The only fix I have at the moment is to ⌘-o within Console, navigate into the symlink in Pow's log folder, and open the development.log file. This will keep the file open in Console, at the bottom of the log list. It's a serious pain for anyone with multiple Rails apps, though, because then they're all listed in Console as 'development.log'.</p> How do you keep at it like that? http://blog.jameschevalier.us/how-do-you-keep-at-it-like-that/ 2012-06-20T00:00:00-04:00 2012-06-20T00:00:00-04:00 http://blog.jameschevalier.us/how-do-you-keep-at-it-like-that/ <p>Noel wrote a post, <a href="http://noelstjean.tumblr.com/post/25441553620" title="'Is it really necessary?' and other (similar) questions" target="_blank">"Is it really necessary?" and other (similar) questions</a>, about parents of dance students always asking if the next class or event is required. The perspective struck me - that "Do I Have To?" response to an obligation - and it got me thinking about how people handle large goals...</p> <p>For example, I often hear how others can't believe I keep running as much as I do. I'm training for a half marathon, so I'm running pretty frequently and setting personal bests on my mileage. Even so - I don't get the feeling that they think I run an <em>inhuman</em> distance, or that my schedule is completely <em>incomprehensible</em> to them. The feeling that I get, when I hear them congratulate me on my hard work in that manner, is that they think they wouldn't be able to keep themselves from slacking off while working towards the goal.</p> <p>That they wouldn't be able to keep from asking themselves 'Do I have to?'.</p> <p>That they wouldn't be able to tell themselves 'Yes.' each time they asked themselves 'Do I have to?'.</p> <p>I was thinking earlier today, after my run, about how we spend the first two years of our lives figuring out <a href="http://en.wikipedia.org/wiki/Object_permanence" title="object permanence" target="_blank">object permanence</a> &amp; the rest of our lives trying to come to grips with <a href="http://en.wikipedia.org/wiki/Impermanence" title="impermanence" target="_blank">impermanence</a>. Now, after reading Noel's post, I'm thinking about how so much that we observe/learn as children affects our behavior later in life. Maybe many of us figured out how to question the necessity of each of the individual steps that go into attaining a larger goal to such a debilitating extent that we prohibit ourselves from attaining our goals. And from the perspective of Noel's post, I wonder how many of us figured that out by watching our parents talk to our teachers.</p> <p>You have a goal. You have the steps required to reach that goal. All of the steps are required.</p> How to add auto-completion to git http://blog.jameschevalier.us/how-to-add-auto-completion-to-git/ 2012-06-15T00:00:00-04:00 2012-06-15T00:00:00-04:00 http://blog.jameschevalier.us/how-to-add-auto-completion-to-git/ <p>Sometimes git projects can have a lot of different branches, and you might need to frequently check out different branches. It can be tedious to write out the entire branch name every time (especially if you tend to have longer branch names). Luckily, there's a fix for that: git auto-complete.</p> <p>You'll need to make the file <strong>git-completion.bash</strong> permanently available to your .bash_profile file. The easiest way to do that is to copy the file into your home directory as .git-completion. Here are the three easiest methods to copy that file into place - choose the one method that you're most comfortable with...</p> <h4>A) With cURL:</h4> <p><div class="highlight"><pre><code class="bash">curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion </code></pre></div></p> <h4>B) With wget:</h4> <p>Install wget, if you don't already have it: <div class="highlight"><pre><code class="bash">brew install wget </code></pre></div></p> <p>Use this command to create the <strong>.git-completion</strong> file: <div class="highlight"><pre><code class="bash">wget https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -O ~/.git-completion </code></pre></div></p> <h4>C) Manually:</h4> <p>Go to the URL <a href="https://raw.github.com/git/git/master/contrib/completion/git-completion.bash" title="https://raw.github.com/git/git/master/contrib/completion/git-completion.bash" target="_blank">https://raw.github.com/git/git/master/contrib/completion/git-completion.bash</a>, and save the file as .git-completion in your home directory.</p> <p>With that file in place, you'll need to edit your ~/.bash_profile file with your editor of choice. Just add this line to the end of the file: <div class="highlight"><pre><code class="bash"><span class="nb">source</span> ~/.git-completion </code></pre></div></p> <p>After saving the .bash_profile changes, you will need to quit Terminal then re-open it for the changes to take place. Alternatively, you can run this command to force the changes without restarting Terminal: <div class="highlight"><pre><code class="bash"><span class="nb">source</span> ~/.profile </code></pre></div></p> <p>Now branch names are auto-completed in Terminal! If you have a branch named "some-other-new-feature" (and let's assume for this example that you have no other branches that start with the letter s) then you can check out the branch with <code>git chec&lt;tab&gt; s&lt;tab&gt;</code>, which will auto-complete both of the <code>&lt;tab&gt;</code> keystrokes out to <code>git checkout some-other-new-feature</code>.</p> Pow makes multi-site Rails apps EASY http://blog.jameschevalier.us/pow-makes-multi-site-rails-apps-easy/ 2012-06-13T00:00:00-04:00 2012-06-13T00:00:00-04:00 http://blog.jameschevalier.us/pow-makes-multi-site-rails-apps-easy/ <p>I wrote my first blog post at <a href="http://commonmediainc.com" TARGET="_blank">work</a> the other day. It's about how to serve multi-site Rails apps (where one Rails app serves multiple different sites that are available at different domains), and how to use <a href="http://pow.cx" TARGET="_blank">Pow</a> to make it easy.</p> <p>The whole thing really stemmed from my own question on <a href="http://stackoverflow.com" TARGET="_blank">Stack Overflow</a>, where I asked if it was possible to use Pow's .powrc file to pass session variables to Rails based on the URL being accessed. It turns out that I conceptualized the action (determining the URL being accessed) in the wrong place - it's better to do that on the Rails side, not on Pow's side. Anyway, you can read all about that <a href="http://stackoverflow.com/questions/10954945/is-it-possible-to-use-the-powrc-file-to-pass-session-variables-to-rails-based-o" TARGET="_blank">here</a>.</p> <p>The end result is a description of how to use one Rails app to host multiple sites, how to switch between the different sites, and then how to automate the whole thing so you don't have to manually change the sites that Rails serves. If you're into that sort of thing, you can read it <a href="http://commonmediainc.com/blog/how-serve-multi-site-rails-apps-and-use-pow-make-it-easy" TARGET="_blank">here</a>.</p> I put together the site for JeffreyB Photography http://blog.jameschevalier.us/i-put-together-the-site-for-jeffreyb-photography/ 2012-03-30T00:00:00-04:00 2012-03-30T00:00:00-04:00 http://blog.jameschevalier.us/i-put-together-the-site-for-jeffreyb-photography/ <p>I spent my free time from Monday March 26th to Friday March 30th putting together the website for one of the best photographers in Holyoke - Jeffrey Byrnes. It's live now at <a href="http://jeffreybphotography.com" title="JeffreyB Photography" target="_blank">http://jeffreybphotography.com</a>.</p> <p>Jeff had been struggling with his site for a while, because of how difficult it can be to get the code right. It's especially important for his site because of how much it relies on the presentation - his work <strong>is</strong> the imagery, after all. So, I created the site with two major areas of focus:</p> <ol> <li><strong>The site should be easy to use.</strong> He's a photographer - he should be making &amp; displaying photographs, not fiddling with lines of code to get webpages to display correctly.</li> <li><strong>The site should highlight his photographs as strongly as possible.</strong> Jeff's work is visually impacting, so I really felt that the site needed to get out of the way of his images as much as possible.</li> </ol> <p>I used <a href="http://buildinternet.com/" title="BuildInternet" target="_blank">BuildInternet's</a> <a href="http://www.buildinternet.com/project/supersized/" title="BuildInternet's Supersized jQuery plugin" target="_blank">Supersized jQuery plugin</a> as the basis for the overall site design as well as the slideshow functionality. I had originally chose to work with the Supersized jQuery plugin because of its full-screen slideshow. It sets the image to the full size of the browser, and includes a small set of controls at the bottom of the screen ... nothing more. This was perfect for one of my focuses - the site getting out of the way of the images. After working with the plugin a bit more, I realized that it had the capability of hooking into Flickr. That's when I realized it was also a perfect fit for my other focus - Jeff already used Flickr extensively, and in a very organized fashion.</p> <p>I did have to make some modifications to the plugin, though. Originally, there were some UI elements that sat on top of the images - these provided forward/backward navigation through the image slideshows. I also didn't want to complicate the controls by including a set of navigation for thumbnails (basically, a second area of navigation on top of the existing full-size image navigation - it just made things a little more apparent than I wanted them to be for this site). So, after modifying the control set at the bottom of the page, I was ready to figure out how to display the pages that required a bit more content...</p> <p>The About, Contact, and Projects pages are all single-image pages with their own content. I didn't want to give up the ascetic of the site for these three pages, so I needed to figure out a way to overlay the content onto the page. I was lucky, because I had already figured out a way to accomplish this a few months ago - I even had two ways to do this. <p>One by using a set of layered divs:</p> <script src='https://gist.github.com/1506483.js?file=transparency.html'></script><noscript><pre><code></code></pre></noscript> <p>One by using CSS3 rgba backgrounds:</p> <script src='https://gist.github.com/1506869.js?file=transparency.html'></script><noscript><pre><code></code></pre></noscript> <p>I plugged in my code &amp; had some awesome opaque boxes for the content to sit in - perfect - you can read the content just fine, and the background image still comes through.</p> <p>Maintaining the site can't get much easier for Jeff, either - which was my other area of focus. Now he doesn't have to fight with code, and his overall workflow isn't changed either. All he has to do is maintain his Flickr Sets, which he does anyway. The site automatically connects into his Flickr account through the Flickr API to display the correct set of images for each page - it goes so far as to allow him to modify his Flickr Sets &amp; have his changes be visible on his site <strong>immediately</strong>.</p> <p>While working with that Flickr connection, I found a bug in how the plugin attempted to get the owner of Flickr photos. This was causing all of the photo links to go to error pages on Flickr, instead of the photo's Flickr page. Supersized is open source software that's hosted on <a href="https://github.com" title="GitHub" target="_blank">GitHub</a>, so I was able to submit <a href="https://github.com/buildinternet/supersized/pull/66" title="My Supersized Flickr Fix" target="_blank">the fix</a> that I came up with.</p> <p>This was an exciting project for me because of its pace, because of how easy it is to work with Jeff, and because of how much impact my work has (and will have) on everyone who comes to Jeff's site to appreciate his work.</p> <p>JeffreyB Photography is located in the heart of downtown Holyoke. If you need photos, you need Jeff - you can get his contact information right from his <a href="http://jeffreybphotography.com/contact" title="Contact JeffreyB Photography" target="_blank">amazing website</a>. ;-)</p> Make a GitHub Project Page that's an exact mirror of your Master branch http://blog.jameschevalier.us/make-a-github-project-page-thats-an-exact-mirror-of-your-master-branch/ 2012-01-31T00:00:00-05:00 2012-01-31T00:00:00-05:00 http://blog.jameschevalier.us/make-a-github-project-page-thats-an-exact-mirror-of-your-master-branch/ <p>GitHub has a <a href="http://pages.github.com/" target="_blank">Project Pages</a> feature that creates a webpage based on the content of the gh-pages branch of a repository. I asked, and subsequently answered, the question of how to get the Project Page to be an exact mirror of the Master branch over on <a href="http://stackoverflow.com/questions/9069165/can-i-make-the-gh-pages-branch-of-my-git-repository-a-mirror-of-the-master-branc" target="_blank">Stack Overflow</a>.</p> <p>One way I <a href="http://stackoverflow.com/questions/1705224/github-how-to-include-files-from-master-in-new-git-branch-gh-pages" target="_blank">found</a> is to run the following command, which sets a configuration setting that causes every subsequent instance of <code>git push</code> to push the Master branch of the repository into the gh-pages branch: <code>git config --add remote.origin.push +refs/heads/master:refs/heads/gh-pages</code></p> <p>The trouble with this solution is that I'm using the <a href="http://mac.github.com/" target="_blank">GitHub Mac App</a>, which doesn't use a strict <code>git push</code>. According to <a href="http://mac.github.com/help.html" target="_blank">their Help page</a>, it does a <code>git pull --rebase</code>. Additionally, even when I select Push from the Repository menu, my git config line isn't adhered to. I'm not sure what's up with that...</p> <p>I ran through a bunch of my own tests, trying to figure out how this branch mirroring can be done in a GitHub-For-Mac-App-Friendly way. It doesn't seem like you need to go through the exact process they've <a href="http://pages.github.com/" target="_blank">described</a> to create the gh-pages branch. Over there, they provide the following process along with the disclaimer "Caution: make your working directory clean before you do this (either stash or commit), otherwise this will lose any changes you've made to your project since the last commit.": <div class="highlight"><pre><code class="bash"><span class="nb">cd</span> /path/to/repo-name git symbolic-ref HEAD refs/heads/gh-pages rm .git/index git clean -fdx <span class="nb">echo</span> <span class="s2">&quot;My GitHub Page&quot;</span> <span class="p">&amp;</span>gt<span class="p">;</span> index.html git add . git commit -a -m <span class="s2">&quot;First pages commit&quot;</span> git push origin gh-pages </code></pre></div> </p> <p>Instead, you can simply create a new branch named gh-pages from within the GitHub Mac App. They probably don't instruct people to do this because what I'm accomplishing here isn't a typical scenario.</p> <p>You can take these steps to create the 'gh-pages' branch from within the GitHub Mac App:</p> <ol> <li>Go to the Branches view of your repository</li> <li>Click the + button on your Master branch to create a new branch - name this 'gh-pages'</li> <li>Click the Publish button to push it to GitHub</li> <li>Use the bottom left menu to checkout the Master branch, if you're not working in the Master branch</li> </ol> <p>Each time you want to update your Project Page, just run these steps to sync your Master branch into your gh-pages branch within the GitHub Mac App:</p> <ol> <li>Switch to Branches view</li> <li>Click the Merge View button to display the Merge view</li> <li>Drag the Master branch to the left slot &amp; the gh-pages branch to the right slot</li> <li>Click the Merge Branches button</li> <li>Use the bottom left menu to checkout the gh-pages branch</li> <li>Click the Branch in Sync button to force a synchronization</li> </ol> Pick as a replacement for Digital Color Meter in Mac OS X Lion http://blog.jameschevalier.us/pick-as-a-replacement-for-digital-color-meter-in-mac-os-x-lion/ 2012-01-30T00:00:00-05:00 2012-01-30T00:00:00-05:00 http://blog.jameschevalier.us/pick-as-a-replacement-for-digital-color-meter-in-mac-os-x-lion/ <p>In previous versions of <a href="http://www.apple.com/macosx/" target="_blank">Mac OS X</a>, I would use <a href="http://en.wikipedia.org/wiki/DigitalColor_Meter" target="_blank">Digital Color Meter</a> to hover over parts of my screen to get the HEX color code from certain images. In Mac OS X Lion, however, Digital Color Meter no longer provides hex color values by default. While it's possible to get Digital Color Meter to display <a href="http://www.w3schools.com/html/html_colors.asp" target="_blank">HEX values</a>, it is quite a clunky process of diving into the View menu every time the app is opened. Also, the values it displays now are only the two digit codes:</p> <p style="text-align: center;"><img title="Digial Color Meter" src="//assets/attachments/Digial-Color-Meter.png" alt="" /><br /><small>Digital Color Meter</small></p> <p>I just grabbed <a href="http://click.linksynergy.com/fs-bin/click?id=vwHUN9G4nyY&amp;subid=&amp;offerid=146261.1&amp;type=10&amp;tmpid=3909&amp;RD_PARM1=http%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fpick%2Fid494486540%3Fmt%3D12">Pick</a>, and it does the job nicely ... And for free!</p> <p>Pick is invoked either through the Menu bar or the ⇧⌘L keyboard shortcut. It turns your cursor into a large magnifying-glass-type device that it calls the Loupe. This displays a small area of your screen at the 1 pixel level. The HEX value for each pixel you hover over is displayed within the Loupe.<br /> You can left click to copy the HEX value (in the format you choose in the program's Preferences) to your clipboard. You can also right click to choose a different format to copy your color code in:</p> <p style="text-align: center;"><img title="Pick" src="//assets/attachments/Pick.png" alt="" /><br /><small>Pick</small></p> <h4>Update:</h4> <p>It looks like Pick is no more. I've been using <a href="http://click.linksynergy.com/fs-bin/click?id=vwHUN9G4nyY&amp;subid=&amp;offerid=146261.1&amp;type=10&amp;tmpid=3909&amp;RD_PARM1=https%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fsip%2Fid507257563%3Fmt%3D12">Sip</a> instead. You can read about that <a href="/sip-as-a-replacement-for-pick-as-a-replacement-for-digital-color-meter-in-mac-os-x">here</a>.</p> View the changes between two branches of a git repository in SourceTree http://blog.jameschevalier.us/view-the-changes-between-two-branches-of-a-git-repository-in-sourcetree/ 2012-01-26T00:00:00-05:00 2012-01-26T00:00:00-05:00 http://blog.jameschevalier.us/view-the-changes-between-two-branches-of-a-git-repository-in-sourcetree/ <p>I use <a title="Git" href="http://git-scm.com/" target="_blank">git</a> for all my projects, because of how easy it is to deploy new versions &amp; because of how easy it is to maintain two (or more) different versions of one project. I'll be talking a little bit about that second feature in this post.</p> <p>I typically separate my projects into two branches:</p> <ul> <li>The Master branch is the production branch. This is the "<a title="Nigel's Guitar Room" href="http://youtu.be/g7-5io1muSQ" target="_blank">Look... still has the old tag on, never even played it. Don't touch it! Don't point! It can't be played. That's it, you've seen enough of that one.</a>" branch.</li> <li>I create a second branch just for development, which is where I do all my actual work.</li> </ul> <p>I don't make any actual commits to the Master branch. All of my work is done within the development branch, and I merge the development branch into the Master branch when I'm ready to deploy a release. Sometimes I'll work so much on the development branch that I'll forget all the changes that I've made since the last merge. If that happens, I turn to SourceTree so that I can view the differences between the last merge and the merge I'm about to complete. To do that, I open the repository in <a title="SourceTree" href="http://www.sourcetreeapp.com/" target="_blank">SourceTree</a> (free in the <a title="SourceTree in the Mac App Store" href="http://click.linksynergy.com/fs-bin/click?id=vwHUN9G4nyY&amp;subid=&amp;offerid=146261.1&amp;type=10&amp;tmpid=3909&amp;RD_PARM1=http%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fsourcetree-git-hg%2Fid411678673%3Fmt%3D12" target="_blank">Mac App Store</a>) and click on a branch:</p> <p style="text-align:center;"><img title="Select A Branch" src="//assets/attachments/st01.png" alt="" /><br /><small>Select A Branch</small></p> <p>This displays all of the commits for all branches in the top middle window pane. You can kind of see the dev branch in the screen shot above, which is in blue. When I scroll down through the list of commits, I eventually come to the last time that I merged the development branch into the Master branch. This is the last "release version" of the project &amp; I select this entry by clicking it:</p> <p style="text-align:center;"><img title="Select the previous merge" src="//assets/attachments/st02.png" alt="" /><br /><small>Select the previous merge</small></p> <p>Then I scroll all the way back up to the top of the list of commits. I ⌘-click (command-click ... pretzel-click ... however you refer to it) the very latest commit. This displays, in the bottom left window pane, a list of files that were changed between the last merge and the latest commit. I click through each file, which displays the line-by-line changes in the bottom right window pane, double checking all the changes in order to remind myself of everything I've done. This helps me remember whether I've made any drastic changes that will require further action surrounding deployment.</p> <p>After I'm comfortable with the changes that will go through, I go back to the <a title="GitHub for Mac" href="http://mac.github.com/" target="_blank">GitHub Mac App</a>. I'm much more comfortable doing the actual git work with this app, because of how simple it is. I don't have a very in-depth knowledge of git, and the <a title="GitHub" href="https://github.com/" target="_blank">GitHub</a> App really keeps me from being able to do much harm.</p> Using a custom version of Git on Mac OS X Lion http://blog.jameschevalier.us/using-a-custom-version-of-git-on-mac-os-x-lion/ 2012-01-20T00:00:00-05:00 2012-01-20T00:00:00-05:00 http://blog.jameschevalier.us/using-a-custom-version-of-git-on-mac-os-x-lion/ <p>If you're using <a title="git-osx-installer" href="http://code.google.com/p/git-osx-installer/" target="_blank">git-osx-installer</a> to install <a title="Git" href="http://git-scm.com/" target="_blank">Git</a> on Mac OS X Lion, and 'git --version' in Terminal isn't displaying the version you've just installed, then your system is using the version of Git that's provided by <a title="Xcode Developer Tools" href="http://developer.apple.com/technologies/tools/" target="_blank">Xcode Developer Tools</a>.</p> <p>To use the git-osx-installer version that you've just installed, you'll need to edit the <em>/etc/paths</em> file and add "/usr/local/git/bin" to the top of that file.</p> <p>To open the file for editing, type <code>sudo nano /etc/paths</code> in Terminal.  Add the "/usr/local/git/bin" line to the top of the file.  To write the file, and exit nano after making that change, type <code>Control-O</code> then <code>Control-X</code>. To allow the change to take place, you'll need to quit Terminal, then open it back up again.</p> <p><code>git --version</code> should now report the newly installed git-osx-installer version of Git.</p> How Multi-File Search in BBEdit improved my workflow http://blog.jameschevalier.us/how-multi-file-search-in-bbedit-improved-my-workflow/ 2012-01-19T00:00:00-05:00 2012-01-19T00:00:00-05:00 http://blog.jameschevalier.us/how-multi-file-search-in-bbedit-improved-my-workflow/ <p>It's fairly common that I'll have to look through dozens of files for particular lines of text. Sometimes it's a set of log files that I need to find every instance of a certain action in... Sometimes it's a <a title="CodeIgniter" href="http://codeigniter.com/" target="_blank">CodeIgniter</a> project that I need to find each instance of a function in...</p> <p>In the past, I've used <a title="Grep on Wikipedia" href="http://en.wikipedia.org/wiki/Grep" target="_blank">grep</a> to do this. It allowed me to search an entire directory of files with one command, which was incredibly helpful. I still had to note the filenames that contained the search results, and open those files in an editor. After I was in the editor, I'd have to do another search to actually get to the text that I was looking for. <p>Now, with <a title="BBEdit in the Mac App Store" href="http://click.linksynergy.com/fs-bin/click?id=vwHUN9G4nyY&amp;subid=&amp;offerid=146261.1&amp;type=10&amp;tmpid=3909&amp;RD_PARM1=http%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fbbedit%2Fid404009241%3Fmt%3D12" target="_blank">BBEdit</a>, I do one Multi-File Search and click the search results that I want to inspect closer. This opens the file in the lower half of the window - just below the search results in the same window. The file is opened directly to the line I need, with the search result highlighted. It's not just a display of the file, either, it's a fully functioning editor.</p> <p>Fast searching.<br /> Instant access.<br /> Complete context.<br /> In-search editing.</p> <p><a title="BBEdit in the Mac App Store" href="http://click.linksynergy.com/fs-bin/click?id=vwHUN9G4nyY&amp;subid=&amp;offerid=146261.1&amp;type=10&amp;tmpid=3909&amp;RD_PARM1=http%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fbbedit%2Fid404009241%3Fmt%3D12" target="_blank">BBEdit</a> just replaced <a title="Grep man page" href="http://unixhelp.ed.ac.uk/CGI/man-cgi?grep" target="_blank">grep</a> in my workflow.</p> Little Corner: My Open Source Project To Make You A Better Website http://blog.jameschevalier.us/little-corner-my-open-source-project-to-make-you-a-better-website/ 2011-05-23T00:00:00-04:00 2011-05-23T00:00:00-04:00 http://blog.jameschevalier.us/little-corner-my-open-source-project-to-make-you-a-better-website/ <p>A while back, I ran across two really cool profile/hub/aggregate website providers: <a title="Flavors.me" href="http://flavors.me" target="_blank">Flavors.me</a> and <a title="About.me" href="http://about.me" target="_blank">About.me</a>.  I really liked the idea of the personal hub page, and the way that both sites accomplish the design.  So, for my recent website redesign I decided to push my blog over to <a title="James Chevalier's Blog" href="http://blog.jameschevalier.us" target="_blank">http://blog.jameschevalier.us</a> and use the base domain name as my own attempt to recreate what I saw Flavors &amp; About doing.</p> <p>I've decided to call what came out of this idea <a title="Little Corner on GitHub" href="https://github.com/JamesChevalier/Little-Corner" target="_blank">Little Corner</a>.  The source code of this project is available at <a title="Little Corner on GitHub" href="https://github.com/JamesChevalier/Little-Corner" target="_blank">GitHub</a>, so you can even implement this for your own website.</p> <p>I see this form of website as a more functional "business card" type website.  The main page is pretty simple, and static.  There are a few links which look like they'll bring the visitor off to other services, but what they're really doing is bringing the services into the site.  When a link is clicked, the right side of the page displays a translucent overlay on top of the full-screen background with the content of wherever that link would have gone to (<a title="Twitter" href="http://twitter.com" target="_blank">Twitter</a>, <a title="Foursquare" href="http://foursquare.com" target="_blank">Foursquare</a>, <a title="Last.FM" href="http://last.fm" target="_blank">Last.FM</a>, etc) on top of that.</p> <p>This has been a great opportunity to jump into a few <a title="Application programming interface" href="http://en.wikipedia.org/wiki/Application_programming_interface" target="_blank">APIs</a>, as well.  Each of the external services that I'm pulling data from is pulling that data through the service's API.  This makes for a fairly typical experience with a site like Twitter, but allows for some really cool things to happen with the information from sites like Last.FM or Foursquare.</p> <p>I've just barely started, so there's much more potential in what this <a title="Open source" href="http://en.wikipedia.org/wiki/Open_source" target="_blank">open source</a> project could be.  While I was creating the first version of this project, Foursquare released a new version of their API ... I started getting into the <a title="Twilio" href="http://twilio.com" target="_blank">Twilio</a> API ... And there's still so much customization to offer within the website itself!</p> <p>You can see Little Corner in use on my own website <a title="James Chevalier" href="http://jameschevalier.us" target="_blank">right here</a>, and you can either download or contribute to the project <a title="Little Corner on GitHub" href="https://github.com/JamesChevalier/Little-Corner" target="_blank">right here</a>.</p> My Open Source 'Viral Launching Soon' Project http://blog.jameschevalier.us/my-open-source-viral-launching-soon-project/ 2011-03-16T00:00:00-04:00 2011-03-16T00:00:00-04:00 http://blog.jameschevalier.us/my-open-source-viral-launching-soon-project/ <p>I really like the "viral launching soon page" that <a href="http://launchrock.com" target="_BLANK">LaunchRock</a> is doing, which started for them with Forkly's <a href="http://blog.forkly.com/post/2341870004/a-viral-launching-soon-form" target="_BLANK">invite page</a>. I decided to see if I could make something similar as part of my ongoing learn-by-doing attempt at web development, and it works (at least in that it isn't broken)!</p> <p>So what I've created is <a href="https://github.com/JamesChevalier/Launch-Soon" target="_BLANK">Launch Soon</a>, a drop-in PHP site that provides a viral launching soon page to collect users (well, their email addresses) before your actual launch date. The site is fairly standard in that it's collecting email addresses, but it also provides a unique URL to each user which keeps track of how many people they get to sign up. The idea is that you'll give preferential access to those who gather the most invites.</p> <p>This is an early release, so there's still a lot of customization that hasn't been added in yet. The design is really nice, though! It's the result of me converting <a href="http://twitter.com/melchoyce">Mel Choyce</a>'s PSD file into CSS, which was yet another first for me. A huge thanks to her for saving me on this one!</p> <p>It works by taking a person's email address, and creating a four-character hash out of it. It then inserts the email address, the hash, a zeroed 'invites' field into a mysql database. The hash is used for this user's custom URL, which is used to keep track of their invites. When a person joins through a hashed URL, it will search the database for that hash, and increment the 'invites' field for that other user. The idea is that the people who drum up the most invites will have preferred entry into your project.</p> <p>This also seemed like a great opportunity to create my first github repository, so this project is available for download or collaboration <a href="https://github.com/JamesChevalier/Launch-Soon" target="_BLANK">here</a>. Ideally, someone out there will be able to use it as-is ... Or maybe someone will get some use out of it after some modification ... At the very least, I might get some constructive criticism.</p> <p>Oh, and here's an example of the project in the wild: <a href="http://feebaloo.com" target="_BLANK">feebaloo</a> (which is another idea of mine - A network for developers who need beta testers of proven quality, and users who aren't satisfied with just consuming).</p> <h4>Update:</h4> <p>I've re-written Launch Soon with <a href="http://rubyonrails.org/" target="_BLANK">Ruby on Rails</a>, connected it to <a href="http://mailchimp.com" target="_BLANK">Mailchimp</a>, and made it easy to deploy with <a href="http://heroku.com">Heroku</a>. Read more about it <a href="/web-project/launch-soon-is-a-heroku-ready-viral-coming-soon-page/">here</a>, or check it out <a href="https://github.com/JamesChevalier/Launch-Soon" target="_BLANK">here</a>.</p> A Look At Three Stop Motion / Time-lapse iPhone Apps http://blog.jameschevalier.us/a-look-at-three-stop-motion-time-lapse-iphone-apps/ 2011-01-22T00:00:00-05:00 2011-01-22T00:00:00-05:00 http://blog.jameschevalier.us/a-look-at-three-stop-motion-time-lapse-iphone-apps/ <p>I recently tried out a few iPhone apps so that I could play around with stop motion video, and I figured I'd share my thoughts on each of them. The three apps that I tried out were <a title="iMotion on iTunes" href="http://bit.ly/f49P9i" target="_blank">iMotion</a>, <a title="iTimeLapse Pro on iTunes" href="http://bit.ly/g9RExC" target="_blank">iTimeLapse Pro</a>, and <a title="StopMotion Recorder on iTunes" href="http://bit.ly/eoe8jI" target="_blank">StopMotion Recorder</a>.</p> <p>While I was testing, I found that adding frames to existing videos can have a tendency to change the brightness levels, which throws off the color.  So, it's not usually a good idea to complete a whole project and then attempt to go back and add/edit individual frames; instead, try to get each frame right as you make the video.  This should be taken into consideration for some of the pro/con items listed below.</p> <p>Another thing that I noticed is that the ability to set the FPS (Frames Per Second) value for the video is extremely important. Sometimes the stop motion video being created is good to go with a low FPS, but sometimes the video needs to move quickly in order to keep that sense of fluid motion.</p> <p>Below I've listed each app's pros and cons. The list of apps is ordered from what I thought was the best to what I thought was the worst.</p> <h3>iMotion <small>The notes below are based on version 1.4</small></h3> <a href="http://click.linksynergy.com/fs-bin/click?id=vwHUN9G4nyY&amp;subid=&amp;offerid=146261.1&amp;type=10&amp;tmpid=3909&amp;RD_PARM1=http://itunes.apple.com/us/app/imotion/id329296658%3Fmt%3D8" target="itunes_store"><img style="border: 0;" src="http://ax.phobos.apple.com.edgesuite.net/images/web/linkmaker/badge_appstore-lrg.gif" alt="iMotion - Febo Studio" /></a> <h5>PROS</h5> <ul> <li>Big FPS range of 1-30 frames per second</li> <li>Ability to duplicate frames - great for adding pauses</li> <li>Preview the video (on a loop) without render</li> <li>Ability to inject frames at any time</li> <li>Offers automatic timelapse mode with number of photos &amp; interval</li> </ul> <h5>CONS</h5> <ul> <li>A little slow on the photo-taking... it definitely seems slow next to the freakishly fast 'StopMotion Recorder', so this app's speed is probably normal</li> <li>The preview loop is a little jolting, especially if you're previewing early on in your creation or previewing a short clip</li> </ul> <hr> <h3>iTimeLapse Pro <small>The notes below are based on version 1.1</small></h3> <a href="http://click.linksynergy.com/fs-bin/click?id=vwHUN9G4nyY&amp;subid=&amp;offerid=146261.1&amp;type=10&amp;tmpid=3909&amp;RD_PARM1=http://itunes.apple.com/us/app/itimelapse-pro-time-lapse/id335866860%3Fmt%3D8" target="itunes_store"><img style="border: 0;" src="http://ax.phobos.apple.com.edgesuite.net/images/web/linkmaker/badge_appstore-lrg.gif" alt="iTimeLapse Pro - Time Lapse videos - Laan Labs" /></a> <h5>PROS</h5> <ul> <li>Unlimited (9,999) frames</li> <li>Seems like unlimited frame rate, but the app started crashing before I could verify</li> <li>Will also do automatic time-lapse</li> </ul> <h5>CONS</h5> <ul> <li>Cannot insert frames to existing videos</li> <li>Awkward "take photo" location</li> <li>The "take photo" spot (can't quite call it a button, since it's just text) is too small &amp; is crowded by other UI elements</li> <li>It takes a long time to take photos</li> <li>It takes a long time to render videos</li> <li>No preview before rendering</li> <li>The app started crashing when I tried rendering videos, and exporting to camera roll failed with error</li> </ul> <hr> <h3>StopMotion Recorder <small>The notes below are based on version 1.2.1</small></h3> <a href="http://click.linksynergy.com/fs-bin/click?id=vwHUN9G4nyY&amp;subid=&amp;offerid=146261.1&amp;type=10&amp;tmpid=3909&amp;RD_PARM1=http://itunes.apple.com/us/app/stopmotion-recorder/id373313019%3Fmt%3D8" target="itunes_store"><img style="border: 0;" src="http://ax.phobos.apple.com.edgesuite.net/images/web/linkmaker/badge_appstore-lrg.gif" alt="StopMotion Recorder - graf" /></a> <h5>PROS</h5> <ul> <li>Takes photos incredibly fast</li> <li>Grid is a nice feature to help line things up a bit more</li> <li>The UI has good character, without taking away from the experience of using the app</li> <li>It's fun</li> </ul> <h5>CONS</h5> <ul> <li>Video quality is noticeably pixelated - I consider this a simple toy app until this is fixed</li> <li>Limit of 150 frames (using an iPhone 4, with high/large setting)</li> <li>Cannot add to existing videos</li> <li>Cannot preview the video before rendering</li> </ul> <p><small>All of the links to iTunes in this post are affiliate links.</span></p> Fun With Snowfall Prediction Across The United States http://blog.jameschevalier.us/fun-with-snowfall-prediction-across-the-united-states/ 2011-01-21T00:00:00-05:00 2011-01-21T00:00:00-05:00 http://blog.jameschevalier.us/fun-with-snowfall-prediction-across-the-united-states/ <p><a href="https://blizzalert.com/" target="_blank">Blizzalert</a> uses NOAA’s National Weather Service to get snowfall predictions for 400 ski areas across the United States, which is really really close to 100% coverage.<br>I took a few minutes today to play with some of the data that I’ve collected, and one of the calculations surprised me enough that I think I’m going to keep an eye on it for the rest of the winter. Here’s what I did (it’s going to get a little geeky in here, but it’s worth it)...</p> <p> I wrote up some quick PHP to pull all of the current mountain data out of the database, then I sorted everything into an array so that each mountain had three entries (today, tomorrow, and the next day) which each contained the total projected snowfall for that day. This only required a little bit of work, because the snowfall amounts are separated into 6 hour chunks across a 24 hour period. Using this, I was able to do some fun stuff – I’ll talk about my two favorites: <ol> <li>I sorted and compared every mountain and every day to find which day at which mountain would get the most snow. Out of all 400 ski areas across the United States, it turns out that tomorrow Lost Trail Powder Mountain is projected to get the most snow at 18 inches!</li> <li>I took every mountain’s snowfall prediction for tomorrow, January 22nd, and I added it all up. I learned that the United States is predicted to get 586 inches of snow tomorrow!</li> </ol> </p> <p>I’ll be collecting this information for the rest of the winter, and I can’t wait to see what this season adds up to. Follow <a href="http://twitter.com/theblizzalert" target="_blank">@TheBlizzalert</a> on Twitter if you’re interested in hearing about it, because I’ll be letting everyone know which mountain will be getting the most snow &amp; how much snow tomorrow will bring.</p> <p>Better yet, go sign up for <a href="https://blizzalert.com/" target="_blank">Blizzalert</a> now because it’s easier to get a text message for the mountains that matter to you!</p>