Skip to content

Instantly share code, notes, and snippets.

@skopp
Forked from millisami/compiled-theme.html
Created October 7, 2012 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skopp/3846633 to your computer and use it in GitHub Desktop.
Save skopp/3846633 to your computer and use it in GitHub Desktop.
Fumblr with Tumblr theme file
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6 lte-ie8"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7 lte-ie8"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8 lte-ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>Nepal on Rails</title>
<meta name="description" content="@millisami's rants!"/>
<!--
===================================================
Effector Theme v1.2.6
by Carlo Franco
Questions or comments?
visit: http://effectortheme.tumblr.com/documentation
email: effector@carlofranco.ca
follow: @effectortheme on Twitter for updates!
===================================================
-->
<meta name="color:Background" content="#e6ebea"/>
<meta name="color:Colored Area Text" content="#fffadc"/>
<meta name="color:Colored Area Text Shadow" content="#bf4402"/>
<meta name="color:Inside Link" content="#f55b2c"/>
<meta name="color:Main Theme" content="#f55b2c"/>
<meta name="color:Outside Link" content="#f55b2c"/>
<meta name="color:Outside Link Hover" content="#131313"/>
<meta name="color:Outside Text" content="#616566"/>
<meta name="font:Inside Heading" content="Helvetica Neue, Arial, sans-serif"/>
<meta name="font:Inside Text" content="Georgia, serif"/>
<meta name="font:Outside Heading" content="Helvetica Neue, Arial, sans-serif"/>
<meta name="font:Outside Text" content="Helvetica Neue, Arial, sans-serif"/>
<meta name="image:Background" content=""/>
<meta name="image:Banner" content=""/>
<meta name="image:Large Sidebar Portrait" content=""/>
<meta name="image:Logo" content=""/>
<meta name="if:Align Top Menu Left" content="0"/>
<meta name="if:Automatic Headings" content="0"/>
<meta name="if:Blog Title in Page Header" content="0"/>
<meta name="if:Blog Title in Sidebar" content="0"/>
<meta name="if:Blog Title in Top bar" content="1"/>
<meta name="if:Centered Layout" content="1"/>
<meta name="if:Collapse Notes" content="1"/>
<meta name="if:Content Width 500" content="0"/>
<meta name="if:Content Width 600" content="0"/>
<meta name="if:Content Width 700" content="1"/>
<meta name="if:Fixed Background" content="0"/>
<meta name="if:Fixed Top Bar" content="1"/>
<meta name="if:Infinite Scrolling" content="0"/>
<meta name="if:Invert" content="0"/>
<meta name="if:Invert Top Bar" content="0"/>
<meta name="if:Large Social Icons" content="1"/>
<meta name="if:Left Sidebar" content="0"/>
<meta name="if:Logo in Top bar" content="0"/>
<meta name="if:Original Photosets" content="0"/>
<meta name="if:Pages In Top Bar" content="0"/>
<meta name="if:Rounded Post Corners" content="0"/>
<meta name="if:Scale Images" content="1"/>
<meta name="if:Search Box In Sidebar" content="0"/>
<meta name="if:Show About Heading" content="1"/>
<meta name="if:Show Blogs I Follow" content="0"/>
<meta name="if:Show Description" content="1"/>
<meta name="if:Show Likes" content="0"/>
<meta name="if:Show Likes in Sidebar" content="0"/>
<meta name="if:Show Pages Heading" content="1"/>
<meta name="if:Show Portrait" content="0"/>
<meta name="if:Show Random Post Icon" content="0"/>
<meta name="if:Show Social Icons Widget" content="0"/>
<meta name="if:Show Tweets" content="1"/>
<meta name="if:Show Twitter Profile" content="1"/>
<meta name="if:Top Menu With Labels" content="0"/>
<meta name="text:Behance Username" content=""/>
<meta name="text:Cargo URL" content=""/>
<meta name="text:Copyright Text" content=""/>
<meta name="text:Default Search Text" content="Search"/>
<meta name="text:Delicious Username" content=""/>
<meta name="text:Digg Username" content=""/>
<meta name="text:Disqus Shortname" content=""/>
<meta name="text:Dribbble Username" content=""/>
<meta name="text:FFFFound Username" content=""/>
<meta name="text:Facebook Username" content=""/>
<meta name="text:Flickr Username" content=""/>
<meta name="text:Forrst Username" content=""/>
<meta name="text:Foursquare Username" content=""/>
<meta name="text:GetClicky Site ID" content=""/>
<meta name="text:Google Analytics Web Property ID" content=""/>
<meta name="text:Google URL" content=""/>
<meta name="text:Gowalla Username" content=""/>
<meta name="text:Grooveshark Username" content=""/>
<meta name="text:Lastfm Username" content=""/>
<meta name="text:Liked Posts Heading" content="I Dig These Posts"/>
<meta name="text:Linkedin Profile URL" content=""/>
<meta name="text:Myspace Friend ID" content=""/>
<meta name="text:Num Tweets Max 4" content="4"/>
<meta name="text:Pinboard Username" content=""/>
<meta name="text:Rdio Username" content=""/>
<meta name="text:Rows of Followed Avatars" content="3"/>
<meta name="text:Skype Username" content=""/>
<meta name="text:Social Icons Heading" content="Me, Elsewhere"/>
<meta name="text:Soundcloud Username" content=""/>
<meta name="text:Tagline" content=""/>
<meta name="text:Twitter Heading" content="Twitter"/>
<meta name="text:Twitter Username" content=""/>
<meta name="text:Vimeo Username" content=""/>
<meta name="text:Xbox Live Profile URL" content=""/>
<meta name="text:Youtube Username" content=""/>
<meta name="text:github Username" content=""/>
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="" />
<link rel="alternate" type="application/rss+xml" href="/thimblr/rss"/>
<link rel="stylesheet" href="http://static.tumblr.com/xgwqnql/szhlc012n/reset.css" media="screen"/>
<link rel="stylesheet" href="http://static.tumblr.com/njty47g/5fRlpc2mc/site.css" media="screen"/>
<link rel="stylesheet" href="http://static.tumblr.com/xgwqnql/MF5lbpkr4/jquery.fancybox-1.3.1.css" media="screen"/>
<script src="http://assets.tumblr.com/javascript/tumblelog.js?16"></script>
<script type="text/javascript">tumblrUsername = ''; searchValue = "{text:Default Search Text}"; themeColor = "{color:Main Theme}"; twitterUsername = ""; photosets = {};</script>
<style type="text/css">
body { font-family:{font:Outside Text}; color:{color:Outside Text}; background-color:#e6ebea;background-image:url(); background-repeat:repeat; }
.blog-title, #sidebar h1, #sidebar h2, #sidebar h3, #footer h1, #footer h2, #footer h3 { font-family:{font:Outside Heading}; }
.copy { font-family:{font:Inside Text}; }
.copy h1, .copy h2, .copy h3, .copy h4, .copy h5, .copy h6, .auto-headings .copy p:first-child strong:first-child, #notes h2, #disqus h2, .speaker {font-family:{font:Inside Heading};}
.colored-panel, .type-answer .user-question, .pages a:hover, .invert .fixed .pages a:hover, .invert .pinned .pages a:hover, .invert #sidebar .pages a:hover, .more-likes:hover, .invert-topbar .fixed .pages a:hover, .like_link a:hover, .type-photoset .navi a:hover, #pagination .nextprev a:hover { background-color:{color:Main Theme}; }
.corners .tl { border-left-color:{color:Main Theme}; }
.corners .tr { border-right-color:{color:Main Theme}; }
.corners .bl, .corners .br { border-bottom-color:{color:Main Theme}; }
a, #footer-end a:hover { color:{color:Outside Link}; }
a:hover { color:{color:Outside Link Hover}; }
.copy a, .copy li:before, .type-chat .speaker, #notes-toggle:hover, ol.notes a, #disqus a { color:{color:Inside Link}; }
.copy a:hover, ol.notes a:hover { border-color:{color:Inside Link}; }
#notes-toggle:hover .icon, .photo-btns a:hover { background-color:{color:Inside Link}; }
.colored-panel, .colored-panel a, .colored-panel a:hover, .colored-panel .user-question, .pages a:hover, .invert-topbar .fixed .pages a:hover, .invert #sidebar .pages a:hover, .more-likes:hover, .like_link a:hover, #pagination .nextprev a:hover { color:{color:Colored Area Text}; }
.type-quote .quote-text,.type-audio .audio-meta,.type-answer .user-question,.pages a:hover, .more-likes:hover, .like_link a:hover, #pagination .nextprev a:hover { text-shadow:1px 1px {color:Colored Area Text Shadow}; }
ol.notes li.tumblelog_ { background-color:#fbfbfb; }
ol.notes li.tumblelog_ .action { font-weight:bold; }
#page, .inner { margin:0 0 0 40px{/block:ifNotCenteredLayout}; }
</style>
</head>
<body class="">
<div id="header" class="pinned">
<div class="inner">
<h1 class="blog-title hidden"><a href="/thimblr/">Nepal on Rails</a></h1>
<div id="search">
<form id="search-form" method="get" action="/search">
<span class="left"></span>
<input type="text" name="q" value="" />
<span class="right"></span>
</form>
</div>
<ul class="menu">
<li><a class="archives" href="/thimblr/archive" title="Archive"><span class="icon"></span><span class="label"></span></a></li>
<li><a class="rss" href="/thimblr/rss" title="{lang:RSS feed}"><span class="icon"></span><span class="label"></span></a></li>
</ul>
</div><!-- .inner -->
<div class="shadow"><span></span></div>
</div><!-- /#header -->
<!-- PAGE -->
<div id="page" class="right-sidebar">
<div class="banner">
<a href="/thimblr/"title="Nepal on Rails"><img id="banner" src="" alt="banner"/></a>
</div>
<div id="content">
<!-- BEGIN POSTS -->
<div id="post-" class="post type-text tag_imagemagick tag_homebrew">
<div class="post-panel">
<div class="copy">
<h2 class="post-title">Imagemagick installation pain on MacOS via Homebrew</h2>
<p>I often stumble upon the pain of installing imagemagick via homebrew on MacOS for the new trainees on their iMacs.</p>
<p>Just as a note-to-myself:</p>
<pre><code>brew remove imagemagick
rm -rf `brew --cache imagemagick`
brew install -f imagemagick --disable-openmp
</code></pre>
</div>
<div class="meta">
<ul class="meta-list">
<li class="tags">
<ul class="tag-list">
<li><a href="/thimblr/tagged/imagemagick">#imagemagick</a></li>
<li><a href="/thimblr/tagged/homebrew">#homebrew</a></li>
</ul>
</li>
<li class="date"><a href="http://127.0.0.1:4567/thimblr/post/14114467141/" title="Mon. December 12, 2011 @ 6:11 pm"><span class="icon"></span>some time ago</a></li>
<li class="permalink"><a href="http://127.0.0.1:4567/thimblr/post/14114467141/"><span class="icon"></span></a></li>
<li class="share">
<a class="share-btn" href="http://127.0.0.1:4567/thimblr/post/14114467141/" data-permalink="http://127.0.0.1:4567/thimblr/post/14114467141/">Share</a>
<div class="share-box">
<div class="share-box-inside clearfix">
<input class="shortlink" type="text" readonly="" value="http://127.0.0.1:4567/thimblr/post/14114467141/">
<div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://127.0.0.1:4567/thimblr/post/14114467141/"></div></div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://127.0.0.1:4567/thimblr/post/14114467141/" data-text="" data-count="none" data-via="">Tweet</a>
<div class="like-button"></div>
</div><!-- /.share-box-inside -->
</div><!-- /.share-box -->
</li><!-- /.share -->
</ul><!--/.meta-list -->
</div><!-- /.meta -->
</div><!-- /.post-panel -->
<div class="post-shadow"></div>
</div><!-- /.post -->
<div id="post-" class="post type-text tag_compass tag_rails__ tag_twitter_bootstrap tag_sass">
<div class="post-panel">
<div class="copy">
<h2 class="post-title">Revisited: Rails 3.1.x with compass, sass and twitter-bootstrap using the asset pipeline</h2>
<p>This is a revised post for the previously released post <a href="http://nepalonrails.tumblr.com/post/11573476367/rails3-1-with-compass-sass-and-twitter-bootstrap-using" target="_blank">Rails3.1 with compass, sass and twitter-bootstrap using the asset pipeline</a>
It had problems while compiling the assets via <code>rake assets:compile</code></p>
<p>Here I&#8217;ll show you 2 alternative ways to get Compass, SASS(.sass) and Twitter bootstrap installed and compiled in a Rails 3.1.3(latest on as of writing this).</p>
<h2>1. Using anjlab-bootstrap-rails</h2>
<p>Add the necessary gems in the Gemfile.</p>
<pre><code>group :assets do
...
gem 'compass', :git =&gt; 'https://github.com/chriseppstein/compass.git', :tag =&gt; 'v0.12.alpha.2'
gem 'sass-rails', " ~&gt; 3.1.0"
gem 'anjlab-bootstrap-rails', :require =&gt; 'bootstrap-rails',
:git =&gt; 'git://github.com/anjlab/bootstrap-rails.git',
:ref =&gt; 'eab5c9e3db95'
end
</code></pre>
<p>Rename the <code>app/assets/stylesheets/application.css</code> file to <code>app/assets/stylesheets/application.css.scss</code> and replace the commented manifest with below.</p>
<pre><code>@import "bootstrap";
@import "compass/css3";
@import "base";
</code></pre>
<p>The above imports all the stylesheets of Bootstrap, Compass&#8217;s CSS3 mixins and our own <code>base.sass</code> files.</p>
<p>The following is the sample <code>base.sass</code> file using <code>compass/css3</code> mixins.</p>
<pre><code>a
outline: 0
object, embed
outline: 0
input::-moz-focus-inner
border: 0
div#main
+box-shadow(red 2px 2px 10px)
</code></pre>
<p>We can use all the compass cross-browser compatible awesome mixins.</p>
<h2>2. Using compass_twitter_bootstrap</h2>
<p>Add the necessary gems in the Gemfile.</p>
<pre><code>group :assets do
...
gem 'compass', :git =&gt; 'https://github.com/chriseppstein/compass.git', :tag =&gt; 'v0.12.alpha.2'
gem 'sass-rails', " ~&gt; 3.1.0"
gem 'compass-twitter-bootstrap', :git =&gt; 'git://github.com/vwall/compass-twitter-bootstrap.git',
:ref =&gt; 'b6f9b467bc'
end
</code></pre>
<p>Add a file at <code>config/initializers/sass.rb</code> with the following:</p>
<pre><code>Rails.configuration.sass.tap do |config|
# twitter bootstrap
config.load_paths &lt;&lt; Compass::Frameworks['compass'].stylesheets_directory
config.load_paths &lt;&lt; Compass::Frameworks['twitter_bootstrap'].stylesheets_directory
end
</code></pre>
<p>Rename the <code>app/assets/stylesheets/application.css</code> file to <code>app/assets/stylesheets/application.css.scss</code> and replace the commented manifest with below.</p>
<pre><code>@import "compass_twitter_bootstrap"
@import "compass/css3";
@import "base";
</code></pre>
<h2>Verifying the assets:compile task</h2>
<p>Well, if the bootstrap with compass works in development mode doesn&#8217;t mean that it will compile the assets properly. To verify it, the <code>rake assets:compile</code> task should run successfully both in <code>development</code> and <code>production</code> environment.</p>
<p>So, to verify this, just run</p>
<pre><code>RAILS_ENV=development bundle exec rake assets:compile
RAILS_ENV=production bundle exec rake assets:compile
</code></pre>
<p>This should create compressed assets at <code>public/assets</code> directory.</p>
<p>Hope you find it useful.</p>
</div>
<div class="meta">
<ul class="meta-list">
<li class="tags">
<ul class="tag-list">
<li><a href="/thimblr/tagged/compass">#compass</a></li>
<li><a href="/thimblr/tagged/rails31">#rails31</a></li>
<li><a href="/thimblr/tagged/twitter-bootstrap">#twitter-bootstrap</a></li>
<li><a href="/thimblr/tagged/sass">#sass</a></li>
</ul>
</li>
<li class="date"><a href="http://127.0.0.1:4567/thimblr/post/13957284625/" title="Fri. December 9, 2011 @ 11:00 am"><span class="icon"></span>some time ago</a></li>
<li class="permalink"><a href="http://127.0.0.1:4567/thimblr/post/13957284625/"><span class="icon"></span></a></li>
<li class="share">
<a class="share-btn" href="http://127.0.0.1:4567/thimblr/post/13957284625/" data-permalink="http://127.0.0.1:4567/thimblr/post/13957284625/">Share</a>
<div class="share-box">
<div class="share-box-inside clearfix">
<input class="shortlink" type="text" readonly="" value="http://127.0.0.1:4567/thimblr/post/13957284625/">
<div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://127.0.0.1:4567/thimblr/post/13957284625/"></div></div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://127.0.0.1:4567/thimblr/post/13957284625/" data-text="" data-count="none" data-via="">Tweet</a>
<div class="like-button"></div>
</div><!-- /.share-box-inside -->
</div><!-- /.share-box -->
</li><!-- /.share -->
</ul><!--/.meta-list -->
</div><!-- /.meta -->
</div><!-- /.post-panel -->
<div class="post-shadow"></div>
</div><!-- /.post -->
<div id="post-" class="post type-text tag_chef tag_knife tag_chef_solo">
<div class="post-panel">
<div class="copy">
<h2 class="post-title">How to manage multiple chef servers chef client?</h2>
<p>I was stupid enough on how to manage multiple chef clients for multiple chef servers.</p>
<p>e.g.</p>
<p>I played with Opscode hosted chef servers. Actually, I was astonished with chef through those guys presentations/talks. And later I installed one local chef-server to play around.</p>
<p>But I was always confused on what are the files do I need to change while switching to the previous or another one. Should I keep them(3 files; client key, organization validator key and knife.rb) in <code>~/chef</code> or <code>~/.chef</code> or <code>~/other_folder/.chef</code>.</p>
<p>But, today I find this approach simple and simple.</p>
<p>Do <code>cd</code> inside any folder that you&#8217;re managing for different servers. Make one directory named <code>.chef</code> and put your <code>client key</code>, <code>orgnization validator kye</code>, <code>knife.rb</code></p>
<p>Now when you run any <code>knife -h</code> commands being inside that folder, the configuration will be read first from the <code>.chef</code> directory.</p>
<p>It made me much simpler, should have known before!!</p>
</div>
<div class="meta">
<ul class="meta-list">
<li class="tags">
<ul class="tag-list">
<li><a href="/thimblr/tagged/chef">#chef</a></li>
<li><a href="/thimblr/tagged/knife">#knife</a></li>
<li><a href="/thimblr/tagged/chef-solo">#chef-solo</a></li>
</ul>
</li>
<li class="date"><a href="http://127.0.0.1:4567/thimblr/post/13832930728/" title="Wed. December 7, 2011 @ 12:12 am"><span class="icon"></span>some time ago</a></li>
<li class="permalink"><a href="http://127.0.0.1:4567/thimblr/post/13832930728/"><span class="icon"></span></a></li>
<li class="share">
<a class="share-btn" href="http://127.0.0.1:4567/thimblr/post/13832930728/" data-permalink="http://127.0.0.1:4567/thimblr/post/13832930728/">Share</a>
<div class="share-box">
<div class="share-box-inside clearfix">
<input class="shortlink" type="text" readonly="" value="http://127.0.0.1:4567/thimblr/post/13832930728/">
<div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://127.0.0.1:4567/thimblr/post/13832930728/"></div></div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://127.0.0.1:4567/thimblr/post/13832930728/" data-text="" data-count="none" data-via="">Tweet</a>
<div class="like-button"></div>
</div><!-- /.share-box-inside -->
</div><!-- /.share-box -->
</li><!-- /.share -->
</ul><!--/.meta-list -->
</div><!-- /.meta -->
</div><!-- /.post-panel -->
<div class="post-shadow"></div>
</div><!-- /.post -->
<div id="post-" class="post type-text tag_rvm tag_readline">
<div class="post-panel">
<div class="copy">
<h2 class="post-title">rvm install ruby woes!!</h2>
<p>Sometime when upgrading RVM or just doing a fresh install and try to install Rubies, one might stumble upon a weird problem. I&#8217;ve also encountered such situations several times. Specially, when RVM brings breaking changes while updating. The following is the most recurring issue I&#8217;ve faced with. So, just documenting for this time so that I don&#8217;t have to Google it again.</p>
<pre><code>rvm install ree
ruby-1.8.7-p330 - #fetching
ruby-1.8.7-p330 - #extracting ruby-1.8.7-p330 to /Users/andrew/.rvm/src/ruby-1.8.7-p330
ruby-1.8.7-p330 - #extracted to /Users/andrew/.rvm/src/ruby-1.8.7-p330
ruby-1.8.7-p330 - #configuring
ruby-1.8.7-p330 - #compiling
Error running 'make ', please read /Users/andrew/.rvm/log/ruby-1.8.7-p330/make.log
There has been an error while running make. Halting the installation.
</code></pre>
<p>If you do it again, you&#8217;ll see the error</p>
<pre><code>Installing Ruby Enterprise Edition from source to: /Users/millisami/.rvm/rubies/ree-1.8.7-2011.03
It appears that the archive has already been extracted. Skipping extract (use --force to force re-download and extract).
ree-1.8.7-2011.03 - #installing
ERROR: Error running './installer -a /Users/millisami/.rvm/rubies/ree-1.8.7-2011.03 --no-tcmalloc --dont-install-useful-gems -c --with-readline-dir=/usr/local/Cellar/readline/6.2.1', please read /Users/millisami/.rvm/log/ree-1.8.7-2011.03/install.log
ERROR: There has been an error while trying to run the ree installer. Halting the installation.
</code></pre>
<p>When you see the log file, you&#8217;ll see something at the end of that file:</p>
<pre><code>...
readline.c: In function ‘username_completion_proc_call’
...
</code></pre>
<p>This error is due to the <code>readline</code> library.</p>
<p>Now you&#8217;ve got 2 options. One is to install <code>readline</code> via <code>rvm pkg install readline</code> or if you have <code>homebrew</code> installed, you can install it via <code>brew update; brew install readline</code>.</p>
<p>Then, <code>brew info readline</code> will show the <code>readline</code> path.</p>
<p>So now, you opt for either way.</p>
<pre><code># if you go via homebrew way
$ rvm remove ree
$ rvm install ree -C --with-readline-dir=/usr/local/Cellar/readline/6.2.1
# if with rvm way
$ rvm get head; rvm reload
$ rvm pkg install readline
$ rvm remove ree
$ rvm install ree --with-readline-dir=$rvm_path/usr
</code></pre>
<p>Tada!.</p>
</div>
<div class="meta">
<ul class="meta-list">
<li class="tags">
<ul class="tag-list">
<li><a href="/thimblr/tagged/rvm">#rvm</a></li>
<li><a href="/thimblr/tagged/readline">#readline</a></li>
</ul>
</li>
<li class="date"><a href="http://127.0.0.1:4567/thimblr/post/13712838576/" title="Sun. December 4, 2011 @ 10:12 am"><span class="icon"></span>some time ago</a></li>
<li class="permalink"><a href="http://127.0.0.1:4567/thimblr/post/13712838576/"><span class="icon"></span></a></li>
<li class="share">
<a class="share-btn" href="http://127.0.0.1:4567/thimblr/post/13712838576/" data-permalink="http://127.0.0.1:4567/thimblr/post/13712838576/">Share</a>
<div class="share-box">
<div class="share-box-inside clearfix">
<input class="shortlink" type="text" readonly="" value="http://127.0.0.1:4567/thimblr/post/13712838576/">
<div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://127.0.0.1:4567/thimblr/post/13712838576/"></div></div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://127.0.0.1:4567/thimblr/post/13712838576/" data-text="" data-count="none" data-via="">Tweet</a>
<div class="like-button"></div>
</div><!-- /.share-box-inside -->
</div><!-- /.share-box -->
</li><!-- /.share -->
</ul><!--/.meta-list -->
</div><!-- /.meta -->
</div><!-- /.post-panel -->
<div class="post-shadow"></div>
</div><!-- /.post -->
<div id="post-" class="post type-text tag_mongoid tag_caching tag_rails__">
<div class="post-panel">
<div class="copy">
<h2 class="post-title">Cache sweeper in Rails3.1, if not using ActiveRecord!</h2>
<p>If you&#8217;re using Rails 3.1 but without ActiveRecord, then you cannot use the the <code>expire_page</code>, <code>expire_action</code> and <code>expire_fragment</code> in your controller. This might happen if you use ODMs such as Mongoid. The app that I&#8217;m working on uses Mongoid.</p>
<p>So, the work-around is to add a <code>Mongoid::Observer</code> and expire those caches by creating an instance of the <code>ActionController::Base</code> and call those methods on that object.</p>
<pre><code>class LineObserver &lt; Mongoid::Observer
observe :line
def after_save(line)
expire_cache(line)
end
def after_destroy(line)
expire_cache(line)
end
private
def expire_cache(line)
@cont ||= ActionController::Base.new
@cont.expire_fragment "department_lines" if line.public?
end
end
</code></pre>
<p>Hope this saves someone&#8217;s time.</p>
</div>
<div class="meta">
<ul class="meta-list">
<li class="tags">
<ul class="tag-list">
<li><a href="/thimblr/tagged/mongoid">#mongoid</a></li>
<li><a href="/thimblr/tagged/caching">#caching</a></li>
<li><a href="/thimblr/tagged/rails31">#rails31</a></li>
</ul>
</li>
<li class="date"><a href="http://127.0.0.1:4567/thimblr/post/13635107537/" title="Fri. December 2, 2011 @ 8:58 pm"><span class="icon"></span>some time ago</a></li>
<li class="permalink"><a href="http://127.0.0.1:4567/thimblr/post/13635107537/"><span class="icon"></span></a></li>
<li class="share">
<a class="share-btn" href="http://127.0.0.1:4567/thimblr/post/13635107537/" data-permalink="http://127.0.0.1:4567/thimblr/post/13635107537/">Share</a>
<div class="share-box">
<div class="share-box-inside clearfix">
<input class="shortlink" type="text" readonly="" value="http://127.0.0.1:4567/thimblr/post/13635107537/">
<div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://127.0.0.1:4567/thimblr/post/13635107537/"></div></div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://127.0.0.1:4567/thimblr/post/13635107537/" data-text="" data-count="none" data-via="">Tweet</a>
<div class="like-button"></div>
</div><!-- /.share-box-inside -->
</div><!-- /.share-box -->
</li><!-- /.share -->
</ul><!--/.meta-list -->
</div><!-- /.meta -->
</div><!-- /.post-panel -->
<div class="post-shadow"></div>
</div><!-- /.post -->
<div id="post-" class="post type-text tag_vagrant tag_chef tag_chef_solo tag_veewee">
<div class="post-panel">
<div class="copy">
<h2 class="post-title">Build your own Vagrant box ready to use with chef-solo using Veewee</h2>
<p>This is my first screencast and its a bit glitchy. The voice is not good because I&#8217;d to use the built-in microphone of my MacBook pro. I&#8217;ve to get a good one. So bare with me and the audio.</p>
<iframe src="http://player.vimeo.com/video/32524591?byline=0&amp;portrait=0&amp;color=ff9933" width="600" height="450" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<h2>Things to shop</h2>
<ul><li><a href="http://www.ruby-lang.org/en/" target="_blank">Ruby</a> versions: 1.9.3-p0, 1.9.2-p290, 1.8.7-p352</li>
<li><a href="https://www.virtualbox.org/wiki/Downloads" target="_blank">VirtualBox 4.1.6</a></li>
<li><a href="http://download.virtualbox.org/virtualbox/4.1.6/Oracle_VM_VirtualBox_Extension_Pack-4.1.6-74713.vbox-extpack" target="_blank">VirtualBox 4.1.6 Extension pack</a></li>
<li><a href="http://www.ubuntu.com/download/ubuntu/download" target="_blank">Ubuntu 11.10</a> 32 bit server image file</li>
</ul><h2>Assumptions</h2>
<ul><li>You know what is Virtual Box and Vagrant</li>
<li>You are familiar with Git and Github</li>
<li>You use Bundler and RVM</li>
</ul><h2>Building a brand new box using Ubuntu 11.10&#160;32-bit iso image</h2>
<p>Visit <a href="https://github.com/jedi4ever/veewee" target="_blank">https://github.com/jedi4ever/veewee</a> and <strong>Fork the repo</strong> under your account</p>
<p>Git clone <code>git clone git://github.com/millisami/veewee</code>
<code>cd veewee</code></p>
<p>Bundle install (if you don&#8217;t have Bundler installed, do <code>gem install bundler --pre</code>)</p>
<pre><code>millisami at sachin in ~/gitcodes/veewee on master
± bundle install
Fetching gem metadata from <a href="http://rubygems.org/......." target="_blank">http://rubygems.org/.......</a>
Using Platform (0.4.0)
Using archive-tar-minitar (0.5.2)
...
Using bundler (1.1.rc)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
millisami at sachin in ~/gitcodes/veewee on master
</code></pre>
<h2>Gems required</h2>
<pre><code>gem install vagrant
gem install veewee
</code></pre>
<h2>Define a basebox template</h2>
<p>First, lets see what are the templates available.</p>
<pre><code>millisami at sachin in ~/gitcodes/veewee on master
± bundle exec vagrant basebox templates
The following templates are available:
...
vagrant basebox define '&lt;boxname&gt;' 'ubuntu-10.10-server-i386-netboot'
vagrant basebox define '&lt;boxname&gt;' 'ubuntu-11.04-server-amd64'
vagrant basebox define '&lt;boxname&gt;' 'ubuntu-11.04-server-i386'
...
</code></pre>
<p>So, the ubuntu 11.10 has not been defined yet. Lets build one based off the <code>ubuntu-11.04-server-i386</code></p>
<pre><code>millisami at sachin in ~/gitcodes/veewee on master
± bundle exec vagrant basebox define 'milli-ubuntu-11-10-32-bit' 'ubuntu-11.04-server-i386'
The basebox 'milli-ubuntu-11-10-32-bit' has been successfully created from the template ''ubuntu-11.04-server-i386'
You can now edit the definition files stored in definitions/milli-ubuntu-11-10-32-bit
or build the box with:
vagrant basebox build 'milli-ubuntu-11-10-32-bit'
</code></pre>
<h2>Lets see the structure of the generated folder</h2>
<pre><code>millisami at sachin in ~/gitcodes/veewee on master
± tree definitions
definitions
└── milli-ubuntu-11-10-32-bit
├── definition.rb
├── postinstall.sh
└── preseed.cfg
1 directory, 3 files
</code></pre>
<h2>Open up the folder in your editor</h2>
<p>Open up the file <code>definition.rb</code> and change the version numbers from <code>11.04</code> to <code>11.10</code></p>
<pre><code># definition.rb
Veewee::Session.declare({
:cpu_count =&gt; '1', :memory_size=&gt; '384',
:disk_size =&gt; '10140', :disk_format =&gt; 'VDI', :hostiocache =&gt; 'off',
:os_type_id =&gt; 'Ubuntu',
:iso_file =&gt; "ubuntu-11.10-server-i386.iso",
:iso_src =&gt; "http://releases.ubuntu.com/11.10/ubuntu-11.10-server-i386.iso",
:iso_md5 =&gt; "881d188cb1ca5fb18e3d9132275dceda",
:iso_download_timeout =&gt; "1000",
:boot_wait =&gt; "10", :boot_cmd_sequence =&gt; [
'&lt;Esc&gt;&lt;Esc&gt;&lt;Enter&gt;',
'/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
'hostname=%NAME% ',
'fb=false debconf/frontend=noninteractive ',
'keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ',
'initrd=/install/initrd.gz -- &lt;Enter&gt;'
],
:kickstart_port =&gt; "7122", :kickstart_timeout =&gt; "10000", :kickstart_file =&gt; "preseed.cfg",
:ssh_login_timeout =&gt; "10000", :ssh_user =&gt; "vagrant", :ssh_password =&gt; "vagrant", :ssh_key =&gt; "",
:ssh_host_port =&gt; "7222", :ssh_guest_port =&gt; "22",
:sudo_cmd =&gt; "echo '%p'|sudo -S sh '%f'",
:shutdown_cmd =&gt; "shutdown -P now",
:postinstall_files =&gt; [ "postinstall.sh"], :postinstall_timeout =&gt; "10000"
})
</code></pre>
<p>Open up the file <code>postinstall.sh</code> and change <code>libreadline5-dev</code> to <code>libreadline5</code> because the Ubuntu Oneiric doesn&#8217;t have <code>libreadline5-dev</code> package.</p>
<pre><code>millisami at sachin in ~/gitcodes/veewee on master
± be vagrant basebox build 'milli-ubuntu-11-10-32-bit'
</code></pre>
</div>
<div class="meta">
<ul class="meta-list">
<li class="tags">
<ul class="tag-list">
<li><a href="/thimblr/tagged/Vagrant">#Vagrant</a></li>
<li><a href="/thimblr/tagged/chef">#chef</a></li>
<li><a href="/thimblr/tagged/chef-solo">#chef-solo</a></li>
<li><a href="/thimblr/tagged/veewee">#veewee</a></li>
</ul>
</li>
<li class="date"><a href="http://127.0.0.1:4567/thimblr/post/13197838780/" title="Wed. November 23, 2011 @ 1:57 pm"><span class="icon"></span>some time ago</a></li>
<li class="permalink"><a href="http://127.0.0.1:4567/thimblr/post/13197838780/"><span class="icon"></span></a></li>
<li class="share">
<a class="share-btn" href="http://127.0.0.1:4567/thimblr/post/13197838780/" data-permalink="http://127.0.0.1:4567/thimblr/post/13197838780/">Share</a>
<div class="share-box">
<div class="share-box-inside clearfix">
<input class="shortlink" type="text" readonly="" value="http://127.0.0.1:4567/thimblr/post/13197838780/">
<div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://127.0.0.1:4567/thimblr/post/13197838780/"></div></div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://127.0.0.1:4567/thimblr/post/13197838780/" data-text="" data-count="none" data-via="">Tweet</a>
<div class="like-button"></div>
</div><!-- /.share-box-inside -->
</div><!-- /.share-box -->
</li><!-- /.share -->
</ul><!--/.meta-list -->
</div><!-- /.meta -->
</div><!-- /.post-panel -->
<div class="post-shadow"></div>
</div><!-- /.post -->
<div id="post-" class="post type-video tag_vagrant tag_chef tag_veewee tag_chef_solo">
<div class="post-panel">
<div class="media loading">
</div>
<div class="copy">
<p><strong>Show notes is migrated over at <a href="http://nepalonrails.tumblr.com/post/13197838780/build-your-own-vagrant-box-ready-to-use-with-chef-solo" target="_blank">Build your own Vagrant box ready to use with chef-solo using Veewee</a></strong></p>
</div>
<div class="meta">
<ul class="meta-list">
<li class="tags">
<ul class="tag-list">
<li><a href="/thimblr/tagged/Vagrant">#Vagrant</a></li>
<li><a href="/thimblr/tagged/chef">#chef</a></li>
<li><a href="/thimblr/tagged/veewee">#veewee</a></li>
<li><a href="/thimblr/tagged/chef-solo">#chef-solo</a></li>
</ul>
</li>
<li class="date"><a href="http://127.0.0.1:4567/thimblr/post/13195523981/" title="Wed. November 23, 2011 @ 12:17 pm"><span class="icon"></span>some time ago</a></li>
<li class="permalink"><a href="http://127.0.0.1:4567/thimblr/post/13195523981/"><span class="icon"></span></a></li>
<li class="share">
<a class="share-btn" href="http://127.0.0.1:4567/thimblr/post/13195523981/" data-permalink="http://127.0.0.1:4567/thimblr/post/13195523981/">Share</a>
<div class="share-box">
<div class="share-box-inside clearfix">
<input class="shortlink" type="text" readonly="" value="http://127.0.0.1:4567/thimblr/post/13195523981/">
<div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://127.0.0.1:4567/thimblr/post/13195523981/"></div></div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://127.0.0.1:4567/thimblr/post/13195523981/" data-text="" data-count="none" data-via="">Tweet</a>
<div class="like-button"></div>
</div><!-- /.share-box-inside -->
</div><!-- /.share-box -->
</li><!-- /.share -->
</ul><!--/.meta-list -->
</div><!-- /.meta -->
</div><!-- /.post-panel -->
<div class="post-shadow"></div>
</div><!-- /.post -->
<div id="post-" class="post type-text tag_chef tag_vagrant tag_gitlab tag_deployment tag_capistrano">
<div class="post-panel">
<div class="copy">
<h2 class="post-title">Setup GitLab (Github clone) using Vagrant and Chef</h2>
<p><strong>Update: Nov 28, 2011:</strong>
The box that is downloaded via vagrant might not work properly. Here is the box that I&#8217;d custom built to have chef pre-installed. You can download it here <a href="http://api2.ge.tt/0/8gA4QSA/0/blob/download" target="_blank">http://api2.ge.tt/0/8gA4QSA/0/blob/download</a></p>
<p>This post is Part 1 of the series <a href="http://nepalonrails.tumblr.com/post/12602286834/rails-app-with-distributed-deployment-playground" target="_blank">Rails app with distributed deployment playground</a></p>
<p>Here we&#8217;ll be installing <a href="http://gitlabhq.com/" target="_blank">GitlabHQ</a>.</p>
<p>I won&#8217;t be showing on how to install Vagrant with VirtualBox here. If you&#8217;re not familiar with Vagrant and how to set it up, then first watch the <a href="http://railscasts.com/episodes/292-virtual-machines-with-vagrant" target="_blank">Railscasts 292</a> and install the Vagrant with VirtualBox.</p>
<p>Then you can start with the following commands in the terminal. First of all, we have to have our own chef-repo to contain the cookbooks.</p>
<p>You can clone my repo or you can use your own or others. Here I&#8217;ll be using mine <a href="https://github.com/millisami/chef-repo" target="_blank">chef-repo</a></p>
<pre><code>cd
git clone git://github.com/millisami/chef-repo.git
</code></pre>
<p>Now, lets start with the gitlabhq setup.</p>
<pre><code>cd
mkdir vagrants
cd vagrants
git clone git://github.com/gitlabhq/gitlabhq.git
cd gitlabhq
vagrant init
</code></pre>
<h3>Modify the Vagrantfile as below</h3>
<pre><code>Vagrant::Config.run do |config|
config.vm.box = "lucid32"
config.vm.network "33.33.33.20"
config.vm.customize do |vm|
vm.name = "GitlabHQ"
vm.memory_size = 384
end
config.vm.provision :chef_solo do |chef|
chef.log_level = :debug
chef.cookbooks_path = ["~/chef-repo/cookbooks"]
chef.add_recipe "base"
chef.add_recipe "rvm::install"
chef.add_recipe "rvm::ruby_192"
chef.json = {
:base =&gt; {
:system_packages =&gt; ["tree", "htop", "vim-nox"]
}
}
}
end
end
</code></pre>
<p>Then from the terminal, run the following commands.</p>
<pre><code>vagrant up
vagrant ssh
</code></pre>
<p>Once you login, install these dependencies.</p>
<pre><code>sudo apt-get install -y git-core sqlite3 libsqlite3-dev gitosis libcurl4-openssl-dev python-setuptools
sudo visudo
</code></pre>
<p><strong>Add the following line at the VERY BOTTOM of the file, if not at the end, it can be nullified by later entries</strong></p>
<pre><code>vagrant ALL=(ALL) NOPASSWD: ALL
</code></pre>
<p><code>Ctrl-X</code> to leave, <code>Y</code> to save your changes. Logout <code>logout</code> and ssh <code>vagrant ssh</code> again to reflect the effect.</p>
<p>Lets install the gem dependencies.</p>
<pre><code>cd /vagrant
rvmsudo gem install bundler --pre
bundle
# Seeding the database
RAILS_ENV=production bundle exec rake db:setup
RAILS_ENV=production bundle exec rake db:seed_fu
</code></pre>
<p>Write the admin account and its password which we&#8217;ve to use later while accessing gitlab.</p>
<pre><code>...
Administrator account created:
login.........admin@local.host
password......5iveL!fe
</code></pre>
<p>Then, we have to setup the following:</p>
<pre><code>sudo easy_install pygments
sudo echo 'export RAILS_ENV=production' &gt;&gt; ~/.bash_profile
sudo adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git
ssh-keygen -t rsa
sudo -H -u git gitosis-init &lt; ~/.ssh/id_rsa.pub
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
echo "gem: --no-rdoc --no-ri" &gt; ~/.gemrc
rvmsudo gem install passenger
rvmsudo passenger-install-nginx-module
</code></pre>
<h2>Creating an Upstart file for nginx</h2>
<p>sudo vim /etc/init/nginx.conf</p>
<pre><code>description "Nginx HTTP Server"
start on filesystem
stop on runlevel [!2345]
respawn
exec /opt/nginx/sbin/nginx -g "daemon off;"
</code></pre>
<h2>Restart the VM</h2>
<pre><code>sudo shutdown -r now
</code></pre>
<h2>Verify nginx urnning</h2>
<pre><code>sudo initctl list | grep nginx
</code></pre>
<p>You should see:</p>
<pre><code>nginx start/running, process 678
</code></pre>
<p>…Or use a browser and visit <a href="http://33.33.33.20" target="_blank">http://33.33.33.20</a></p>
<h2>Open nginx.conf to configure nginx</h2>
<pre><code>sudo vim /opt/nginx/conf/nginx.conf
</code></pre>
<p>Change the user to &#8216;vagrant&#8217;</p>
<p>Then inside the <code>http {....}</code>, add/replace a server block looking similar to this:</p>
<pre><code>...
http {
...
server {
listen 80;
server_name localhost;
root /vagrant/public;
passenger_enabled on;
}
...
}
</code></pre>
<h2>Restart nginx to pick up the changes</h2>
<pre><code>sudo service nginx stop; sudo service nginx start
</code></pre>
<p>or just</p>
<pre><code>sudo start|stop nginx
</code></pre>
<h2>Setting up the first repository</h2>
<ol><li>Access <code><a href="http://33.33.33.20" target="_blank">http://33.33.33.20</a></code> on the HOST machine&#8217;s browser</li>
<li>Login in using <code>admin@local.host</code> and <code>5iveL!fe</code></li>
<li>Add your HOST key at <code><a href="http://33.33.33.20/keys" target="_blank">http://33.33.33.20/keys</a></code></li>
<li>Create the first project, say (Myproject)</li>
<li>Add a remote. <code>git remote add vagrant-chef git@33.33.33.20:Myproject.git</code></li>
<li>Push with tracking branch. <code>git push -u vagrant-chef master</code></li>
</ol><h2>Dealing with the Git and SSH keys gotchas</h2>
<ol><li><p>Added user <code>vagrant</code> to group <code>git</code> since <code>/home/git/repositories</code> directory is owned by <code>git</code></p></li>
<li><p>Did one clone in <code>~/tmp</code> directory <code>git clone git@localhost:gitosis-admin.git gitosis-copy</code> to add the <code>RSA</code> key to the list of known hosts. So, that when later via browser, the webserver will try to create a new repo. Otherwise you might end up with the infamous 500 error page.</p></li>
</ol><p>Thats it for this part. Hang-on for the part 2 of the series <a href="http://nepalonrails.tumblr.com/post/12602286834/rails-app-with-distributed-deployment-playground" target="_blank">Rails app with distributed deployment playground</a></p>
</div>
<div class="meta">
<ul class="meta-list">
<li class="tags">
<ul class="tag-list">
<li><a href="/thimblr/tagged/chef">#chef</a></li>
<li><a href="/thimblr/tagged/vagrant">#vagrant</a></li>
<li><a href="/thimblr/tagged/gitlab">#gitlab</a></li>
<li><a href="/thimblr/tagged/deployment">#deployment</a></li>
<li><a href="/thimblr/tagged/capistrano">#capistrano</a></li>
</ul>
</li>
<li class="date"><a href="http://127.0.0.1:4567/thimblr/post/12603081685/" title="Thu. November 10, 2011 @ 11:16 pm"><span class="icon"></span>some time ago</a></li>
<li class="permalink"><a href="http://127.0.0.1:4567/thimblr/post/12603081685/"><span class="icon"></span></a></li>
<li class="share">
<a class="share-btn" href="http://127.0.0.1:4567/thimblr/post/12603081685/" data-permalink="http://127.0.0.1:4567/thimblr/post/12603081685/">Share</a>
<div class="share-box">
<div class="share-box-inside clearfix">
<input class="shortlink" type="text" readonly="" value="http://127.0.0.1:4567/thimblr/post/12603081685/">
<div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://127.0.0.1:4567/thimblr/post/12603081685/"></div></div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://127.0.0.1:4567/thimblr/post/12603081685/" data-text="" data-count="none" data-via="">Tweet</a>
<div class="like-button"></div>
</div><!-- /.share-box-inside -->
</div><!-- /.share-box -->
</li><!-- /.share -->
</ul><!--/.meta-list -->
</div><!-- /.meta -->
</div><!-- /.post-panel -->
<div class="post-shadow"></div>
</div><!-- /.post -->
<div id="post-" class="post type-text tag_chef tag_vagrant tag_gitlab tag_deployment tag_capistrano">
<div class="post-panel">
<div class="copy">
<h2 class="post-title">Rails app with distributed deployment playground</h2>
<p>While setting up <a href="http://etxpress.com" target="_blank">Etxpress</a> on the production box with <a href="https://rvm.beginrescueend.com/rvm/install/" target="_blank">system wide installed RVM</a> and <a href="http://github.com/defunkt/resque" target="_blank">Resque</a> for background processing, monitored via <a href="http://upstart.ubuntu.com/" target="_blank">Upstart</a> using <a href="http://michaelvanrooijen.com/articles/2011/06/08-managing-and-monitoring-your-ruby-application-with-foreman-and-upstart/" target="_blank">Foreman</a> export command, I had to run the following command to export the updated <code>Procfile.production</code> file with capistrano and custom <code>cap deploy:foreman</code> task.</p>
<pre><code>rvmsudo foreman export upstart /etc/init -a etxpress -u deploy \
-f ./Procfile.production -c worker=1 scheduler=1 redis=1
</code></pre>
<p>Since the command <code>rvmsudo</code> is for <code>sudoers</code>, it asks for sudo password which capistrano cannot handle.
Similarly, there are some other commands that need the sudo access as well. So, tweaking the settings directly in production and playing with <code>cap deploy:foreman</code> and other sudo related tasks, I&#8217;d to manually login and do service restarts.</p>
<p>This is not a best practice to test or play with deployment settings directly on the production box.
So, to simulate the same environment and process, here the Vagrant and Chef come in.</p>
<p>The idea is to host a Gitlab as a Github repo in one VM, launch another VM to simulate the production box and setup the multistage capistrano recipe to test and experiment.</p>
<p><img src="http://i.imgur.com/TEuxQ.png" alt="Local Deployment Diagram"/></p>
<p>It will be a long post. So, I&#8217;ll be blogging in the following series:</p>
<ol><li><a href="http://nepalonrails.tumblr.com/post/12603081685/setup-gitlab-github-clone-using-vagrant-and-chef" target="_blank">Setup Gitlab as a Github repo hosting</a></li>
<li>Setup a production box in another VM</li>
<li>Setup capistrano multistage to test the deployment</li>
</ol><p>To automate the process, we&#8217;ll be using vagrant to launch VM(s) and chef-solo for provisioning.
I might do another post using chef-server to make it more automated.</p>
<p>Without further ado, here is the first part of the series: <a href="http://nepalonrails.tumblr.com/post/12603081685/setup-gitlab-github-clone-using-vagrant-and-chef" target="_blank">Setup Gitlab as a Github repo hosting</a> using vagrant and chef-solo.</p>
</div>
<div class="meta">
<ul class="meta-list">
<li class="tags">
<ul class="tag-list">
<li><a href="/thimblr/tagged/chef">#chef</a></li>
<li><a href="/thimblr/tagged/vagrant">#vagrant</a></li>
<li><a href="/thimblr/tagged/gitlab">#gitlab</a></li>
<li><a href="/thimblr/tagged/deployment">#deployment</a></li>
<li><a href="/thimblr/tagged/capistrano">#capistrano</a></li>
</ul>
</li>
<li class="date"><a href="http://127.0.0.1:4567/thimblr/post/12602286834/" title="Thu. November 10, 2011 @ 10:47 pm"><span class="icon"></span>some time ago</a></li>
<li class="permalink"><a href="http://127.0.0.1:4567/thimblr/post/12602286834/"><span class="icon"></span></a></li>
<li class="share">
<a class="share-btn" href="http://127.0.0.1:4567/thimblr/post/12602286834/" data-permalink="http://127.0.0.1:4567/thimblr/post/12602286834/">Share</a>
<div class="share-box">
<div class="share-box-inside clearfix">
<input class="shortlink" type="text" readonly="" value="http://127.0.0.1:4567/thimblr/post/12602286834/">
<div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://127.0.0.1:4567/thimblr/post/12602286834/"></div></div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://127.0.0.1:4567/thimblr/post/12602286834/" data-text="" data-count="none" data-via="">Tweet</a>
<div class="like-button"></div>
</div><!-- /.share-box-inside -->
</div><!-- /.share-box -->
</li><!-- /.share -->
</ul><!--/.meta-list -->
</div><!-- /.meta -->
</div><!-- /.post-panel -->
<div class="post-shadow"></div>
</div><!-- /.post -->
<div id="post-" class="post type-text tag_ruby_debug tag_rvm">
<div class="post-panel">
<div class="copy">
<h2 class="post-title">Installing ruby-debug in ruby 1.9.3 with rvm</h2>
<p><a href="http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug" target="_blank">blog.wyeworks.com</a> posted a way to install ruby-debug in 1.9.3 in <a href="https://github.com/sstephenson/rbenv" target="_blank">rbenv</a> addressing the details of the problem.</p>
<p>I&#8217;m just posting a quick installation in <a href="http://rvm.beginrescueend.com" target="_blank">rvm</a>. Install ruby 1.9.3 if you haven&#8217;t or skip to the next block.</p>
<pre><code>rvm get head
rvm install ruby-1.9.3-p0
rvm reload
rvm 1.9.3
</code></pre>
<p>Now lets install the ruby-debug gem. Follow the below simple steps:</p>
<pre><code>cd ~/tmp
wget <a href="http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem" target="_blank">http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem</a>
wget <a href="http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem" target="_blank">http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem</a>
$ gem install linecache19-0.5.13.gem
Building native extensions. This could take a while...
Successfully installed linecache19-0.5.13
1 gem installed
$ gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p0
Building native extensions. This could take a while...
Successfully installed ruby-debug-base19-0.11.26
1 gem installed
$ irb
irb(main):001:0&gt; require 'ruby-debug'
=&gt; true
</code></pre>
</div>
<div class="meta">
<ul class="meta-list">
<li class="tags">
<ul class="tag-list">
<li><a href="/thimblr/tagged/ruby-debug">#ruby-debug</a></li>
<li><a href="/thimblr/tagged/rvm">#rvm</a></li>
</ul>
</li>
<li class="date"><a href="http://127.0.0.1:4567/thimblr/post/12202261643/" title="Tue. November 1, 2011 @ 11:44 pm"><span class="icon"></span>some time ago</a></li>
<li class="permalink"><a href="http://127.0.0.1:4567/thimblr/post/12202261643/"><span class="icon"></span></a></li>
<li class="share">
<a class="share-btn" href="http://127.0.0.1:4567/thimblr/post/12202261643/" data-permalink="http://127.0.0.1:4567/thimblr/post/12202261643/">Share</a>
<div class="share-box">
<div class="share-box-inside clearfix">
<input class="shortlink" type="text" readonly="" value="http://127.0.0.1:4567/thimblr/post/12202261643/">
<div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="http://127.0.0.1:4567/thimblr/post/12202261643/"></div></div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://127.0.0.1:4567/thimblr/post/12202261643/" data-text="" data-count="none" data-via="">Tweet</a>
<div class="like-button"></div>
</div><!-- /.share-box-inside -->
</div><!-- /.share-box -->
</li><!-- /.share -->
</ul><!--/.meta-list -->
</div><!-- /.meta -->
</div><!-- /.post-panel -->
<div class="post-shadow"></div>
</div><!-- /.post -->
<!-- END POSTS -->
<div id="pagination">
<div class="nextprev">
<span>&larr; </span> <span class="sep">&bull;</span>
<a class="next" href="2"><span> &rarr;</span></a>
</div>
<div class="current-page">{lang:Page CurrentPage of TotalPages 2}</div>
</div><!--/#pagination -->
</div><!-- /#content -->
<!-- SIDEBAR -->
<div id="sidebar">
<div id="blog-info" class="side-box">
<p><a href="/thimblr/" title="Nepal on Rails"><img id="logo" src="" alt="Logo" /></a></p>
</div><!--/#blog-info -->
</div><!-- /#sidebar -->
<!-- FOOTER -->
<div id="footer">
<div id="footer-end" class="ruled-top">
<ul id="footer-links">
<li><a href="/thimblr/rss"></a></li>
<li><a href="/thimblr/random"></a></li>
<li><a href="/thimblr/archive"></a></li>
<li><a href="/thimblr/mobile"></a></li>
</ul>
<p class="credits"><a href="http://effectortheme.tumblr.com">Effector Theme</a> by <a href="http://www.carlofranco.ca">Carlo Franco</a>.</p>
<span class="tumblr">{lang:Powered by Tumblr 2}</span>
</div><!-- /#footer-end -->
</div><!-- /#footer -->
</div><!-- /#page -->
<!-- Footer Scripts -->
<script type="text/javascript">(function(B,C){B[C]=B[C].replace(/\bno-js\b/,'js')})(document.documentElement,'className');</script>
<script src="http://static.tumblr.com/xgwqnql/XPSlbx7np/jquery-1.4.4.min.js"></script>
<script src="http://static.tumblr.com/njty47g/d1Mlpn53c/plugins.js"></script>
<script src="http://static.tumblr.com/xgwqnql/41Lluodtm/effector-1.2.6.min.js"></script>
<script src="http://platform.twitter.com/widgets.js"></script>
<script src="https://apis.google.com/js/plusone.js" type="text/javascript"></script>
</body>
</html>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6 lte-ie8"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7 lte-ie8"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8 lte-ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>{Title}{block:TagPage} &bull; Posts Tagged &lsquo;{Tag}&rsquo;{/block:TagPage}{block:PostSummary} &bull; {PostSummary}{/block:PostSummary}</title>
{block:Description}
<meta name="description" content="{MetaDescription}"/>
{/block:Description}
<!--
===================================================
Effector Theme v1.2.6
by Carlo Franco
Questions or comments?
visit: http://effectortheme.tumblr.com/documentation
email: effector@carlofranco.ca
follow: @effectortheme on Twitter for updates!
===================================================
-->
<meta name="color:Background" content="#e6ebea"/>
<meta name="color:Colored Area Text" content="#fffadc"/>
<meta name="color:Colored Area Text Shadow" content="#bf4402"/>
<meta name="color:Inside Link" content="#f55b2c"/>
<meta name="color:Main Theme" content="#f55b2c"/>
<meta name="color:Outside Link" content="#f55b2c"/>
<meta name="color:Outside Link Hover" content="#131313"/>
<meta name="color:Outside Text" content="#616566"/>
<meta name="font:Inside Heading" content="Helvetica Neue, Arial, sans-serif"/>
<meta name="font:Inside Text" content="Georgia, serif"/>
<meta name="font:Outside Heading" content="Helvetica Neue, Arial, sans-serif"/>
<meta name="font:Outside Text" content="Helvetica Neue, Arial, sans-serif"/>
<meta name="image:Background" content=""/>
<meta name="image:Banner" content=""/>
<meta name="image:Large Sidebar Portrait" content=""/>
<meta name="image:Logo" content=""/>
<meta name="if:Align Top Menu Left" content="0"/>
<meta name="if:Automatic Headings" content="0"/>
<meta name="if:Blog Title in Page Header" content="0"/>
<meta name="if:Blog Title in Sidebar" content="0"/>
<meta name="if:Blog Title in Top bar" content="1"/>
<meta name="if:Centered Layout" content="1"/>
<meta name="if:Collapse Notes" content="1"/>
<meta name="if:Content Width 500" content="0"/>
<meta name="if:Content Width 600" content="0"/>
<meta name="if:Content Width 700" content="1"/>
<meta name="if:Fixed Background" content="0"/>
<meta name="if:Fixed Top Bar" content="1"/>
<meta name="if:Infinite Scrolling" content="0"/>
<meta name="if:Invert" content="0"/>
<meta name="if:Invert Top Bar" content="0"/>
<meta name="if:Large Social Icons" content="1"/>
<meta name="if:Left Sidebar" content="0"/>
<meta name="if:Logo in Top bar" content="0"/>
<meta name="if:Original Photosets" content="0"/>
<meta name="if:Pages In Top Bar" content="0"/>
<meta name="if:Rounded Post Corners" content="0"/>
<meta name="if:Scale Images" content="1"/>
<meta name="if:Search Box In Sidebar" content="0"/>
<meta name="if:Show About Heading" content="1"/>
<meta name="if:Show Blogs I Follow" content="0"/>
<meta name="if:Show Description" content="1"/>
<meta name="if:Show Likes" content="0"/>
<meta name="if:Show Likes in Sidebar" content="0"/>
<meta name="if:Show Pages Heading" content="1"/>
<meta name="if:Show Portrait" content="0"/>
<meta name="if:Show Random Post Icon" content="0"/>
<meta name="if:Show Social Icons Widget" content="0"/>
<meta name="if:Show Tweets" content="1"/>
<meta name="if:Show Twitter Profile" content="1"/>
<meta name="if:Top Menu With Labels" content="0"/>
<meta name="text:Behance Username" content=""/>
<meta name="text:Cargo URL" content=""/>
<meta name="text:Copyright Text" content=""/>
<meta name="text:Default Search Text" content="Search"/>
<meta name="text:Delicious Username" content=""/>
<meta name="text:Digg Username" content=""/>
<meta name="text:Disqus Shortname" content=""/>
<meta name="text:Dribbble Username" content=""/>
<meta name="text:FFFFound Username" content=""/>
<meta name="text:Facebook Username" content=""/>
<meta name="text:Flickr Username" content=""/>
<meta name="text:Forrst Username" content=""/>
<meta name="text:Foursquare Username" content=""/>
<meta name="text:GetClicky Site ID" content=""/>
<meta name="text:Google Analytics Web Property ID" content=""/>
<meta name="text:Google URL" content=""/>
<meta name="text:Gowalla Username" content=""/>
<meta name="text:Grooveshark Username" content=""/>
<meta name="text:Lastfm Username" content=""/>
<meta name="text:Liked Posts Heading" content="I Dig These Posts"/>
<meta name="text:Linkedin Profile URL" content=""/>
<meta name="text:Myspace Friend ID" content=""/>
<meta name="text:Num Tweets Max 4" content="4"/>
<meta name="text:Pinboard Username" content=""/>
<meta name="text:Rdio Username" content=""/>
<meta name="text:Rows of Followed Avatars" content="3"/>
<meta name="text:Skype Username" content=""/>
<meta name="text:Social Icons Heading" content="Me, Elsewhere"/>
<meta name="text:Soundcloud Username" content=""/>
<meta name="text:Tagline" content=""/>
<meta name="text:Twitter Heading" content="Twitter"/>
<meta name="text:Twitter Username" content=""/>
<meta name="text:Vimeo Username" content=""/>
<meta name="text:Xbox Live Profile URL" content=""/>
<meta name="text:Youtube Username" content=""/>
<meta name="text:github Username" content=""/>
<link rel="shortcut icon" href="{Favicon}" />
<link rel="apple-touch-icon" href="{PortraitURL-128}" />
<link rel="alternate" type="application/rss+xml" href="{RSS}"/>
<link rel="stylesheet" href="http://static.tumblr.com/xgwqnql/szhlc012n/reset.css" media="screen"/>
<link rel="stylesheet" href="http://static.tumblr.com/njty47g/5fRlpc2mc/site.css" media="screen"/>
<link rel="stylesheet" href="http://static.tumblr.com/xgwqnql/MF5lbpkr4/jquery.fancybox-1.3.1.css" media="screen"/>
{block:IndexPage}<script src="http://assets.tumblr.com/javascript/tumblelog.js?16"></script>{/block:IndexPage}
<script type="text/javascript">tumblrUsername = '{PlaintextName}'; searchValue = "{text:Default Search Text}"; themeColor = "{color:Main Theme}";{block:IfContentWidth500} contentWidth = 500;{/block:IfContentWidth500}{block:IfContentWidth600} contentWidth = 600;{/block:IfContentWidth600}{block:IfContentWidth700} contentWidth = 700;{/block:IfContentWidth700}{block:IfOriginalPhotosets} tumblrPhotosets = true;{/block:IfOriginalPhotosets}{block:IndexPage}{block:IfInfiniteScrolling} infiniteScroll = true;{/block:IfInfiniteScrolling}{/block:IndexPage}{block:IfCollapseNotes} collapseNotes = true;{/block:IfCollapseNotes}{block:IfDisqusShortname} disqusEnabled = true; disqusShortname = "{text:Disqus Shortname}";{/block:IfDisqusShortname} twitterUsername = "{block:Twitter}{TwitterUsername}{/block:Twitter}";{block:IfFixedTopBar} fixedBar = true;{/block:IfFixedTopBar}{block:IfShowTweets}{block:Twitter} showTweets = true;{block:IfNumTweetsMax4} numTweets = parseInt({text:Num Tweets Max 4});{/block:IfNumTweetsMax4}{block:IfShowTwitterProfile} showTwitterProfile = true;{/block:IfShowTwitterProfile}{/block:Twitter}{/block:IfShowTweets}{block:IfShowBlogsIFollow}{block:Following} showFollowing = true;{block:IfRowsOfFollowedAvatars} followedRows = parseInt({text:Rows Of Followed Avatars});{/block:IfRowsofFollowedAvatars}{/block:Following}{/block:IfShowBlogsIFollow}{block:IfShowLikes}{block:Likes} showLikes = true;{/block:Likes}{/block:IfShowLikes}{block:PermalinkPage} isPermalink = true;{/block:PermalinkPage} photosets = {};</script>
<style type="text/css">
body { font-family:{font:Outside Text}; color:{color:Outside Text}; background-color:{color:Background};{block:IfBackgroundImage}background-image:url({image:Background}); background-repeat:repeat;{block:IfFixedBackground} background-attachment:fixed;{/block:IfFixedBackground}{/block:IfBackgroundImage} }
.blog-title, #sidebar h1, #sidebar h2, #sidebar h3, #footer h1, #footer h2, #footer h3 { font-family:{font:Outside Heading}; }
.copy { font-family:{font:Inside Text}; }
.copy h1, .copy h2, .copy h3, .copy h4, .copy h5, .copy h6, .auto-headings .copy p:first-child strong:first-child, #notes h2, #disqus h2, .speaker {font-family:{font:Inside Heading};}
{block:IfInvert}
.pinned .menu a { color:#fff; color:rgba(255,255,255,0.8); }
.pinned .blog-title a, .pinned .menu a:hover, .pinned .pages a, #sidebar .pages a, .banner .blog-title a, #sidebar .blog-title a, #twitter h3, #sidebar h2, #footer h2, #footer-end a, .more-likes, .like_link a, #pagination .nextprev a, .page-sep { color: #fff; }
{/block:IfInvert}
.colored-panel, .type-answer .user-question, .pages a:hover, .invert .fixed .pages a:hover, .invert .pinned .pages a:hover, .invert #sidebar .pages a:hover, .more-likes:hover, .invert-topbar .fixed .pages a:hover, .like_link a:hover, .type-photoset .navi a:hover, #pagination .nextprev a:hover { background-color:{color:Main Theme}; }
.corners .tl { border-left-color:{color:Main Theme}; }
.corners .tr { border-right-color:{color:Main Theme}; }
.corners .bl, .corners .br { border-bottom-color:{color:Main Theme}; }
a, #footer-end a:hover { color:{color:Outside Link}; }
a:hover { color:{color:Outside Link Hover}; }
.copy a, .copy li:before, .type-chat .speaker, #notes-toggle:hover, ol.notes a, #disqus a { color:{color:Inside Link}; }
.copy a:hover, ol.notes a:hover { border-color:{color:Inside Link}; }
#notes-toggle:hover .icon, .photo-btns a:hover { background-color:{color:Inside Link}; }
.colored-panel, .colored-panel a, .colored-panel a:hover, .colored-panel .user-question, .pages a:hover, .invert-topbar .fixed .pages a:hover, .invert #sidebar .pages a:hover, .more-likes:hover, .like_link a:hover, #pagination .nextprev a:hover { color:{color:Colored Area Text}; }
.type-quote .quote-text,.type-audio .audio-meta,.type-answer .user-question,.pages a:hover, .more-likes:hover, .like_link a:hover, #pagination .nextprev a:hover { text-shadow:1px 1px {color:Colored Area Text Shadow}; }
ol.notes li.tumblelog_{PlaintextName} { background-color:#fbfbfb; }
ol.notes li.tumblelog_{PlaintextName} .action { font-weight:bold; }
#page, .inner { margin:{block:IfCenteredLayout}0 auto{/block:IfCenteredLayout}{block:IfNotCenteredLayout}0 0 0 40px{/block:ifNotCenteredLayout}; }
{CustomCSS}
</style>
</head>
<body class="{block:IfContentWidth500}content-500 {/block:IfContentWidth500}{block:IfContentWidth600}content-600 {/block:IfContentWidth600}{block:IfContentWidth700}content-700 {/block:IfContentWidth700}{block:IndexPage}{block:IfInfiniteScrolling}infscroll {/block:IfInfiniteScrolling}{/block:IndexPage}{block:IfInvert}invert {/block:IfInvert}{block:IfInvertTopBar}invert-topbar {/block:IfInvertTopBar}{block:IfTopMenuWithLabels}menu-labels {/block:IfTopMenuWithLabels}{block:IfAlignTopMenuLeft}menu-left {/block:IfAlignTopMenuLeft}{block:IfRoundedPostCorners}round-corners {/block:IfRoundedPostCorners}{block:IfLargeSocialIcons}lg-icons {/block:IfLargeSocialIcons}{block:IfAutomaticHeadings}auto-headings {/block:IfAutomaticHeadings}{block:IfScaleImages}scale-images {/block:IfScaleImages}{block:PermalinkPage}singular{/block:PermalinkPage}">
<div id="header" class="pinned">
<div class="inner">
{block:IfLogoInTopBar}
{block:IfLogoImage}<a href="/" title="{Title}" class="logo"><img src="{image:Logo}" alt="Logo" /></a>{/block:IfLogoImage}
{/block:IfLogoInTopBar}
{block:IfNotBlogTitleInPageHeader}
<h1 class="blog-title{block:IfNotBlogTitleInTopBar} hidden{/block:IfNotBlogTitleInTopBar}"><a href="/">{Title}</a></h1>
{/block:IfNotBlogTitleInPageHeader}
{block:IfPagesInTopBar}
{block:HasPages}
<ul class="pages">
{block:Pages}
<li><a href="{URL}">{Label}</a></li>
{/block:Pages}
</ul>
{/block:HasPages}
{/block:IfPagesInTopBar}
{block:IfNotSearchBoxInSidebar}
<div id="search">
<form id="search-form" method="get" action="/search">
<span class="left"></span>
<input type="text" name="q" value="{block:IfDefaultSearchText}{text:Default Search Text}{/block:IfDefaultSearchText}" />
<span class="right"></span>
</form>
</div>
{/block:IfNotSearchBoxInSidebar}
<ul class="menu">
{block:IfShowRandomPostIcon}<li><a class="random" href="/random"{block:IfNotTopMenuWithLabels} title="{lang:Random post}"{/block:IfNotTopMenuWithLabels}><span class="icon"></span><span class="label">{lang:Random}</span></a></li>{/block:IfShowRandomPostIcon}
<li><a class="archives" href="/archive"{block:IfNotTopMenuWithLabels} title="Archive"{/block:IfNotTopMenuWithLabels}><span class="icon"></span><span class="label">{lang:Archive}</span></a></li>
<li><a class="rss" href="{RSS}"{block:IfNotTopMenuWithLabels} title="{lang:RSS feed}"{/block:IfNotTopMenuWithLabels}><span class="icon"></span><span class="label">{lang:RSS}</span></a></li>
{block:AskEnabled}<li><a class="ask" href="/ask"{block:IfNotTopMenuWithLabels} title="{AskLabel}"{/block:IfNotTopMenuWithLabels}><span class="icon"></span><span class="label">{AskLabel}</span></a></li>{/block:AskEnabled}
{block:SubmissionsEnabled}<li><a class="submit" href="/submit"{block:IfNotTopMenuWithLabels} title="{SubmitLabel}"{/block:IfNotTopMenuWithLabels}><span class="icon"></span><span class="label">{SubmitLabel}</span></a></li>{/block:SubmissionsEnabled}
</ul>
</div><!-- .inner -->
<div class="shadow"><span></span></div>
</div><!-- /#header -->
<!-- PAGE -->
<div id="page" class="{block:IfLeftSidebar}left-sidebar{/block:IfLeftSidebar}{block:IfNotLeftSidebar}right-sidebar{/block:IfNotLeftSidebar}">
{block:IfBannerImage}
<div class="banner">
<a href="/"title="{Title}"><img id="banner" src="{image:Banner}" alt="banner"/></a>
</div>
{block:IfBannerImage}
{block:IfNotBannerImage}
{block:IfBlogTitleInPageHeader}
<div class="banner textual">
<h1 class="blog-title"><a href="/">{Title}</a></h1>
{block:IfTagline}<p class="tagline">{text:Tagline}</p>{/block:IfTagline}
</div>
{/block:IfBlogTitleInPageHeader}
{/block:IfNotBannerImage}
<div id="content">
<!-- BEGIN POSTS -->
{block:Posts}
{block:Text}
<div id="post-{postID}" class="post type-text{block:Tags} tag_{URLSafeTag}{/block:Tags}">
<div class="post-panel">
<div class="copy">
{block:Title}
<h2 class="post-title">{Title}</h2>
{/block:Title}
{Body}
</div>
{/block:Text}
{block:Photo}
<div id="post-{postID}" class="post type-photo{block:Tags} tag_{URLSafeTag}{/block:Tags}">
<div class="post-panel">
<div class="media">
<div class="photo-panel">
{block:IfContentWidth500}
{LinkOpenTag}<img src="{PhotoURL-500}" alt="{PhotoAlt}"/>{LinkCloseTag}
{/block:IfContentWidth500}
{block:IfNotContentWidth500}
{LinkOpenTag}<img src="{PhotoURL-HighRes}" alt="{PhotoAlt}"/>{LinkCloseTag}
{/block:IfNotContentWidth500}
<div class="photo-btns">{block:HighRes}{/block:IfNotContentWidth500}<a class="lightbox" href="{PhotoURL-HighRes}">Pop-up</a>{/block:HighRes}<a class="photo-url" href="{PhotoURL-HighRes}">View Separately</a></div>
</div>
</div>
{block:Caption}
<div class="copy">
{Caption}
</div>
{/block:Caption}
{/block:Photo}
{block:Photoset}
<div id="post-{PostID}" class="post type-photoset{block:Tags} tag_{URLSafeTag}{/block:Tags}">
<div class="post-panel">
<div class="media loading">
{Photoset-500}
</div>
{block:Caption}
<div class="copy">
{Caption}
</div>
{/block:Caption}
{/block:Photoset}
{block:Quote}
<div id="post-{PostID}" class="post type-quote{block:Tags} tag_{URLSafeTag}{/block:Tags}">
<div class="colored-panel">
<blockquote class="quote-text">{Quote}</blockquote>
</div>
<div class="post-panel">
<div class="quote-nipple"></div>
{block:Source}
<div class="copy">
{Source}
</div>
{/block:Source}
{/block:Quote}
{block:Link}
<div id="post-{PostID}" class="post type-link{block:Tags} tag_{URLSafeTag}{/block:Tags}">
<div class="post-panel">
<div class="copy">
<h2 class="post-title"><a href="{URL}" {Target}>{Name}<span class="icon"></span></a></h2>
{block:Description}
{Description}
{/block:Description}
</div>
{/block:Link}
{block:Chat}
<div id="post-{PostID}" class="post type-chat{block:Tags} tag_{URLSafeTag}{/block:Tags}">
<div class="post-panel">
<div class="copy">
{block:Title}
<h2 class="post-title">{Title}</h2>
{/block:Title}
<ul class="chat">
{block:Lines}
<li class="{Alt} user_{UserNumber}">
{block:Label}
<span class="speaker">{Label}</span>
{/block:Label}
<span class="says">{Line}</span>
</li>
{/block:Lines}
</ul>
</div>
{/block:Chat}
{block:Video}
<div id="post-{PostID}" class="post type-video{block:Tags} tag_{URLSafeTag}{/block:Tags}">
<div class="post-panel">
<div class="media loading">
{Video-500}
{block:IfInfiniteScrolling}
{block:IndexPage}<div class="js-string hidden">{JSVideo-500}</div>{/block:IndexPage}
{/block:IfInfiniteScrolling}
</div>
<div class="copy">
{block:Caption}
{Caption}
{/block:Caption}
</div>
{/block:Video}
{block:Audio}
<div id="post-{PostID}" class="post type-audio{block:Tags} tag_{URLSafeTag}{/block:Tags}">
<div class="colored-panel">
<div class="player-container">
<div class="album-case"></div>
<div class="album-art">{block:AlbumArt}<img class="album-art" src="{AlbumArtUrl}" alt=""/>{/block:AlbumArt}</div>
<div class="corners"><span class="tl"></span><span class="tr"></span><span class="bl"></span><span class="br"></span></div>
<div class="player-btn">{AudioPlayerWhite}</div>
{block:IndexPage}<div class="js-string hidden">{JSAudioPlayerWhite}</div>{/block:IndexPage}
</div>
<ul class="audio-meta">
<li class="plays"><span class="count">{FormattedPlayCount}</span> {lang:Plays}</li>
<li class="track-info">{block:TrackName}<span class="title">{TrackName}</span>{/block:TrackName}{block:Artist}<span class="artist">{Artist}</span>{/block:Artist}</li>
</ul>
{block:ExternalAudio}
<a class="download" href="{ExternalAudioURL}" title="Download External Audio">Download External Audio</a>
{/block:ExternalAudio}
</div>
<div class="post-panel">
{block:Caption}
<div class="copy">
{Caption}
</div>
{/block:Caption}
{/block:Audio}
{block:Answer}
<div id="post-{PostID}" class="post type-answer">
<div class="colored-panel">
<h2 class="user-question"><span>Q:</span>{Question}</h2>
</div>
<div class="post-panel">
<div class="quote-nipple"></div>
<div class="copy">
<div class="question-asker">
<img src="{AskerPortraitURL-24}" width="24" height="24" alt=""/> {Asker}
</div>
<div class="answer">
{Answer}
</div>
</div>
{/block:Answer}
{block:ContentSource}
<div class="copy source">
<p>{lang:Source}: <a href="{SourceURL}">{SourceTitle}</a></p>
</div>
{/block:ContentSource}
{block:Date}
<div class="meta">
<ul class="meta-list">
{block:HasTags}
<li class="tags">
<ul class="tag-list">
{block:Tags}
<li><a href="{TagURL}">#{Tag}</a></li>
{/block:Tags}
</ul>
</li>
{/block:HasTags}
<li class="date{block:RebloggedFrom}-reblogged{/block:RebloggedFrom}"><a href="{Permalink}" title="{ShortDayOfWeek}. {Month} {DayOfMonth}, {Year} @ {12Hour}:{Minutes} {AmPm}"><span class="icon"></span>{TimeAgo}</a>{block:RebloggedFrom} <em>></em> <a class="reblogged-from" href="{ReblogRootURL}" title="{ReblogRootTitle}">{ReblogRootName}</a>{/block:RebloggedFrom}</li>
{block:NoteCount}<li class="notes"><a href="{Permalink}#notes"><span class="icon"></span>{NoteCount}</a></li>{/block:NoteCount}
{block:IfDisqusShortname}<li class="comments hidden"><a id="dsq-{PostID}" href="{Permalink}#disqus_thread"><span class="icon"></span>Comments</a></li>{/block:IfDisqusShortname}
<li class="permalink"><a href="{Permalink}"><span class="icon"></span>{lang:Permalink}</a></li>
<li class="share">
<a class="share-btn" href="{ShortURL}" data-permalink="{Permalink}">Share</a>
<div class="share-box">
<div class="share-box-inside clearfix">
<input class="shortlink" type="text" readonly="" value="{ShortURL}">
<div class="plusone-btn"><div class="g-plusone" data-size="medium" data-count="true" data-href="{Permalink}"></div></div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="{Permalink}" data-text="" data-count="none" data-via="{block:Twitter}{TwitterUsername}{/block:Twitter}">Tweet</a>
<div class="like-button"></div>
</div><!-- /.share-box-inside -->
</div><!-- /.share-box -->
</li><!-- /.share -->
</ul><!--/.meta-list -->
</div><!-- /.meta -->
{/block:Date}
{block:PermalinkPage}
{block:NoteCount}
<div id="notes">
<h2>{NoteCount} Notes<span class="sep">/</span>
<a id="notes-toggle" href="#"><span class="label">Hide</span><span class="icon up"></span></a></h2>
{PostNotes}
</div><!-- /.notes -->
{/block:NoteCount}
{block:IfDisqusShortname}
<!-- DISQUS COMMENTS -->
<div id="disqus">
<h2>{lang:Recent comments}</h2>
<script type="text/javascript">var disqus_url = "{Permalink}"; var disqus_title ="{block:PostTitle}{PostTitle}{/block:PostTitle}";</script>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_identifier = {PostID};
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqusShortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript={text:DisqusShortname}">comments powered by Disqus.</a></noscript>
{lang:Blog comments powered by Disqus 2}
</div><!-- /#disqus -->
{/block:IfDisqusShortname}
{/block:PermalinkPage}
</div><!-- /.post-panel -->
<div class="post-shadow"></div>
</div><!-- /.post -->
{/block:Posts}
<!-- END POSTS -->
{block:NoSearchResults}
<div class="post type-text not-found">
<div class="post-panel">
<div class="copy">
<h2 class="post-title">{lang:Sorry no posts found}</h2>
<p>{lang:No search results for SearchQuery 2}</p>
</div>
</div>
<div class="post-shadow"></div>
</div>
{/block:NoSearchResults}
{block:Pagination}
<div id="pagination">
<div class="nextprev">
{block:PreviousPage}<a class="prev" href="{PreviousPage}">{/block:PreviousPage}<span>&larr; {lang:Newer}</span>{block:PreviousPage}</a>{/block:PreviousPage} <span class="sep">&bull;</span>
{block:NextPage}<a class="next" href="{NextPage}">{/block:NextPage}<span>{lang:Older} &rarr;</span>{block:NextPage}</a>{/block:NextPage}
</div>
<div class="current-page">{lang:Page CurrentPage of TotalPages 2}</div>
</div><!--/#pagination -->
{/block:Pagination}
{block:PermalinkPagination}
<div id="pagination">
<div class="nextprev">
{block:NextPost}<a class="prev" href="{NextPost}">{/block:NextPost}<span>&larr; {lang:Previous}</span>{block:NextPost}</a>{/block:NextPost} <span class="sep">&bull;</span>
{block:PreviousPost}<a class="next" href="{PreviousPost}">{/block:PreviousPost}<span>{lang:Next} &rarr;</span>{block:PreviousPost}</a>{/block:PreviousPost}
</div>
</div><!--/#pagination -->
{/block:PermalinkPagination}
</div><!-- /#content -->
<!-- SIDEBAR -->
<div id="sidebar">
<div id="blog-info" class="side-box">
{block:IfNotLogoInTopBar}
{block:IfLogoImage}<p><a href="/" title="{Title}"><img id="logo" src="{image:Logo}" alt="Logo" /></a></p>{/block:IfLogoImage}
{/block:IfNotLogoInTopBar}
{block:IfBlogTitleInSidebar}
<h1 class="blog-title"><a href="/">{Title}</a></h1>
{/block:IfBlogTitleInSidebar}
{block:IfLargeSidebarPortraitImage}
<p><a href="/"><img class="large-portrait" src="{image:Large Sidebar Portrait}" alt="Portrait/Logo"/></a></p>
{/block:IfLargeSidebarPortraitImage}
{block:IfShowDescription}
<div class="description">
{block:IfShowAboutHeading}<h2>{lang:About}</h2>{/block:IfShowAboutHeading}
{block:IfShowPortrait}<img class="portrait" src="{PortraitURL-64}" alt="Avatar"/>{/block:IfShowPortrait}
{Description}
</div><!--/.description-->
{/block:IfShowDescription}
</div><!--/#blog-info -->
{block:IfSearchBoxInSidebar}
<div id="search">
<form id="search-form" method="get" action="/search">
<span class="left"></span>
<input type="text" name="q" value="{block:IfDefaultSearchText}{text:Default Search Text}{/block:IfDefaultSearchText}" />
<span class="right"></span>
</form>
</div>
{/block:IfSearchBoxInSidebar}
{block:IfNotPagesInTopBar}
{block:HasPages}
<div class="side-box ruled-top">
{block:IfShowPagesHeading}<h2>{lang:Pages}</h2>{/block:IfShowPagesHeading}
<ul class="pages">
{block:Pages}
<li><a href="{URL}">{Label}</a></li>
{/block:Pages}
</ul>
</div>
{/block:HasPages}
{/block:IfNotPagesInTopBar}
{block:IfShowSocialIconsWidget}
<div class="side-box ruled-top">
{block:IfSocialIconsHeading}<h2>{text:Social Icons Heading}</h2>{/block:IfSocialIconsHeading}
<ul id="socialize">
{block:IfDribbbleUsername}<li class="dribbble"><a href="http://dribbble.com/players/{text:Dribbble Username}" title="{text:Dribbble Username} on Dribbble">{text:Dribbble Username} on Dribbble</a></li>{/block:IfDribbbleUsername}
{block:IfBehanceUsername}<li class="behance"><a href="http://www.behance.net/{text:Behance Username}" title="{text:Behance Username} on Behance">{text:Behance Username} on Behance</a></li>{/block:IfBehanceUsername}
{block:IfCargoURL}<li class="cargo"><a href="{text:Cargo URL}" title="My Cargo Collective Site">My Cargo Collective Site</a></li>{/block:IfCargoURL}
{block:IfForrstUsername}<li class="forrst"><a href="http://forrst.com/people/{text:Forrst Username}" title="{text:Forrst Username} on Forrst">{text:Forrst Username} on Forrst</a></li>{/block:IfForrstUsername}
{block:IfFFFFoundUsername}<li class="ffffound"><a href="http://ffffound.com/home/{text:FFFFound Username}/found/" title="{text:FFFFound Username} on FFFFound">{text:FFFFound Username} on FFFFound</a></li>{/block:IfFFFFoundUsername}
{block:IfTwitterUsername}<li class="twitter"><a href="http://www.twitter.com/{text:Twitter Username}" title="@{text:Twitter Username} on Twitter">@{text:Twitter Username} on Twitter</a></li>{/block:IfTwitterUsername}
{block:IfFacebookUsername}<li class="facebook"><a href="http://www.facebook.com/{text:Facebook Username}" title="Facebook Profile">Facebook Profile</a></li>{/block:IfFacebookUsername}
{block:IfVimeoUsername}<li class="vimeo"><a href="http://www.vimeo.com/{text:Vimeo Username}" title="{text:Vimeo Username} on Vimeo">{text:Vimeo Username} on Vimeo</a></li>{/block:IfVimeoUsername}
{block:IfYoutubeUsername}<li class="youtube"><a href="http://www.youtube.com/{text:Youtube Username}" title="{text:Youtube Username} on Youtube">{text:Youtube Username} on Youtube</a></li>{/block:IfYoutubeUsername}
{block:IfFlickrUsername}<li class="flickr"><a href="http://www.flickr.com/photos/{text:Flickr Username}" title="{text:Flickr Username} on Flickr">{text:Flickr Username} on Flickr</a></li>{/block:IfFlickrUsername}
{block:IfDeliciousUsername}<li class="delicious"><a href="http://www.delicious.com/{text:Delicious Username}" title="{text:Delicious Username} on Delicious">{text:Delicious Username} on Delicious</a></li>{/block:IfDeliciousUsername}
{block:IfPinboardUsername}<li class="pinboard"><a href="http://pinboard.in/u:{text:Pinboard Username}" title="{text:Pinboard Username} on Pinboard">{text:Pinboard Username} on Pinboard</a></li>{/block:IfPinboardUsername}
{block:IfDiggUsername}<li class="digg"><a href="http://www.digg.com/{text:Digg Username}" title="{text:Digg Username} on Digg">{text:Digg Username} on Digg</a></li>{/block:IfDiggUsername}
{block:IfLastfmUsername}<li class="lastfm"><a href="http://www.last.fm/user/{text:Lastfm Username}" title="{text:Lastfm Username} on Last.fm">{text:Lastfm Username} on Last.fm</a></li>{/block:IfLastfmUsername}
{block:IfMyspaceFriendID}<li class="myspace"><a href="http://www.myspace.com/{text:Myspace Friend ID}" title="Myspace Profile">Myspace Profile</a></li>{/block:IfMyspaceFriendID}
{block:IfSoundcloudUsername}<li class="soundcloud"><a href="http://soundcloud.com/{text:Soundcloud Username}" title="{text:Soundcloud Username} on Soundcloud">{text:Soundcloud Username} on Soundcloud</a></li>{/block:IfSoundcloudUsername}
{block:IfGroovesharkUsername}<li class="grooveshark"><a href="http://grooveshark.com/#/{text:Grooveshark Username}" title="{text:Grooveshark Username} on Grooveshark">{text:Grooveshark Username} on Grooveshark</a></li>{/block:IfGroovesharkUsername}
{block:IfRdioUsername}<li class="rdio"><a href="http://www.rdio.com/#/people/{text:Rdio Username}" title="{text:Rdio Username} on Rdio">{text:Rdio Username} on Rdio</a></li>{/block:IfRdioUsername}
{block:IfFoursquareUsername}<li class="foursquare"><a href="http://foursquare.com/{text:Foursquare Username}" title="{text:Foursquare Username} on Foursquare">{text:Foursquare Username} on Foursquare</a></li>{/block:IfFoursquareUsername}
{block:IfGowallaUsername}<li class="gowalla"><a href="http://gowalla.com/users/{text:Gowalla Username}" title="{text:Gowalla Username} on Gowalla">{text:Gowalla Username} on Gowalla</a></li>{/block:IfGowallaUsername}
{block:IfGoogleURL}<li class="google"><a href="{text:Google URL}" title="Google">Google</a></li>{/block:IfGoogleURL}
{block:IfSkypeUsername}<li class="skype"><a href="skype:{text:Skype Username}?userinfo" title="My Skype Info">My Skype Info</a></li>{/block:IfSkypeUsername}
{block:IfLinkedinProfileURL}<li class="linkedin"><a href="{text:Linkedin Profile URL}" title="Linkedin Profile">Linkedin Profile</a></li>{/block:IfLinkedinProfileURL}
{block:IfGithubUsername}<li class="github"><a href="http://github.com/{text:github Username}" title="{text:github Username} on github">{text:github Username} on github</a></li>{/block:IfGithubUsername}
{block:IfXboxLiveProfileURL}<li class="xbox"><a href="{text:Xbox Live Profile URL}" title="Xbox Live Profile">Xbox Live Profile</a></li>{/block:IfXboxLiveProfileURL}
</ul>
</div>
{/block:IfShowSocialIconsWidget}
{block:IfShowTweets}
{block:Twitter}
<div id="twitter" class="side-box ruled-top">
{block:IfTwitterHeading}<h2>{text:Twitter Heading}</h2>{/block:IfTwitterHeading}
<p class="loading-text">loading tweets&hellip;</p>
</div>
{/block:Twitter}
{/block:IfShowTweets}
{block:IfShowBlogsIFollow}
{block:Following}
<div id="followed" class="side-box ruled-top">
<h2>{lang:Following}</h2>
<div id="followed-wrap">
<ul id="followed-list">
{block:Followed}<li><a href="{FollowedURL}" title="{FollowedName}"><img src="{FollowedPortraitURL-24}"></a></li>{/block:Followed}
</ul>
</div>
</div>
{/block:Following}
{/block:IfShowBlogsIFollow}
{block:IfShowLikes}
{block:IfShowLikesInSidebar}
<!-- LIKES -->
{block:Likes}
<div id="side-likes" class="side-box ruled-top">
<h2>{text:Liked Posts Heading}</h2>
{Likes limit="4" summarize="150" width="170"}
<a class="more-likes" href="/liked/by/{Name}">{lang:See more} &rarr;</a>
</div>
{/block:Likes}
<!-- END LIKES -->
{/block:IfShowLikesInSidebar}
{/block:IfShowLikes}
</div><!-- /#sidebar -->
<!-- FOOTER -->
<div id="footer">
{block:IfShowLikes}
{block:IfNotShowLikesInSidebar}
<!-- LIKES -->
{block:Likes}
<div id="likes-panel" class="footer-panel ruled-top">
<h2>{text:Liked Posts Heading}</h2>
<a class="more-likes" href="/liked/by/{Name}">{lang:See more} &rarr;</a>
{block:IfContentWidth500}
{Likes limit="4" summarize="150" width="170"}
{/block:IfContentWidth500}
{block:IfContentWidth600}
{Likes limit="5" summarize="150" width="156"}
{/block:IfContentWidth600}
{block:IfContentWidth700}
{Likes limit="5" summarize="150" width="168"}
{/block:IfContentWidth700}
</div>
{/block:Likes}
<!-- END LIKES -->
{/block:IfNotShowLikesInSidebar}
{/block:IfShowLikes}
<div id="footer-end" class="ruled-top">
<ul id="footer-links">
<li><a href="/rss">{lang:RSS}</a></li>
<li><a href="/random">{lang:Random}</a></li>
<li><a href="/archive">{lang:Archive}</a></li>
{block:AskEnabled}<li><a href="/ask">{AskLabel}</a></li>{/block:AskEnabled}
{block:SubmissionsEnabled}<li><a href="/submit">{SubmitLabel}</a></li>{/block:SubmissionsEnabled}
<li><a href="/mobile">{lang:Mobile}</a></li>
</ul>
<p class="credits">{block:IfCopyrightText}{text:Copyright Text}. {/block:IfCopyrightText}<a href="http://effectortheme.tumblr.com">Effector Theme</a> by <a href="http://www.carlofranco.ca">Carlo Franco</a>.</p>
<span class="tumblr">{lang:Powered by Tumblr 2}</span>
</div><!-- /#footer-end -->
</div><!-- /#footer -->
</div><!-- /#page -->
<!-- Footer Scripts -->
<script type="text/javascript">(function(B,C){B[C]=B[C].replace(/\bno-js\b/,'js')})(document.documentElement,'className');</script>
<script src="http://static.tumblr.com/xgwqnql/XPSlbx7np/jquery-1.4.4.min.js"></script>
<script src="http://static.tumblr.com/njty47g/d1Mlpn53c/plugins.js"></script>
<script src="http://static.tumblr.com/xgwqnql/41Lluodtm/effector-1.2.6.min.js"></script>
<script src="http://platform.twitter.com/widgets.js"></script>
<script src="https://apis.google.com/js/plusone.js" type="text/javascript"></script>
{block:IfGoogleAnalyticsWebPropertyID}
<script type="text/javascript">
var _gaq=[["_setAccount","{text:Google Analytics Web Property ID}"],["_trackPageview"]];
(function(d,t){
var g=d.createElement(t), s=d.getElementsByTagName(t)[0];
g.async=1;
g.src=("https:"==location.protocol?"//ssl":"//www")+".google-analytics.com/ga.js";
s.parentNode.insertBefore(g,s)
}(document,"script"));
</script>
{/block:IfGoogleAnalyticsWebPropertyID}
{block:IfGetClickySiteID}
<script type="text/javascript">
var clicky = { log: function(){ return; }, goal: function(){ return; }};
var clicky_site_id = {text:GetClicky Site ID};
(function() {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = ( document.location.protocol == 'https:' ? 'https://static.getclicky.com/js' : 'http://static.getclicky.com/js' );
( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
})();
</script>
<noscript><p><img alt="Clicky" width="1" height="1" src="http://in.getclicky.com/{text:GetClicky Site ID}ns.gif" /></p></noscript>
{/block:IfGetClickySiteID}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment