<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Raymond Law: Tag github</title>
    <link>http://blog.rayvinly.com/articles/tag/github</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Capistrano Deployment Recipes</title>
      <description>&lt;p&gt;&lt;a href="http://dealistic.com/"&gt;Dealistic&lt;/a&gt; was first deployed to &lt;a href="http://www.slicehost.com/"&gt;Slicehost&lt;/a&gt; when we were testing it on staging.  However, I only got the 256 slice and low memory is a big problem for Ruby and Mongrel.  We&amp;#8217;ve moved to &lt;a href="http://www.amazon.com/gp/browse.html?node=201590011"&gt;Amazon &lt;span class="caps"&gt;EC2&lt;/span&gt;&lt;/a&gt; when we launched.  It is running rock solid and we don&amp;#8217;t run out of memory again, at least for now :P&lt;/p&gt;


	&lt;p&gt;As a result of all these, I wrote two &lt;a href="http://www.capify.org/"&gt;Capistrano&lt;/a&gt; recipes for deployment, for both Slicehost and &lt;span class="caps"&gt;EC2&lt;/span&gt;.  We also use &lt;a href="http://github.com/"&gt;GitHub&lt;/a&gt; for version control.  I think these deployment recipes may be helpful to others.  So here they are:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://blog.rayvinly.com/shared/deploy_slicehost.rb"&gt;deploy.rb for Slicehost&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.rayvinly.com/shared/deploy_ec2.rb"&gt;deploy.rb for &lt;span class="caps"&gt;EC2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;We wrote some custom Capistrano tasks to copy over configuration files, symlink plugins, start/stop &lt;a href="http://backgroundrb.rubyforge.org/"&gt;BackgrounDRb&lt;/a&gt;, and a custom maintenance page.  But these things are optional.  It should be simple to add/remove things as you see fit.&lt;/p&gt;</description>
      <pubDate>Mon, 04 Aug 2008 17:30:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:f24253c2-5880-49fb-8e78-8d74075c0cbb</guid>
      <author>Raymond Law</author>
      <link>http://blog.rayvinly.com/articles/2008/08/04/capistrano-deployment-recipes</link>
      <category>Entrepreneurship</category>
      <category>Git</category>
      <category>Dealistic</category>
      <category>Ruby on Rails</category>
      <category>Web 2.0</category>
      <category>ruby</category>
      <category>rails</category>
      <category>rubyonrails</category>
      <category>dealistic</category>
      <category>slicehost</category>
      <category>amazon</category>
      <category>ec2</category>
      <category>capistrano</category>
      <category>github</category>
      <trackback:ping>http://blog.rayvinly.com/articles/trackback/69</trackback:ping>
    </item>
    <item>
      <title>Badger Rails Plugin</title>
      <description>&lt;p&gt;&lt;em&gt;(I also posted about this plugin in the &lt;a href="http://intridea.com/2008/6/16/announcing-the-badger-rails-plugin"&gt;Intridea blog&lt;/a&gt; )&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://github.com/rayvinly/badger/tree/master"&gt;Badger&lt;/a&gt; (hosted at &lt;a href="http://github.com/"&gt;GitHub&lt;/a&gt;) is a simple Rails plugin that creates badges.  A site often allows its users to upload a profile image.  A profile image is just that, an image resized to fit in a predefined space to show up in the user&amp;#8217;s profile.&lt;/p&gt;


	&lt;p&gt;With Badger, you can have something prettier &amp;#8211; a badge that shows the user-uploaded image on top of another image that identifies the user as a part of the community.  We have company badges, security badges, so why not web badges to have your users show off his/her affection for your site?&lt;/p&gt;


	&lt;p&gt;Badger works by accepting cropping parameters of the overlay image in a hash (x1, y1, width, height), which is used to crop the overlay image.  It then resizes the cropped image to the size specified by composite_width and composite_height in badger.yml.  Finally, it places the resized image on top of the background image at location specified by composite_x and composite_y in badger.yml.  The resulting image is saved back to either the filesystem or Amazon S3, using attachment_fu.&lt;/p&gt;


	&lt;p&gt;Badger requires the attachment_fu plugin, ImageMagick, and MiniMagick.  Also, the JavaScript Image Cropper UI can be used to obtain the cropping parameters from the users.&lt;/p&gt;


	&lt;p&gt;For example:&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20080415-s2twpkugcjfmpp27fqs42upi7.png" alt="" /&gt;
+
&lt;img src="http://img.skitch.com/20080415-xukti26i4q12bhr8tdxegadsbx.png" alt="" /&gt;
=
&lt;img src="http://img.skitch.com/20080415-g1k6y99fk5fnn4qti76xcyutp8.png" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Here I overlay &lt;span class="caps"&gt;RUBY&lt;/span&gt; on top of &lt;span class="caps"&gt;JAVA&lt;/span&gt; to produce &lt;span class="caps"&gt;I LOVE RUBY&lt;/span&gt;.&lt;/p&gt;</description>
      <pubDate>Mon, 23 Jun 2008 10:00:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:b89d8dd8-08ec-4f8a-8f86-684c535d8736</guid>
      <author>Raymond Law</author>
      <link>http://blog.rayvinly.com/articles/2008/06/23/badger-rails-plugin</link>
      <category>Ruby on Rails</category>
      <category>Web 2.0</category>
      <category>badger</category>
      <category>ruby</category>
      <category>rails</category>
      <category>rubyonrails</category>
      <category>plugin</category>
      <category>github</category>
      <category>intridea</category>
      <trackback:ping>http://blog.rayvinly.com/articles/trackback/58</trackback:ping>
    </item>
  </channel>
</rss>
