<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><description>New Bamboo

Bamboo Blog

</description><title>Bambinos</title><generator>Tumblr (3.0; @bambinos)</generator><link>http://bambinos.tumblr.com/</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/bambinos" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="bambinos" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://tumblr.superfeedr.com/" /><item><title>Solving the problem of non-working key forwarding with Capistrano</title><description>&lt;p&gt;After I upgraded my Mac to Snow Leopard, Capistrano deployments with key forwarding stopped working. I started getting a following error:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Permission denied (publickey).
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;My fellow Bambinos enlightened me that key forwarding was switched off by default in Snow Leopard. The solution was to change the following two lines in &lt;code&gt;/etc/ssh_config&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#Host *
#ForwardAgent no
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;to the following two lines:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Host *
ForwardAgent yes
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Unfortunately after this change I was still getting &lt;code&gt;Permission denied (publickey)&lt;/code&gt; error.&lt;/p&gt;

&lt;p&gt;Today I found the root cause. My ssh key was not added to the authentication agent so the key was not forwarded. The solution was to execute the following command:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ssh-add ~/.ssh/id_dsa
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(or &lt;code&gt;ssh-add ~/.ssh/id_rsa&lt;/code&gt; if you use rsa key)&lt;/p&gt;

&lt;p&gt;Now everything works fine.&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/229845419</link><guid>http://bambinos.tumblr.com/post/229845419</guid><pubDate>Sun, 01 Nov 2009 16:42:00 +0000</pubDate><category>capistrano</category><category>ssh</category><category>key forwarding</category></item><item><title>migration to generate paperclip attachment on your model </title><description>&lt;p&gt;./script/generate paperclip MODEL_NAME ATTACHMENT_NAME&lt;/p&gt;
&lt;p&gt;example:&lt;/p&gt;
&lt;p&gt;./script/generate paperclip video source&lt;/p&gt;
&lt;p&gt;GENERATES:&lt;/p&gt;
&lt;p&gt;add_attachments_source_to_video.rb&lt;/p&gt;
&lt;p&gt;class AddAttachmentsSourceToVideo &amp;lt; ActiveRecord::Migration&lt;br/&gt; def self.up&lt;br/&gt; add_column :video, :source_file_name, :string&lt;br/&gt; add_column :video, :source_content_type, :string&lt;br/&gt; add_column :video, :source_file_size, :integer&lt;br/&gt; end&lt;br/&gt;&lt;br/&gt; def self.down&lt;br/&gt; remove_column :video, :source_file_name&lt;br/&gt; remove_column :video, :source_content_type&lt;br/&gt; remove_column :video, :source_file_size&lt;br/&gt; end&lt;br/&gt;end&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/136330810</link><guid>http://bambinos.tumblr.com/post/136330810</guid><pubDate>Mon, 06 Jul 2009 10:22:34 +0100</pubDate></item><item><title>1337 github mod for new iphone</title><description>&lt;img src="http://24.media.tumblr.com/PdtvWjv9Wowmxn60l1Ya1zUSo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;1337 github mod for new iphone&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/126511666</link><guid>http://bambinos.tumblr.com/post/126511666</guid><pubDate>Fri, 19 Jun 2009 17:03:34 +0100</pubDate></item><item><title>Is beanstalkd really distributed?</title><description>&lt;p&gt;I recently needed to understand how &lt;a href="http://xph.us/software/beanstalkd/"&gt;beanstalkd&lt;/a&gt; works and how does it implement the distributed behaviour, so I did some reading.&lt;/p&gt;

&lt;p&gt;From the &lt;a href="http://xph.us/software/beanstalkd/"&gt;beanstalkd main page&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;beanstalkd is a fast, &lt;strong&gt;distributed&lt;/strong&gt;, in-memory workqueue service&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Ok, it is a distributed service, so let&amp;#8217;s find some more info about its distributed nature.&lt;/p&gt;

&lt;p&gt;This is what we can find in &lt;a href="http://github.com/kr/beanstalkd/wikis/faq"&gt;beanstalkd FAQ&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Does beanstalk inherently support distributed servers?&lt;/strong&gt;&lt;br/&gt;
Yes, although this is handled by the clients, just as with memcached. The beanstalkd server doesn’t know anything about other beanstalkd instances that are running.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Using the same argumentation I could say that FTP or any database server is also distributed if you only start more than one instance.
The fact some server allows to create scalable and distributed solutions, doesn&amp;#8217;t necessarily mean that they are distributed on their own.&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/119417247</link><guid>http://bambinos.tumblr.com/post/119417247</guid><pubDate>Sun, 07 Jun 2009 14:20:49 +0100</pubDate></item><item><title>Run Apple's QuickTime Player from the terminal</title><description>&lt;p&gt;&lt;blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"&gt;open -a &amp;#8220;QuickTime Player&amp;#8221; VIDEO_FILE&lt;/blockquote&gt;&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/108665467</link><guid>http://bambinos.tumblr.com/post/108665467</guid><pubDate>Sat, 16 May 2009 17:44:27 +0100</pubDate></item><item><title>Grep in Project command for TextMate</title><description>&lt;a href="http://henrik.nyh.se/2007/06/grep-in-project-command-for-textmate"&gt;Grep in Project command for TextMate&lt;/a&gt;</description><link>http://bambinos.tumblr.com/post/108110413</link><guid>http://bambinos.tumblr.com/post/108110413</guid><pubDate>Fri, 15 May 2009 10:42:53 +0100</pubDate></item><item><title>Escaping Params Containing Periods in Ruby on Rails</title><description>&lt;a href="http://jimneath.org/2008/11/22/escaping-params-containing-periods/"&gt;Escaping Params Containing Periods in Ruby on Rails&lt;/a&gt;: &lt;p&gt;:requirements =&gt; { :id =&gt; /.*/ }&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/92582414</link><guid>http://bambinos.tumblr.com/post/92582414</guid><pubDate>Fri, 03 Apr 2009 15:41:14 +0100</pubDate></item><item><title>How to run the Haml plugin generator in Rails Templates</title><description>&lt;p&gt;Here is how to run &lt;a target="_blank" title="Haml" href="http://haml.hamptoncatlin.com/"&gt;Haml&lt;/a&gt;&amp;#8217;s unorthodox plugin generator method using Rails Templates:&lt;/p&gt;

&lt;p&gt;
&lt;script src="http://gist.github.com/86120.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;Here is a sample Rails Template for fun:&lt;/p&gt;
&lt;p&gt;
&lt;script src="http://gist.github.com/86118.js"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/90036412</link><guid>http://bambinos.tumblr.com/post/90036412</guid><pubDate>Thu, 26 Mar 2009 15:03:29 +0000</pubDate></item><item><title>The best UNIX commands on the web</title><description>&lt;a href="http://www.commandlinefu.com/commands/browse/sort-by-votes"&gt;The best UNIX commands on the web&lt;/a&gt;</description><link>http://bambinos.tumblr.com/post/90018658</link><guid>http://bambinos.tumblr.com/post/90018658</guid><pubDate>Thu, 26 Mar 2009 13:49:50 +0000</pubDate></item><item><title>Freudian slip during copywriting</title><description>&lt;p&gt;The alternative, and traditional method of ruinning software projects is called &amp;#8220;waterfall&amp;#8221;&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/85497480</link><guid>http://bambinos.tumblr.com/post/85497480</guid><pubDate>Wed, 11 Mar 2009 11:31:05 +0000</pubDate></item><item><title>Open Terminal Here in Finder</title><description>&lt;a href="http://jo.irisson.free.fr/?p=59"&gt;Open Terminal Here in Finder&lt;/a&gt;</description><link>http://bambinos.tumblr.com/post/81518120</link><guid>http://bambinos.tumblr.com/post/81518120</guid><pubDate>Wed, 25 Feb 2009 22:57:11 +0000</pubDate></item><item><title>Include custom actions from a module in a Merb controller</title><description>&lt;p&gt;&lt;pre&gt;&lt;code&gt;module Foo
  def self.included(base)
    base.show_action(:custom_action)
  end
  
  def custom_action
    "foo"
  end
end

&lt;/code&gt;
&lt;/pre&gt;&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/72582741</link><guid>http://bambinos.tumblr.com/post/72582741</guid><pubDate>Fri, 23 Jan 2009 15:25:05 +0000</pubDate></item><item><title>Git SHA1 of HEAD in your Rails/Merb App</title><description>&lt;a href="http://gist.github.com/48967"&gt;Git SHA1 of HEAD in your Rails/Merb App&lt;/a&gt;</description><link>http://bambinos.tumblr.com/post/71525729</link><guid>http://bambinos.tumblr.com/post/71525729</guid><pubDate>Mon, 19 Jan 2009 12:20:18 +0000</pubDate></item><item><title>Delete all removed files from git</title><description>&lt;p&gt;&lt;code&gt;git add -u&lt;/code&gt; &lt;br/&gt;
This deletes all removed files from git.&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/70888204</link><guid>http://bambinos.tumblr.com/post/70888204</guid><pubDate>Fri, 16 Jan 2009 11:46:41 +0000</pubDate></item><item><title>Skinny controllers with resources_controller and named_scope</title><description>&lt;p&gt;resources_controller takes you a long way into simplifying your controllers. Still, whenever you need to add custom collection or member routes to your app you&amp;#8217;re out in the wild again. This snippet of code uses a combination of ActiveRecord&amp;#8217;s named_scopes and resources_controller to simplify those custom actions. With a bit more of abtraction it could be turned into library code that you test once and reuse as many times as you want in different codebases.&lt;/p&gt;
&lt;p&gt;The cool thing is that we get seamless nested controllers if we need them, such as in /posts or /users/2/posts&lt;/p&gt;
&lt;p&gt;
&lt;script src="http://gist.github.com/33418.js"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/63693155</link><guid>http://bambinos.tumblr.com/post/63693155</guid><pubDate>Mon, 08 Dec 2008 13:52:00 +0000</pubDate></item><item><title>Convention for ActiveRecord extensions</title><description>&lt;p&gt;There&amp;#8217;s not one but many ways of extending ActiveRecord. Some people do:&lt;/p&gt;
&lt;pre&gt;ActiveRecord::Base.send :include SomeModule
&lt;/pre&gt;
&lt;p&gt;Which in turns includes or extends other modules.&lt;/p&gt;
&lt;p&gt;Others extend first, and include internally. Others class_eval the hell out of everything.&lt;/p&gt;
&lt;p&gt;There are a few gotchas to avoid, such as accidentally reloading the same modules (ie. in background tasks), which can cause havoc if your extensions uses method aliasing.&lt;/p&gt;
&lt;p&gt;Looking at different approaches, I&amp;#8217;ve come up with this draft of a convention. &lt;/p&gt;
&lt;p&gt;
&lt;script src="http://gist.github.com/28885.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="gist" href="http://gist.github.com/28885"&gt;Here&amp;#8217;s the gist of it&lt;/a&gt;.&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/61471642</link><guid>http://bambinos.tumblr.com/post/61471642</guid><pubDate>Tue, 25 Nov 2008 11:20:52 +0000</pubDate></item><item><title>Get the current working directory of a process</title><description>&lt;p&gt;&lt;code&gt;pwdx PID&lt;/code&gt;&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/60504352</link><guid>http://bambinos.tumblr.com/post/60504352</guid><pubDate>Wed, 19 Nov 2008 13:43:31 +0000</pubDate></item><item><title>Build a bug tracker in 5 mins</title><description>&lt;p&gt;&lt;ul&gt;&lt;li&gt;Go to google docs, click new spread sheet&lt;/li&gt;
&lt;li&gt;Click form, create your form with title, description, severity (1 minor .. 5 epic fail), who&amp;#8217;s responsible in a dropdown and reported by.&lt;/li&gt;
&lt;li&gt;Save your form&lt;/li&gt;
&lt;li&gt;Add conditional colouring on severity&lt;/li&gt;
&lt;li&gt;Add a completed/status column&lt;/li&gt;
&lt;li&gt;Embed form onto a page/email form to bug hunters.&lt;/li&gt;
&lt;/ul&gt;&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/60315877</link><guid>http://bambinos.tumblr.com/post/60315877</guid><pubDate>Tue, 18 Nov 2008 16:38:00 +0000</pubDate></item><item><title>XP song</title><description>&lt;iframe width="400" height="300" src="http://www.youtube.com/embed/zpw8h4OGNxg?wmode=transparent&amp;autohide=1&amp;egm=0&amp;hd=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0&amp;showsearch=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;XP song&lt;/p&gt;</description><link>http://bambinos.tumblr.com/post/59852036</link><guid>http://bambinos.tumblr.com/post/59852036</guid><pubDate>Sat, 15 Nov 2008 19:33:51 +0000</pubDate></item><item><title>Adding comments to Tumblr</title><description>&lt;a href="http://hacks.tumblr.com/post/22981935/add-comments-to-tumblr-with-disqus"&gt;Adding comments to Tumblr&lt;/a&gt;</description><link>http://bambinos.tumblr.com/post/59400753</link><guid>http://bambinos.tumblr.com/post/59400753</guid><pubDate>Wed, 12 Nov 2008 23:46:42 +0000</pubDate></item></channel></rss>
