<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jetpack Flight Log</title>
	<atom:link href="http://jetpackweb.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://jetpackweb.com/blog</link>
	<description>Rock{et}ing the interweb</description>
	<lastBuildDate>Sun, 12 Jun 2011 17:51:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Manage your third-party Chef cookbooks with knife-github-cookbooks</title>
		<link>http://jetpackweb.com/blog/2011/06/12/manage-your-third-party-chef-cookbooks-with-knife-github-cookbooks/</link>
		<comments>http://jetpackweb.com/blog/2011/06/12/manage-your-third-party-chef-cookbooks-with-knife-github-cookbooks/#comments</comments>
		<pubDate>Sun, 12 Jun 2011 17:51:53 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[chef]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=948</guid>
		<description><![CDATA[The Problem For those using chef to automate your server infrastructure you probably find managing third-party cookbooks to be a pain. Ideally I want to make custom changes to a cookbook while still being able to track for upstream enhancements. A few techniques I see being used are: no tracking: Manually download an archive from [...]]]></description>
			<content:encoded><![CDATA[<h2>The Problem</h2>
<p>For those using <a href="http://wiki.opscode.com/display/chef/Home" target="_blank">chef</a> to automate your server infrastructure you probably find managing third-party cookbooks to be a pain. Ideally I want to make custom changes to a cookbook while still being able to track for upstream enhancements.</p>
<p>A few techniques I see being used are:</p>
<p><strong>no tracking:</strong> Manually download an archive from github or opscode community and drop it in your cookbooks/ directory. Easy to make custom changes but you have no automated way to check for updates.</p>
<p><strong>git submodules:</strong> This tracks upstream well, but unless you own the repo you can&#8217;t make changes.</p>
<p><strong>fork it:</strong> Since pretty much all cookbooks reside on github, so you can fork a copy. This works, but now you might have dozens of different repos to manage. And checking for updates means going into each repo and manually merging in enhancements from the upstream.</p>
<p><strong>knife vendor:</strong> Now we are getting somewhere. Chef&#8217;s knife command has functionality for dealing with third-party cookbooks. It looks something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">knife cookbook site vendor nginx</pre></div></div>

<p>This downloads the nginx cookbook from the opscode community site, puts an unmodified copy in a <i>chef-vendor-nginx</i> git branch, and then puts a copy in your cookbooks/nginx dir in your master branch. When you run the install again it will download the updated version into the chef-vendor-nginx branch, and then merge that into master.</p>
<p>This is a good start, but it has a number of problems. First you are restricted to using what is available on the <a href="http://community.opscode.com/cookbooks" target="_blank">opscode community site</a>. Second, although this seems like a git-centric model, knife is actually downloading a .tar.gz file. In fact if you visited the <a href="http://community.opscode.com/cookbooks/nginx" target="_blank">nginx cookbook page</a> you would see it only offers an archive download, no way to inspect what this cookbook actually provides before installing.</p>
<p>There is a sea of great high-quality cookbooks on github. Since we all know and love git it would be great if we could get the previous functionality but using git repositories as a source instead.</p>
<h2>A Solution</h2>
<p>Enter <a href="https://github.com/websterclay/knife-github-cookbooks" target="_blank">knife-github-cookbooks</a>. This gem enhances the knife command and lets us get the above functionality by pulling from github rather than downloading from opscode. To use it just install the gem and run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">knife cookbook github <span class="kw2">install</span> cookbooks<span class="sy0">/</span>nginx</pre></div></div>

<p>By default it assumes a <i>username</i>/repo from github. So for each cookbook you install you will have a <i>chef-vendor-cookbookname</i> branch storing the upstream copy and a <i>cookbooks/cookbook-name</i> directory in your master branch to make local changes to.</p>
<p>If you want to check for upstream changes:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">knife cookbook github compare nginx</pre></div></div>

<p>That will launch a github compare view. You can even pass this command a different user who has forked the repo and see or merge in changes from that fork! Read more about it on the <a href="https://github.com/websterclay/knife-github-cookbooks" target="_blank">github page</a>.</p>
<p>One thing to keep in mind is this gem doesn&#8217;t pull in required dependencies automatically, so you will have to make sure you download any requirements a cookbook might have. You can check what dependencies a cookbook requires by inspecting the metadata files.</p>
<h2>Bonus Tip!</h2>
<p>Opscode has a github repository full of recipes you probably want to use (<a href="https://github.com/opscode/cookbooks" target="_blank">opscode/cookbooks</a>). Unfortunately using this repository would mean pulling in *all* of those cookbooks. That just clutters up your chef project with cookbooks you don&#8217;t need. Luckily there is <a href="https://github.com/cookbooks" target="_blank">https://github.com/cookbooks</a>! This repository get updated daily and separates each <i>opscode/cookbook</i> cookbook into a separate git repository.</p>
<p>Now you can cherry-pick the cookbooks you want, and manage them with <a href="https://github.com/websterclay/knife-github-cookbooks" target="_blank">knife-github-cookbooks</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2011/06/12/manage-your-third-party-chef-cookbooks-with-knife-github-cookbooks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Io Language Addons (and making them work in Ubuntu)</title>
		<link>http://jetpackweb.com/blog/2011/02/08/io-language-addons-and-making-them-work-in-ubuntu/</link>
		<comments>http://jetpackweb.com/blog/2011/02/08/io-language-addons-and-making-them-work-in-ubuntu/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 20:54:46 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[io-language]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=899</guid>
		<description><![CDATA[My last post detailed how to compile the Io language from source and install it in Ubuntu (10.10 Maverick). Io has a growing set of addons such as GUI&#8217;s, sound and image manipulation, OpenGL, and database support to name a few. However they will not be enabled if you don&#8217;t have the proper development libraries installed. [...]]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://jetpackweb.com/blog/2011/02/05/installing-the-io-language-in-ubuntu/" target="_blank">last post</a> detailed how to compile the Io language from source and install it in Ubuntu (10.10 Maverick). Io has a growing set of addons such as GUI&#8217;s, sound and image manipulation, OpenGL, and database support to name a few. However they will not be enabled if you don&#8217;t have the proper development libraries installed.</p>
<p>I&#8217;ll go through a couple of addons in this article, but if you just want to make sure you have as many dependencies as possible to run the addons here is a line you can paste:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> build-essential cmake libreadline-dev libssl-dev ncurses-dev libffi-dev zlib1g-dev libpcre3-dev libpng-dev libtiff4-dev libjpeg62-dev python-dev libpng-dev libtiff4-dev libjpeg62-dev libmysqlclient-dev libmemcached-dev libtokyocabinet-dev libsqlite3-dev libdbi0-dev libpq-dev libgmp3-dev libogg-dev libvorbis-dev libtaglib-cil-dev libtag1-dev libtheora-dev libsamplerate0-dev libloudmouth1-dev libsndfile1-dev libflac-dev libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libxmu-dev libxi-dev libxml2-dev libyajl-dev uuid-dev liblzo2-dev zlib1g-dev</pre></div></div>

<p>You will need to rebuild Io once these are all installed.</p>
<p>I would encourage you to browse the <span style="color: #808080;">addons/*</span> directory in the Io source tree. There are many good useful addons and samples, although unfortunately there are few that do not seem to currently work or are missing samples, so dust off that book on C <img src='http://jetpackweb.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Sockets</h2>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> libevent-dev</pre></div></div>

<p>Here is a minimal webserver using sockets:</p>

<div class="wp_syntax"><div class="code"><pre class="io">WebRequest := <span class="kw3">Object</span> <span class="kw2">clone</span> <span class="kw2">do</span><span class="br0">&#40;</span>
    cache := <span class="kw3">Map</span> <span class="kw2">clone</span>
    handleSocket := <span class="kw2">method</span><span class="br0">&#40;</span><span class="kw3">socket</span>, <span class="kw3">server</span>,
        <span class="kw3">socket</span> streamReadNextChunk
        <span class="kw1">if</span><span class="br0">&#40;</span><span class="kw3">socket</span> isOpen == false, <span class="kw1">return</span><span class="br0">&#41;</span>
        request := <span class="kw3">socket</span> readBuffer betweenSeq<span class="br0">&#40;</span><span class="st0">&quot;GET &quot;</span>, <span class="st0">&quot; HTTP&quot;</span><span class="br0">&#41;</span>         
&nbsp;
        data := cache atIfAbsentPut<span class="br0">&#40;</span>request,
            writeln<span class="br0">&#40;</span><span class="st0">&quot;caching &quot;</span>, request<span class="br0">&#41;</span>
            f := <span class="kw3">File</span> <span class="kw2">clone</span> with<span class="br0">&#40;</span>request<span class="br0">&#41;</span>
            <span class="kw1">if</span><span class="br0">&#40;</span>f exists, f contents, <span class="kw3">nil</span><span class="br0">&#41;</span>
        <span class="br0">&#41;</span>                                                                
&nbsp;
        <span class="kw1">if</span><span class="br0">&#40;</span>data,
            <span class="kw3">socket</span> streamWrite<span class="br0">&#40;</span><span class="st0">&quot;HTTP/1.0 200 OK<span class="es0">\n</span><span class="es0">\n</span>&quot;</span><span class="br0">&#41;</span>
            <span class="kw3">socket</span> streamWrite<span class="br0">&#40;</span>data<span class="br0">&#41;</span>
        ,
            <span class="kw3">socket</span> streamWrite<span class="br0">&#40;</span><span class="st0">&quot;Not Found&quot;</span><span class="br0">&#41;</span>
        <span class="br0">&#41;</span>                                                                
&nbsp;
        <span class="kw3">socket</span> close
        <span class="kw3">server</span> requests append<span class="br0">&#40;</span><span class="kw2">self</span><span class="br0">&#41;</span>
    <span class="br0">&#41;</span>
<span class="br0">&#41;</span>                                                                        
&nbsp;
WebServer := <span class="kw3">Server</span> <span class="kw2">clone</span> <span class="kw2">do</span><span class="br0">&#40;</span>
    setPort<span class="br0">&#40;</span><span class="nu0">7777</span><span class="br0">&#41;</span>
    <span class="kw3">socket</span> setHost<span class="br0">&#40;</span><span class="st0">&quot;127.0.0.1&quot;</span><span class="br0">&#41;</span>
    requests := <span class="kw2">List</span> <span class="kw2">clone</span>
    handleSocket := <span class="kw2">method</span><span class="br0">&#40;</span><span class="kw3">socket</span>,
        WebRequest handleSocket<span class="br0">&#40;</span><span class="kw3">socket</span>, <span class="kw2">self</span><span class="br0">&#41;</span>
    <span class="br0">&#41;</span>
<span class="br0">&#41;</span> start</pre></div></div>

<p>Lots of other good socket based examples in <span style="color: #808080;">addons/Socket/samples</span>.</p>
<h2>Regex</h2>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> libpcre3-dev</pre></div></div>

<p>That will install Perl Compatible Regular Expression support for Io. You can use it like:</p>

<div class="wp_syntax"><div class="code"><pre class="io"><span class="kw3">regex</span> := <span class="kw3">Regex</span> with<span class="br0">&#40;</span><span class="st0">&quot;(?<span class="es0">\\</span>d+)([ <span class="es0">\t</span>]+)?(?<span class="es0">\\</span>w+)&quot;</span><span class="br0">&#41;</span>
match := <span class="st0">&quot;73noises&quot;</span> matchesOfRegex<span class="br0">&#40;</span><span class="kw3">regex</span><span class="br0">&#41;</span> next</pre></div></div>

<h2>CFFI</h2>
<p>During the configure process you might have noticed a message saying Could NOT find FFI  (missing:  FFI_INCLUDE_DIRS).  <a href="http://en.wikipedia.org/wiki/Foreign_function_interface" target="_blank">FFI</a> (foreign function interface) is basically a system that lets us call functions in different programming languages. First make sure you have the development libraries:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> libffi-dev</pre></div></div>

<p>How FFI functions is very architecture and compiler dependent, and it seems debian places the includes in a location the cmake scripts aren&#8217;t looking. I&#8217;m not that familiar with cmake and couldn&#8217;t find a very elegant solution, so just place the following line in the <span style="color: #808080;">modules/FindFFI.cmake</span> script:</p>

<div class="wp_syntax"><div class="code"><pre class="cmake">$ vim modules/FindFFI.cmake
&nbsp;
<span class="co1"># Add the following line</span>
<span class="kw1">set</span><span class="sy0">(</span>FFI_INCLUDE_DIRS /usr/include/x86_64-linux-gnu<span class="sy0">)</span>
<span class="co1"># Above these two</span>
<span class="kw1">include</span><span class="sy0">(</span>FindPackageHandleStandardArgs<span class="sy0">)</span>
FIND_PACKAGE_HANDLE_STANDARD_ARGS<span class="sy0">(</span>FFI DEFAULT_MSG FFI_INCLUDE_DIRS FFI_LIBRARIES<span class="sy0">)</span></pre></div></div>

<p>Here is a small program that gets us direct access to libc&#8217;s puts(3) function:</p>

<div class="wp_syntax"><div class="code"><pre class="io">CFFI
&nbsp;
lib := Library <span class="kw2">clone</span> setName<span class="br0">&#40;</span><span class="st0">&quot;libc.so.6&quot;</span><span class="br0">&#41;</span>
puts := Function with<span class="br0">&#40;</span>Types CString<span class="br0">&#41;</span> setLibrary<span class="br0">&#40;</span>lib<span class="br0">&#41;</span> setName<span class="br0">&#40;</span><span class="st0">&quot;puts&quot;</span><span class="br0">&#41;</span>
&nbsp;
puts <span class="st0">&quot;Hello Io!&quot;</span></pre></div></div>

<h2>Python</h2>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> python-dev</pre></div></div>

<p>Want to access Python from Io?</p>

<div class="wp_syntax"><div class="code"><pre class="io"><span class="co2"># Import a module</span>
sys := Python import<span class="br0">&#40;</span><span class="st0">&quot;sys&quot;</span><span class="br0">&#41;</span>
&nbsp;
<span class="st0">&quot;Which version of python are we running?&quot;</span> println
sys version println
&nbsp;
<span class="st0">&quot;Split a string&quot;</span> println
str := <span class="st0">&quot;Brave brave Sir Robin&quot;</span>
str println
<span class="kw3">string</span> split<span class="br0">&#40;</span>str<span class="br0">&#41;</span> println
&nbsp;
<span class="st0">&quot;Load a C module (.so)&quot;</span> println
t := Python import<span class="br0">&#40;</span><span class="st0">&quot;time&quot;</span><span class="br0">&#41;</span>
&nbsp;
writeln<span class="br0">&#40;</span><span class="st0">&quot;Current time is: &quot;</span>, t time<span class="br0">&#41;</span></pre></div></div>

<h2>Databases</h2>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> libmysqlclient-dev libmemcache-dev libtokyocabinet-dev libsqlite3-dev libdbi0-dev</pre></div></div>

<p>Io has addons for MySQL, PostgresQL, memcached, Tokyo Cabinet, SQLite and a few others.</p>
<h2>Sound</h2>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> libgmp3-dev libogg-dev libvorbis-dev libtaglib-cil-dev libtag1-dev libtheora-dev libsamplerate0-dev libloudmouth1-dev libsndfile1-dev libflac-dev</pre></div></div>

<p>Various sound processing libraries.</p>
<h2>Images</h2>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> libpng-dev libtiff4-dev libjpeg62-dev</pre></div></div>

<p>Various image loading libraries.</p>
<h2>GUI</h2>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> x11proto-xf86misc-dev xutils-dev libxpm-dev libpango1.0-dev libcairo2-dev libfreetype6-dev 
&nbsp;
$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> libclutter-<span class="nu0">1.0</span>-dev libatk1.0-dev</pre></div></div>

<p>There is also a GUI called Flux that requires OpenGL support. I wasn&#8217;t able to get it working however.</p>
<h2>OpenGL</h2>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev libxmu-dev libxi-dev</pre></div></div>

<p>Lots of great examples in <span style="color: #808080;">addons/OpenGL/samples</span>.</p>
<h2>XML and JSON</h2>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> libxml2-dev libyajl-dev</pre></div></div>

<p>If you need to do any XML or JSON parsing.</p>
<h2>UUID</h2>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> uuid-dev</pre></div></div>

<p>Support for UUID generator. Seems to be broken however.</p>
<h2>Misc</h2>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> libreadline-dev libssl-dev ncurses-dev libffi-dev zlib1g-dev liblzo2-dev zlib1g-dev</pre></div></div>

<p>SSL, archives, REPL history, curses GUI.</p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2011/02/08/io-language-addons-and-making-them-work-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Installing the Io Language in Ubuntu</title>
		<link>http://jetpackweb.com/blog/2011/02/05/installing-the-io-language-in-ubuntu/</link>
		<comments>http://jetpackweb.com/blog/2011/02/05/installing-the-io-language-in-ubuntu/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 17:30:32 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[io-language]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=884</guid>
		<description><![CDATA[I have recently begun reading through Bruce Tate&#8217;s fun Seven Languages In Seven Weeks book. One of the chapters focuses the Io language and it&#8217;s installation can be a little bit non-standard to get it to my liking. Generally on my development machine when I compile from source I like to install locally to my [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently begun reading through <a href="http://twitter.com/#!/redrapids" target="_blank">Bruce Tate&#8217;s</a> fun <a href="http://www.pragprog.com/titles/btlang/seven-languages-in-seven-weeks" target="_blank">Seven Languages In Seven Weeks</a> book. One of the chapters focuses the <a href="http://iolanguage.com/" target="_blank">Io language</a> and it&#8217;s installation can be a little bit non-standard to get it to my liking.</p>
<p>Generally on my development machine when I compile from source I like to install locally to my home directory rather than system wide. This way sudo privileges are not needed plus I just like the idea of keeping these items close to home.</p>
<p>First <strong>Io</strong> requires the cmake build system so make sure that is available.</p>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> cmake</pre></div></div>

<p>Next download and extract the source code.</p>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">wget</span> <span class="re5">--no-check-certificate</span> http:<span class="sy0">//</span>github.com<span class="sy0">/</span>stevedekorte<span class="sy0">/</span>io<span class="sy0">/</span>zipball<span class="sy0">/</span>master <span class="re5">-O</span> io-lang.zip
$ <span class="kw2">unzip</span> io-lang.zip
$ <span class="kw3">cd</span> stevedekorte-io-<span class="br0">&#91;</span><span class="kw3">hash</span><span class="br0">&#93;</span></pre></div></div>

<p>Io provides a build script, however it is setup to install the language to /usr/local. Since I want it to go in $HOME/local you just need to modify that file. Here is a quick one liner:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">sed</span> <span class="re5">-i</span> <span class="re5">-e</span> <span class="st_h">'s/^INSTALL_PREFIX=&quot;\/usr\/local/INSTALL_PREFIX=&quot;$HOME\/local/'</span> build.sh</pre></div></div>

<p>Now build and install.</p>

<div class="wp_syntax"><div class="code"><pre class="bash">$ .<span class="sy0">/</span>build.sh
$ .<span class="sy0">/</span>build.sh <span class="kw2">install</span></pre></div></div>

<p>Since we are installing into a location our OS doesn&#8217;t really know about, we need to configure a few paths.</p>

<div class="wp_syntax"><div class="code"><pre class="bash">$ <span class="kw2">vim</span> ~<span class="sy0">/</span>.bashrc
<span class="kw3">export</span> <span class="re2">PATH</span>=<span class="st0">&quot;<span class="es3">${HOME}</span>/local/bin:<span class="es3">${PATH}</span>&quot;</span>
<span class="kw3">export</span> <span class="re2">LD_LIBRARY_PATH</span>=<span class="st0">&quot;<span class="es3">${HOME}</span>/local/lib:<span class="es3">${LD_LIBRARY_PATH}</span>&quot;</span>
&nbsp;
<span class="co0"># You might want these too</span>
<span class="kw3">export</span> <span class="re2">LD_RUN_PATH</span>=<span class="re1">$LD_LIBRARY_PATH</span>
<span class="kw3">export</span> <span class="re2">CPPFLAGS</span>=<span class="st0">&quot;-I<span class="es3">${HOME}</span>/local/include&quot;</span>
<span class="kw3">export</span> <span class="re2">CXXFLAGS</span>=<span class="re1">$CPPFLAGS</span>
<span class="kw3">export</span> <span class="re2">CFLAGS</span>=<span class="re1">$CPPFLAGS</span>
<span class="kw3">export</span> <span class="re2">MANPATH</span>=<span class="st0">&quot;<span class="es3">${HOME}</span>/local/share/man:<span class="es3">${MANPATH}</span>&quot;</span></pre></div></div>

<p>Lastly restart your shell and type &#8216;io&#8217; and you should be dropped into Io&#8217;s REPL!</p>
<p>A side benefit to this method is you can install anything you build into <strong>$HOME/local</strong>. Usually you just need to pass the <i>&#8211;prefix=$HOME/local</i> parameter when you run a <i>./configure</i> script.</p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2011/02/05/installing-the-io-language-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Pretty Paging in Rails Console</title>
		<link>http://jetpackweb.com/blog/2011/01/20/pretty-paging-in-rails-console/</link>
		<comments>http://jetpackweb.com/blog/2011/01/20/pretty-paging-in-rails-console/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 22:07:44 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=859</guid>
		<description><![CDATA[When using irb or Rails console I use the awesome_print gem to get nicer colorized output. I also like to use looksee to examine method lookup paths which the gem colorizes nicely. For large objects looksee can produce a lot of output and if there is more output than your terminal can display at once [...]]]></description>
			<content:encoded><![CDATA[<p>When using irb or Rails console I use the <a href="https://github.com/michaeldv/awesome_print" target="_blank">awesome_print</a> gem to get nicer colorized output. I also like to use <a href="https://github.com/oggy/looksee">looksee</a> to examine method lookup paths which the gem colorizes nicely. For large objects looksee can produce a lot of output and if there is more output than your terminal can display at once it will get handed off to your system&#8217;s pager (probably <a href="http://en.wikipedia.org/wiki/Less_(Unix)">less</a>). I was having an issue while in Rails console when the output got paged it would show the ANSI color escape codes rather than colorized text (this didn&#8217;t happen in irb for whatever reason).</p>
<p>Luckily <em>less</em> has a flag that will repaint the screen when paging. To make it a default you need to export a LESS variable to your shell&#8217;s environment. Something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="kw3">export</span> <span class="re2">LESS</span>=<span class="st0">&quot;-R&quot;</span></pre></div></div>

<p>Just throw that in your ~/.bashrc or <a href="https://github.com/anveo/dotfiles/commit/db1f89cd9b8e50525bca3901bcf7f121cab41ce8#L0R3" target="_blank">dotfiles</a> and you&#8217;re all set!</p>
<p><img class="aligncenter size-large wp-image-868" title="Screenshot-Terminal" src="http://jetpackweb.com/blog/wp-content/uploads/2011/01/Screenshot-Terminal-1024x550.png" alt="" width="950" height="525" /></p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2011/01/20/pretty-paging-in-rails-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making monit, delayed_job, and bundler play nice together</title>
		<link>http://jetpackweb.com/blog/2010/05/19/making-monit-delayed_job-and-bundler-play-nice-together/</link>
		<comments>http://jetpackweb.com/blog/2010/05/19/making-monit-delayed_job-and-bundler-play-nice-together/#comments</comments>
		<pubDate>Wed, 19 May 2010 22:21:53 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[bundler]]></category>
		<category><![CDATA[delayed_job]]></category>
		<category><![CDATA[monit]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=831</guid>
		<description><![CDATA[Recently I was having a heck of a time getting monit to start my delayed_job instances. I was using the monit template that came with delayed job, it looks something like this: check process delayed_job_bandwith_prod with pidfile /home/bandwith/apps/production/shared/pids/delayed_job.pid start program = &#34;/usr/bin/env RAILS_ENV=production /home/bandwith/apps/production/current/script/delayed_job start&#34; as uid bandwith and gid bandwith stop program = &#34;/usr/bin/env [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was having a heck of a time getting <a href="http://mmonit.com/monit/" target="_blank">monit</a> to start my <a href="http://github.com/collectiveidea/delayed_job" target="_blank">delayed_job</a> instances. I was using the monit template that came with delayed job, it looks something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">check process delayed_job_bandwith_prod 
  with pidfile <span class="sy0">/</span>home<span class="sy0">/</span>bandwith<span class="sy0">/</span>apps<span class="sy0">/</span>production<span class="sy0">/</span>shared<span class="sy0">/</span>pids<span class="sy0">/</span>delayed_job.pid
  start program = <span class="st0">&quot;/usr/bin/env RAILS_ENV=production /home/bandwith/apps/production/current/script/delayed_job start&quot;</span> <span class="kw2">as</span> uid bandwith and gid bandwith 
  stop program  = <span class="st0">&quot;/usr/bin/env RAILS_ENV=production /home/bandwith/apps/production/current/script/delayed_job stop&quot;</span> <span class="kw2">as</span> uid bandwith and gid bandwith</pre></div></div>

<p>This did not work however, and after quite a bit of debugging I found there are a couple of issues you might need to be aware of:</p>
<h2>1. Your $PATH</h2>
<p>monit starts things with a &#8216;<em>spartan path</em>&#8216; of:</p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="sy0">/</span>bin:<span class="sy0">/</span>usr<span class="sy0">/</span>bin:<span class="sy0">/</span>sbin:<span class="sy0">/</span>usr<span class="sy0">/</span>sbin</pre></div></div>

<p>My ruby happens to be in /usr/local/bin, so we will need to pass that in too:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">start program = <span class="st0">&quot;/usr/bin/env PATH=/usr/local/bin:PATH RAILS_ENV=production /var/www/apps/{app_name}/current/script/delayed_job start&quot;</span></pre></div></div>

<h2>2. monit doesn&#8217;t define a $HOME environment variable</h2>
<p>Even though we are starting these processes with uids and guids specified, that doesn&#8217;t actually load the users shell. With no $HOME env variable, <a href="http://gembundler.com/" target="_blank">bundler</a> can&#8217;t find where your gems are installed and thinks they are all missing. I ended up just putting the variable in the monit command, another option might be running <em>su -c &#8216;{command}&#8217;</em> (I didn&#8217;t test that).</p>
<p>So putting that all together you get the following which should make everything work:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">check process delayed_job_bandwith_prod 
  with pidfile <span class="sy0">/</span>home<span class="sy0">/</span>bandwith<span class="sy0">/</span>apps<span class="sy0">/</span>production<span class="sy0">/</span>shared<span class="sy0">/</span>pids<span class="sy0">/</span>delayed_job.pid
  start program = <span class="st0">&quot;/usr/bin/env HOME=/home/bandwith PATH=/usr/local/bin:<span class="es2">$PATH</span> RAILS_ENV=production /home/bandwith/apps/production/current/script/delayed_job start&quot;</span> <span class="kw2">as</span> uid bandwith and gid bandwith 
  stop program  = <span class="st0">&quot;/usr/bin/env HOME=/home/bandwith PATH=/usr/local/bin:<span class="es2">$PATH</span> RAILS_ENV=production /home/bandwith/apps/production/current/script/delayed_job stop&quot;</span> <span class="kw2">as</span> uid bandwith and gid bandwith</pre></div></div>

<p>I would be interested to know if anyone has any better suggestions, but this seems to be working nicely.</p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2010/05/19/making-monit-delayed_job-and-bundler-play-nice-together/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Netopia Routers, Slow DNS, and IPv6</title>
		<link>http://jetpackweb.com/blog/2010/05/05/netopia-routers-slow-dns-and-ipv6/</link>
		<comments>http://jetpackweb.com/blog/2010/05/05/netopia-routers-slow-dns-and-ipv6/#comments</comments>
		<pubDate>Wed, 05 May 2010 18:51:34 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ipv6]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=827</guid>
		<description><![CDATA[We have been having issues for a while where DNS lookups in Ubuntu setups have been taking significant amounts of time. We learned turning off IPv6 support in Firefox would fix the issue for that application, but we needed a system wide fix. It turns out the Netopia router(3347) seems to have issues with IPv6 [...]]]></description>
			<content:encoded><![CDATA[<p>We have been having issues for a while where DNS lookups in Ubuntu setups have been taking significant amounts of time. We learned turning off IPv6 support in Firefox would fix the issue for that application, but we needed a system wide fix. </p>
<p>It turns out the Netopia router(3347) seems to have issues with IPv6 AAAA requests when acting as a DNS proxy to our ISP. Any linux computer that was getting DNS info via DHCP was generally being affected. There is no way to fix this in the Netopia web-gui, but we can telnet into the router and twiddle some things. Run the following commands once you log in:</p>

<div class="wp_syntax"><div class="code"><pre class="bash">configure
<span class="kw1">set</span> dns proxy-enable off
save
<span class="kw3">exit</span>
restart</pre></div></div>

<p>Once the router restarts DNS look-ups will be quite snappy!</p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2010/05/05/netopia-routers-slow-dns-and-ipv6/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.4 (Lucid Lynx) and Broadcom BCM4312</title>
		<link>http://jetpackweb.com/blog/2010/04/30/ubuntu-10-4-lucid-lynx-and-broadcom-bcm4312/</link>
		<comments>http://jetpackweb.com/blog/2010/04/30/ubuntu-10-4-lucid-lynx-and-broadcom-bcm4312/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 20:09:47 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[desktop]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=823</guid>
		<description><![CDATA[This is basically just a repost of the same issue I had when Karmic Koala launched Ubuntu 10.4 (Lucid Lynx) launched today and I figured it was time to do an install from scratch onto my Dell D830 Latitude laptop. Everything went quite smoothly but when it started up I noticed two issues: Problem 1: [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is basically just a repost of the same issue I had when <a href="http://jetpackweb.com/blog/2009/10/29/ubuntu-9-10-karmic-koala-and-broadcom-bcm4312/" target="_blank">Karmic Koala launched</a></em></p>
<p>Ubuntu 10.4 (Lucid Lynx) launched today and I figured it was time to do an install from scratch onto my Dell D830 Latitude laptop. Everything went quite smoothly but when it started up I noticed two issues:</p>
<p><b>Problem 1: No wireless</b></p>
<p>I know the Broadcom card inside the laptop isn&#8217;t the greatest, but the last two Ubuntu releases it has worked out of the box. The following command enabled the card after a reboot:</p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> bcmwl-kernel-source</pre></div></div>

<p><b>Problem 2: Really slow DNS lookups (because of IPV6)</b></p>
<p>As <a href="https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/417757" target="_blank">documented on Launchpad</a>, there still doesn&#8217;t seem to be an official fix. Strangely disabling IPV6 in <i>/etc/sysctl.conf</i> didn&#8217;t solve anything, however disabling it in Firefox at least fixes the issue in the browser. Just type <b>about:config</b> in the address bar, and set <b>network.dns.disableIPv6</b> to <b>false</b>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2010/04/30/ubuntu-10-4-lucid-lynx-and-broadcom-bcm4312/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Vim for Rails Developers Screencast</title>
		<link>http://jetpackweb.com/blog/2010/04/30/vim-for-rails-developers-screencast/</link>
		<comments>http://jetpackweb.com/blog/2010/04/30/vim-for-rails-developers-screencast/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 17:37:31 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=799</guid>
		<description><![CDATA[Ben Orenstein was kind enough to send me a review copy of his Vim for Rails Developers screencast. Vim is pretty much the only text editor I have used for a few years now and I consider myself a fairly experienced user. This screencast showed me some useful new tips that I have been able [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com/r00k" target="_blank">Ben Orenstein</a> was kind enough to send me a review copy of his <a href="http://www.codeulatescreencasts.com/products/vim-for-rails-developers" target="_blank">Vim for Rails Developers</a> screencast. <a href="http://www.vim.org" target="_blank">Vim</a> is pretty much the only text editor I have used for a few years now and I consider myself a fairly experienced user. This screencast showed me some useful new tips that I have been able to integrate into my daily workflow.</p>
<p>Much of the screencast focuses on the excellent <a href="http://rails.vim.tpope.net/" target="_blank">rails.vim</a> plugin, primarily using it to move around your project in incredibly efficient ways. He also covers <a href="http://www.vim.org/scripts/script.php?script_id=2540" target="_blank">snipMate</a>, <a href="http://ctags.sourceforge.net" target="_blank">ctags</a>, and searching with <a href="http://betterthangrep.com" target="_blank">ack</a>. I found his advice on using ctags quite useful for jumping around the rails source code.</p>
<p>Ben is well spoken and well paced, and I hope to see more screencasts from him(especially ones focusing on vim). <em>rails.vim</em> in particular has much more functionality to offer that I would love to see covered. If you enjoy the visual/audible style of learning be sure to also checkout <a href="http://vimcasts.org" target="_blank">vimcasts.org</a> for more vim related screencasts.</p>
<p>This screencast probably best for late-beginner to moderately skilled vim users, but even advanced users will probably learn a new technique or two. It might be a bit overwhelming if you are incredibly new to vim as it&#8217;s focus is on usage and not getting things setup or configured.</p>
<p>Overall I feel if you are looking to get serious with vim the $9 will quickly pay for itself.</p>
<p><strong>More resources:</strong></p>
<p>The Screencast: <a href="http://www.codeulatescreencasts.com/products/vim-for-rails-developers" target="_blank">Vim for Rails Developers</a><br />
My <a href="http://github.com/anveo/vimfiles" target="_blank">vimfiles</a><br />
Ben&#8217;s <a href="http://github.com/r00k/dotfiles" target="_blank">vimfiles</a><br />
Ben&#8217;s <a href="http://twitter.com/r00k" target="_blank">twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2010/04/30/vim-for-rails-developers-screencast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Write HTML Faster with Sparkup (Vim and Textmate)</title>
		<link>http://jetpackweb.com/blog/2010/03/04/write-html-faster-with-sparkup-vim-and-textmate/</link>
		<comments>http://jetpackweb.com/blog/2010/03/04/write-html-faster-with-sparkup-vim-and-textmate/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 18:58:31 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[textmate]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[sparkup]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=770</guid>
		<description><![CDATA[I recently came across a really great Vim(and Textmate) plug-in called sparkup.vim that &#8220;lets you write HTML code faster&#8221;. It&#8217;s actually a small python script, but has editor plug-ins to work with Vim and Textmate. It allows us to write HTML faster by leveraging the terse css selector syntax and converting it the much more [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across a really great Vim(and Textmate) plug-in called <a href="http://github.com/rstacruz/sparkup" target="_blank">sparkup.vim</a> that &#8220;lets you write HTML code faster&#8221;. It&#8217;s actually a small python script, but has editor plug-ins to work with Vim and Textmate. It allows us to write HTML faster by leveraging the terse css selector syntax and converting it the much more verbose HTML.</p>
<h2>Selector Expansion</h2>
<p>Selector expansion is the plug-in&#8217;s primary purpose. It lets you write in a CSS selector syntax that get expanded to full HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="css"><span class="re0">#album</span>.photo</pre></div></div>

<p>If you type that into vim and then press <strong>Ctrl-e</strong> on that line it will be expanded to:</p>

<div class="wp_syntax"><div class="code"><pre class="xml"><span class="sc3"><span class="re1">&lt;div</span> <span class="re0">id</span>=<span class="st0">&quot;album&quot;</span> <span class="re0">class</span>=<span class="st0">&quot;photo&quot;</span><span class="re2">&gt;</span></span>|<span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span></pre></div></div>

<p>This next one is a bit more complicated, I&#8217;ll explain what&#8217;s going on:</p>

<div class="wp_syntax"><div class="code"><pre class="css"><span class="re0">#container</span> <span class="sy0">&gt;</span> <span class="re0">#nav</span> <span class="sy0">&gt;</span> ul <span class="sy0">&gt;</span> li<span class="re1">.first</span> <span class="br0">&#123;</span>Home<span class="br0">&#125;</span> <span class="sy0">+</span> li<span class="sy0">*</span><span class="nu0">2</span> <span class="sy0">+</span> li<span class="re1">.last</span> <span class="br0">&#123;</span>About Us<span class="br0">&#125;</span> &lt; &lt;  <span class="re0">#content</span> <span class="sy0">&gt;</span> p<span class="sy0">*</span><span class="nu0">2</span> &lt; <span class="re0">#footer</span> <span class="sy0">&gt;</span> span<span class="re1">.copyright</span> <span class="br0">&#123;</span><span class="br0">&#40;</span>c<span class="br0">&#41;</span> <span class="nu0">2010</span> Jetpack LLC<span class="br0">&#125;</span></pre></div></div>

<blockquote>
<ol>
<li>Creating a div with the id of &#8220;container&#8221;</li>
<li>Creating a div with an id of &#8220;<i>nav</i>&#8221; that is a child of the &#8220;<i>container</i>&#8221; div. The > specifies we are creating a child element in the DOM tree.</li>
<li>Creating a ul tag that is a child of &#8220;<i>nav</i>&#8220;</li>
<li>Creating an li tag with the class name &#8220;<i>first</i>&#8220;. Text in brackets will be plain text placed in-between the tag we are creating.</li>
<li>Creating two sibling li elements. The <strong>+</strong> denotes what comes next will be a sibling. The <strong>*</strong> is a multiplier to create any number of similar elements.</li>
<li>Creating an li tag with the class name &#8220;<i>last</i>&#8221; as a sibling to the previous li elements we have created. It will contain the text &#8216;<i>About Us</i>&#8216;.</li>
<li>Next now use the <strong><</strong> symbol to go up two levels of the DOM tree.</li>
<li>Next we create a div with the id of &#8220;<i>content</i>&#8221; that will contain two paragraph tags.</li>
<li>We go back up a level and add a footer div that will have a span with the class of &#8220;<i>copyright</i>&#8221; that contains some boilerplate copyright text.</li>
</ol>
</blockquote>
<p>If we press <strong>Ctrl-e</strong> on that line, it will be expanded to the following:</p>

<div class="wp_syntax"><div class="code"><pre class="xml">  <span class="sc3"><span class="re1">&lt;div</span> <span class="re0">id</span>=<span class="st0">&quot;container&quot;</span><span class="re2">&gt;</span></span>
    <span class="sc3"><span class="re1">&lt;div</span> <span class="re0">id</span>=<span class="st0">&quot;nav&quot;</span><span class="re2">&gt;</span></span>
      <span class="sc3"><span class="re1">&lt;ul<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;li</span> <span class="re0">class</span>=<span class="st0">&quot;first&quot;</span><span class="re2">&gt;</span></span>Home<span class="sc3"><span class="re1">&lt;/li<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;li<span class="re2">&gt;</span></span></span>|<span class="sc3"><span class="re1">&lt;/li<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;li<span class="re2">&gt;</span></span><span class="re1">&lt;/li<span class="re2">&gt;</span></span></span>
        <span class="sc3"><span class="re1">&lt;li</span> <span class="re0">class</span>=<span class="st0">&quot;last&quot;</span><span class="re2">&gt;</span></span>About Us<span class="sc3"><span class="re1">&lt;/li<span class="re2">&gt;</span></span></span>
      <span class="sc3"><span class="re1">&lt;/ul<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;div</span> <span class="re0">id</span>=<span class="st0">&quot;content&quot;</span><span class="re2">&gt;</span></span>
      <span class="sc3"><span class="re1">&lt;p<span class="re2">&gt;</span></span><span class="re1">&lt;/p<span class="re2">&gt;</span></span></span>
      <span class="sc3"><span class="re1">&lt;p<span class="re2">&gt;</span></span><span class="re1">&lt;/p<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;div</span> <span class="re0">id</span>=<span class="st0">&quot;footer&quot;</span><span class="re2">&gt;</span></span>
      <span class="sc3"><span class="re1">&lt;span</span> <span class="re0">class</span>=<span class="st0">&quot;copyright&quot;</span><span class="re2">&gt;</span></span>(c) 2010 Jetpack LLC<span class="sc3"><span class="re1">&lt;/span<span class="re2">&gt;</span></span></span>
    <span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span>
  <span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span></pre></div></div>

<p>It will also place your cursor in the first empty tag denoted by the <strong>|</strong>. You can jump around to other empty tags with <strong>Ctrl-n</strong> (I change this mapping, more on that in a second).</p>
<p>If you are a fan of <a href="http://haml-lang.com/" target="_blank">HAML</a> but forced to use standard HTML in your projects this plug-in might make you a bit happier.</p>
<h2>Shortcuts</h2>
<p>The other piece of functionality this plug-in provides is a <a href="http://www.vim.org/scripts/script.php?script_id=2540" target="_blank">snipMate</a> like shortcuts feature. These act much like snipMate snippets except they are hard-coded into the python script. However most are still quite useful and you can view the <a href="http://github.com/rstacruz/sparkup/blob/master/sparkup" target="_bank">python script</a> to review them.</p>
<h2>Issues</h2>
<p>After installing this plugin I was having tabbing/tab-expansion issues. I believe it&#8217;s <strong>Ctrl-n</strong> mapping which allows you to jump around to empty tags was conflicting with some other plug-in I had installed, possibly <a href="http://www.vim.org/scripts/script.php?script_id=1643" target="_blank">SuperTab</a>. I remapped it by putting the following in my .vimrc:</p>

<div class="wp_syntax"><div class="code"><pre class="vim"><span class="kw1">let</span> g<span class="sy0">:</span>sparkupNextMapping = <span class="st0">'&lt;c-x&gt;'</span></pre></div></div>

<p>That doesn&#8217;t seem to conflict with anything for me, and since it only gets used in normal mode it doesn&#8217;t conflict with Tim Pope&#8217;s excellent <a href="http://github.com/tpope/vim-ragtag" target="_blank">ragtag</a> plug-in (<a href="http://www.catonmat.net/blog/vim-plugins-ragtag-allml-vim/" target="_blank">read more on that here</a>).</p>
<h2>Video Demonstration</h2>
<p>Some of this might make more sense when you see it in action, so watch the following YouTube video(make sure to switch it to 720p for crisper text):</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/Jw3jipcenKc&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Jw3jipcenKc&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<h2>Conclusion</h2>
<p>Have fun writing faster HTML! You can see more examples on <a href="http://github.com/rstacruz/sparkup" target="_blank">sparkup&#8217;s Github page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2010/03/04/write-html-faster-with-sparkup-vim-and-textmate/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Mac OS X like Alt-Tab Mouse Selection in Ubuntu</title>
		<link>http://jetpackweb.com/blog/2010/02/25/mac-os-x-like-alt-tab-mouse-selection-in-ubuntu/</link>
		<comments>http://jetpackweb.com/blog/2010/02/25/mac-os-x-like-alt-tab-mouse-selection-in-ubuntu/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 16:40:42 +0000</pubDate>
		<dc:creator>Brian Racer</dc:creator>
				<category><![CDATA[osx]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://jetpackweb.com/blog/?p=766</guid>
		<description><![CDATA[I like how in OS X when I Alt-Tab I can pick a window or icon with a mouse click. I recently figured out how do get Ubuntu to perform in a similar fashion. First we need to install the CompizConfig Settings Manager (yes, you will need to be using compiz for this): sudo apt-get [...]]]></description>
			<content:encoded><![CDATA[<p>I like how in OS X when I Alt-Tab I can pick a window or icon with a mouse click. I recently figured out how do get Ubuntu to perform in a similar fashion. First we need to install the <strong>CompizConfig Settings Manager</strong> (yes, you will need to be using compiz for this):</p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> compizconfig-settings-manager</pre></div></div>

<p>Next navigate the system menu to <strong>System -> Preferences -> CompizConfig Settings Manager</strong>. The app should start so next scroll down to the <strong>Window Management</strong> section and click on <strong>Static Application Switcher</strong>. Next click the <strong>Behavior</strong> tab and the last option will be &#8216;<strong>Allow Mouse Selection</strong>&#8216;. Enable that check-box and exit the application.</p>
<p>It&#8217;s not quite as nice as OS X &#8211; you can only select by clicking, just mousing over won&#8217;t make each item the active target, but it&#8217;s better than nothing!</p>
]]></content:encoded>
			<wfw:commentRss>http://jetpackweb.com/blog/2010/02/25/mac-os-x-like-alt-tab-mouse-selection-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

