<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0" xml:base="http://spf13.com/frontpage">
  <channel>
    <title>spf13.com - IT, Web 2.0 and Social Media ramblings of Steve Francia</title>
    <link>http://spf13.com/frontpage</link>
    <description />
    <language>en</language>
          <feedburner:info uri="spf13" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://spf13.com/xml.rss" /><feedburner:emailServiceId>spf13</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://spf13.com/xml.rss" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Fspf13.com%2Fxml.rss" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><feedburner:browserFriendly>Please enjoy Subscribing to Steve Francia's Blog, spf13.com . </feedburner:browserFriendly><item>
    <title>Transitions</title>
    <link>http://feedproxy.google.com/~r/spf13/~3/YxiGIPWvyR0/transitions</link>
    <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/spf13/4417367185/" title="Open Sky Logo by steve.francia, on Flickr" style="float: right; padding: 10px;"&gt;&lt;img src="http://farm5.static.flickr.com/4040/4417367185_e4a389b349_o.png" alt="Open Sky Logo" height="78" width="139"&gt;&lt;/a&gt;
I couldn&amp;#8217;t be more excited to announce that I have accepted a position at &lt;a href="http://theopenskyproject.com"&gt;The Open Sky Project&lt;/a&gt;. I am leading the architecture, development and&amp;nbsp;technology.&lt;/p&gt;

&lt;p&gt;It’s rare in life that one has the opportunity to do what they love to do and be paid to do it. Even rarer is to do something great with people you love working with. At OpenSky I have found this and more. There is an energy and excitement at OpenSky; come spend 10 minutes in our office and you will feel it. The team is passionate about what they are doing and the passion is growing.
&lt;!--break--&gt;
OpenSky has assembled the strongest team I have ever seen at an early stage startup. Each member of the management team has excelled in their particular domain and exhibits youthful passion for doing it. This level of deep experience allows us to focus on building the business, which is hard enough without the distraction of trying to learn how to do your job as&amp;nbsp;well.&lt;/p&gt;

&lt;p&gt;The more time I spend at OpenSky, the more impressed I am. There isn’t a weak link in the chain, and when you combine this with a great idea, good things are bound to happen. I couldn’t be more excited to be a part of this team working together to build the next great e-commerce&amp;nbsp;revolution.&lt;/p&gt;

&lt;p&gt;We are at a really good place right now. All startups begin with an idea, turn it into an experiment, and if that goes well, build a business around it. We are at the exciting stage where the experiment was not only successful but exceeded all possible expectations. Now we get to go full speed ahead building a great business and all the technology and systems to power&amp;nbsp;it.&lt;/p&gt;

&lt;p&gt;We have the challenge and opportunity to build a modern scalable e-commerce system using the best open source software, libraries and&amp;nbsp;technologies.&lt;/p&gt;

&lt;p&gt;I am looking for the best and brightest to come and join our great team of all star engineers. If you’re interested give me a shout out on &lt;a href="http://twitter.com/spf13"&gt;twitter @spf13&lt;/a&gt; or check out &lt;a href="http://theopenskyproject.com/join"&gt;our jobs page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you want to find out more about OpenSky, come check out &lt;a href="http://blog.theopenskyproject.com"&gt;our&amp;nbsp;blog!&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/spf13?a=YxiGIPWvyR0:Dpvlpj7RV1c:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/spf13?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/spf13/~4/YxiGIPWvyR0" height="1" width="1"/&gt;</description>
     <comments>http://spf13.com/post/transitions#comments</comments>
 <category domain="http://spf13.com/tags/opensky">openSky</category>
 <category domain="http://spf13.com/category/leadership">Leadership</category>
 <category domain="http://spf13.com/category/personal">personal</category>
 <pubDate>Mon, 08 Mar 2010 20:39:40 +0000</pubDate>
 <dc:creator>Steve Francia</dc:creator>
 <guid isPermaLink="false">2256 at http://spf13.com</guid>
  <feedburner:origLink>http://spf13.com/post/transitions</feedburner:origLink></item>
  <item>
    <title>VIM Crash Course</title>
    <link>http://feedproxy.google.com/~r/spf13/~3/GN4_VfNY7Qo/vim-crash-course</link>
    <description>&lt;div class="zemanta-img" style="margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; float: right; display: block; width: 138px; "&gt;&lt;a href="http://commons.wikipedia.org/wiki/Image:Vim_gloss_128.png"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/4/4a/Vim_gloss_128.png" alt="MacVim icon, glossy style" style="border:none;display:block" width="128" height="128"&gt;&lt;/a&gt;&lt;p class="zemanta-img-attribution" style="font-size:0.8em;"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/Image:Vim_gloss_128.png"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;Most developers know the basics of &lt;span class="caps"&gt;VIM&lt;/span&gt;, enough to edit a conf file, but most stay there, unaware of the power and beauty of vim. 
One of my developers has expressed desire to abandon the bloated &lt;span class="caps"&gt;GUI&lt;/span&gt; ways of eclipse and discover &lt;span class="caps"&gt;VIM&lt;/span&gt;. 
I have been using &lt;span class="caps"&gt;VIM&lt;/span&gt; for such a long time I forgot how difficult that transition is. 
Here are some resources and approaches to help you learn vim.
&lt;!--break--&gt;
The easiest place to start is by using a tutor. 
 Did you know that &lt;a class="zem_slink rdfa" href="http://www.vim.org/" title="Vim (text editor)" rel="ctag:means homepage" xmlns:ctag="http://commontag.org/ns#" typeof="ctag:Tag" resource="http://rdf.freebase.com/ns/en/vim" property="ctag:label"&gt;Vim&lt;/a&gt; comes with it&amp;#8217;s own tutor? Simply type vimtutor in your shell (outside of vim). If you prefer the gui version, type gvimtutor. On &lt;span class="caps"&gt;MS&lt;/span&gt;-Windows you can find it in the Program/Vim&amp;nbsp;menu.&lt;/p&gt;

&lt;p&gt;The tutor is a 30 minute interactive tutorial that will walk you through the basics of editing with&amp;nbsp;vim.&lt;/p&gt;

&lt;p&gt;Once you have completed the tutor it&amp;#8217;s critical that you understand how to move around (the tutor covers these). Practice Practice&amp;nbsp;Practice.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;h j k l  ...  e b w f t * / ? % $ ^
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;These are your bread and butter and most everything that follows builds on&amp;nbsp;these.&lt;/p&gt;

&lt;p&gt;Vim also comes with a very comprehensive user manual. Launch vim and type 
&amp;#8220;:help user-manual&amp;#8221; (without quotes) in command&amp;nbsp;mode&lt;/p&gt;

&lt;p&gt;Most important is that the first couple days trying to use vim instead of a gui based editor will be frustrating and hard. Stick with it. Within a week or two you things with flip on you and you will begin to be frustrated that every program doesn&amp;#8217;t work like vim, and be shocked how often you go to the mouse or arrow&amp;nbsp;keys.&lt;/p&gt;

&lt;fieldset class="zemanta-related"&gt;&lt;legend class="zemanta-related-title"&gt;Related articles by Zemanta&lt;/legend&gt;&lt;ul class="zemanta-article-ul"&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://spf13.com/feature/vim-plugins-snipmate"&gt;Vim Plugins: snipMate&lt;/a&gt;&amp;nbsp;(spf13.com)&lt;/li&gt;&lt;/ul&gt;&lt;/fieldset&gt;

&lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/61865da2-7f0f-4d0a-83ef-c7c12c16e3fe/" title="Reblog this post [with Zemanta]"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_c.png?x-id=61865da2-7f0f-4d0a-83ef-c7c12c16e3fe" alt="Reblog this post [with Zemanta]" style="border:none;float:right"&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/spf13?a=GN4_VfNY7Qo:qtzHEL9luG0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/spf13?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/spf13/~4/GN4_VfNY7Qo" height="1" width="1"/&gt;</description>
     <comments>http://spf13.com/post/vim-crash-course#comments</comments>
 <category domain="http://spf13.com/tags/editor">editor</category>
 <category domain="http://spf13.com/tags/vim">VIM</category>
 <category domain="http://spf13.com/category/vim">vim</category>
 <pubDate>Wed, 03 Mar 2010 17:33:54 +0000</pubDate>
 <dc:creator>Steve Francia</dc:creator>
 <guid isPermaLink="false">2255 at http://spf13.com</guid>
  <feedburner:origLink>http://spf13.com/post/vim-crash-course</feedburner:origLink></item>
  <item>
    <title>Unix Jobs Management</title>
    <link>http://feedproxy.google.com/~r/spf13/~3/of0ILqwpe2c/unix-jobs-management</link>
    <description>&lt;div class="zemanta-img" style="margin: 1em; float: right; display: block; width: 310px;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/Image:GNU_Screen.png"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/72/GNU_Screen.png/300px-GNU_Screen.png" alt="&amp;quot;Screenshot of GNU Screen.&amp;quot; The top ..." style="border: medium none; display: block;" height="263" width="300"&gt;&lt;/a&gt;&lt;p class="zemanta-img-attribution" style="font-size: 0.8em;"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/Image:GNU_Screen.png"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;Every self respecting linux, mac os X or *nix user should have a solid handle on managing jobs in unix. The following will explain how to run tasks in the background, bring tasks to the foreground, background already running tasks and keeping a task running while logged out. 
&lt;!--break--&gt;&lt;/p&gt;

&lt;h2&gt;Run a task in the&amp;nbsp;background&lt;/h2&gt;

&lt;p&gt;All you need to to is follow a command with the &amp;#8216;&amp;amp;&amp;#8217; character. Pretty simple. What this does is start the command and background it. It will keep running and when it is finished it will present the results to the&amp;nbsp;foreground.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cp -av stuff /mnt/backup &amp;amp;amp;

[1] 21394
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The response indicates that the job is now backgrounded and the job id is 1 and the &lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/guid/9202a8c04000641f800000000005a409" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Process_%28computing%29" title="Process (computing)" rel="ctag:means wikipedia"&gt;process&lt;/a&gt; id is&amp;nbsp;21394.&lt;/p&gt;

&lt;p&gt;A backgrounded process is still attached to your session. This means that if you logout it will also stop, though it will warn you that a process is running in the background when you&amp;nbsp;&amp;#8216;exit&amp;#8217;.&lt;/p&gt;

&lt;h2&gt;Listing jobs (processes running in the&amp;nbsp;background)&lt;/h2&gt;

&lt;p&gt;In this example I ran &amp;#8216;sleep 100 &amp;amp;&amp;#8217;. It is also in the background. To see backgrounded jobs, simply type&amp;nbsp;jobs.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ jobs

[1]-  Running                 cp -av stuff /mnt/backup &amp;amp;amp;
[2]+  Stopped                 sleep 100 &amp;amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Bring a backgrounded app to the&amp;nbsp;foreground&lt;/h2&gt;

&lt;p&gt;I want to see how my backup is going so I&amp;#8217;ll bring it back to the foreground to view it. To do this you need to know the job id which is the number in the []&amp;nbsp;above.&lt;/p&gt;

&lt;p&gt;There are couple ways to do this&amp;#8230; The first works everywhere, where the latter is specific to bash (though it may also exist in your preferred&amp;nbsp;shell).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ %1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ fg 1
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Suspending a&amp;nbsp;task.&lt;/h2&gt;

&lt;p&gt;Satisfied that the backup is going well, you now want to backgroud it again. type &lt;ctrl&gt;-z to suspend it. This will temporarily stop the process from running and bring you to a shell prompt again. From there just &amp;#8216;&lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/guid/9202a8c04000641f80000000083b3a24" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Bg_%28Unix%29" title="Bg (Unix)" rel="ctag:means wikipedia"&gt;bg&lt;/a&gt;&amp;#8216;&amp;nbsp;it.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;hit &amp;lt;ctrl&amp;gt;-z

[1]+  Stopped               cp -av stuff /mnt/backup &amp;amp;amp;
$

$ bg 1
[1]+ cp -av stuff /mnt/backup &amp;amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Running a process and logging&amp;nbsp;out&lt;/h2&gt;

&lt;p&gt;There are three different approaches to doing this. Screen, &lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/nohup" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Nohup" title="Nohup" rel="ctag:means wikipedia"&gt;nohup&lt;/a&gt; and disown.
Screen seems like the most versile, though you technically aren&amp;#8217;t logging out, but you can disconnect completely without worrying that it will stop. Both nohup and screen require you to do something prior to or during starting the process so neither can work if the process is already going. For these circumstances their is&amp;nbsp;disown.&lt;/p&gt;

&lt;h3&gt;Screen&lt;/h3&gt;

&lt;p&gt;Screen is a versitile tool and a must use for any system admin. I could easily devote a full blog post on screen, in fact I did. &lt;a href="http://spf13.com/content/be-more-productive-using-gnu-screen"&gt;Be more productive using gnu&amp;nbsp;screen&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;nohup&lt;/h3&gt;

&lt;p&gt;nohup is a &lt;span class="caps"&gt;POSIX&lt;/span&gt; command to ignore the &lt;span class="caps"&gt;HUP&lt;/span&gt; (hangup) signal, enabling the command to keep running after the user who issues the command has logged out. The &lt;span class="caps"&gt;HUP&lt;/span&gt; (hangup) signal is by convention the way a terminal warns depending processes of&amp;nbsp;logout.&lt;/p&gt;

&lt;p&gt;nohup is most often used to run commands in the background as daemons. Output that would normally go to the terminal goes to a file called nohup.out if it has not already been redirected. This command is very helpful when there is a need to run numerous batch jobs which are&amp;nbsp;inter-dependent.&lt;/p&gt;

&lt;p&gt;If you redirect the streams you can avoid filling up your filesystem with nohup.out files as&amp;nbsp;follows&amp;#8230;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ nohup tar czf /backup/home.tgz . &amp;amp;gt; /dev/null 2&amp;amp;gt;&amp;amp;amp;1 &amp;amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Some shells (bash) provide a similar function called disown which can be run after the command is already running. If you are using bash, there really isn&amp;#8217;t a reason to use nohup, use disown&amp;nbsp;instead.&lt;/p&gt;

&lt;h3&gt;disown&lt;/h3&gt;

&lt;p&gt;Disown is easy enough to use, background a job (bg 1 for example) then type&amp;nbsp;disown.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    $ bg 1
    $ disown
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Alternatives&lt;/h3&gt;

&lt;p&gt;Use &amp;#8216;setsid&amp;#8217; which will run a program in a new&amp;nbsp;session.&lt;/p&gt;

&lt;p&gt;It is also possible to use &amp;#8220;dislocate&amp;#8221; for&amp;nbsp;this.&lt;/p&gt;

&lt;p&gt;Under Debian, it is possible to use /sbin/start-stop-daemon to daemonise a&amp;nbsp;process.&lt;/p&gt;

&lt;p&gt;Another way to avoid the process being bound to a terminal is to have the at daemon run it, as for example with echo command | at&amp;nbsp;now.&lt;/p&gt;

&lt;h3&gt;Warning&lt;/h3&gt;

&lt;p&gt;Once a job is disowned (or run using nohup) you can no longer bring it to the foreground and you no longer own it. It will not be listed in jobs. Only do this if you won&amp;#8217;t need to access it again. Your only option to stop it is to kill&amp;nbsp;it.&lt;/p&gt;

&lt;h3&gt;Notes&lt;/h3&gt;

&lt;p&gt;bg defaults to the last suspended job, so it isn&amp;#8217;t necessary to provide the job id.
&lt;/ctrl&gt;&lt;/ctrl&gt;&lt;/p&gt;

&lt;fieldset class="zemanta-related"&gt;&lt;legend class="zemanta-related-title"&gt;Related articles by Zemanta&lt;/legend&gt;&lt;ul class="zemanta-article-ul"&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.damirkucic.com/2009/08/process-detaching-in-linux.html"&gt;Process detaching in linux&lt;/a&gt;&amp;nbsp;(damirkucic.com)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://blog.amit-agarwal.co.in/2009/11/23/top-3-sites-to-help-you-become-a-linux-command-line-master/"&gt;Top 3 Sites To Help You Become A Linux Command Line Master]&lt;/a&gt;&amp;nbsp;(amit-agarwal.co.in)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.twm-kd.com/computers/software/linux-tips-aggregated-1/"&gt;Linux Tips Aggregated #1&lt;/a&gt;&amp;nbsp;(twm-kd.com)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://almirkaric.com/2009/07/31/parallelization-in-bash/"&gt;Parallelization in bash&lt;/a&gt;&amp;nbsp;(almirkaric.com)&lt;/li&gt;&lt;/ul&gt;&lt;/fieldset&gt;

&lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/65e14710-2053-425e-8d8b-4c888d840f91/" title="Reblog this post [with Zemanta]"&gt;&lt;img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_c.png?x-id=65e14710-2053-425e-8d8b-4c888d840f91" alt="Reblog this post [with Zemanta]"&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/spf13?a=of0ILqwpe2c:ixGkaBklq0g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/spf13?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/spf13/~4/of0ILqwpe2c" height="1" width="1"/&gt;</description>
     <comments>http://spf13.com/post/unix-jobs-management#comments</comments>
 <category domain="http://spf13.com/tags/linux">Linux</category>
 <category domain="http://spf13.com/tags/screen">screen</category>
 <category domain="http://spf13.com/tags/unix">UNIX</category>
 <category domain="http://spf13.com/category/systems">Systems</category>
 <pubDate>Tue, 02 Feb 2010 19:58:57 +0000</pubDate>
 <dc:creator>Steve Francia</dc:creator>
 <guid isPermaLink="false">2254 at http://spf13.com</guid>
  <feedburner:origLink>http://spf13.com/post/unix-jobs-management</feedburner:origLink></item>
  <item>
    <title>human readable du sorted by size</title>
    <link>http://feedproxy.google.com/~r/spf13/~3/FkJdWuzcXNA/human-readable-du-sorted-size</link>
    <description>&lt;div class="zemanta-img" style="margin: 1em; float: right; display: block; width: 310px;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/Image:Du_unix_output.png"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Du_unix_output.png/300px-Du_unix_output.png" alt="Example output of the du UNIX command" style="border: medium none ; display: block;" height="112" width="300"&gt;&lt;/a&gt;&lt;p class="zemanta-img-attribution" style="font-size: 0.8em;"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/Image:Du_unix_output.png"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;du is the *nix command for &lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/guid/9202a8c04000641f80000000003a87f4" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Du_%28Unix%29" title="Du (Unix)" rel="ctag:means wikipedia"&gt;disk usage&lt;/a&gt;. It tells you how much space everything in the given directory is taking up. &lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/gnu" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" class="zem_slink rdfa" href="http://www.gnu.org/" title="GNU" rel="ctag:means homepage"&gt;&lt;span class="caps"&gt;GNU&lt;/span&gt;&lt;/a&gt; du introduced a handy option -h making it human readable, or showing sizes using K, M, G rather than bytes. Unfortunately this makes it not sortable numerically. Here&amp;#8217;s how to sort du by size and keep it as human readable.
&lt;!--break--&gt;
Insert the following function into your .profile or .bash_profile&amp;nbsp;file.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; function duf {                                                                                                                                                                
     du -k "$@" | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;By writing this as a function, it enables you to pass along parameters to the newly created &lt;strong&gt;duf&lt;/strong&gt; command just as you would &lt;strong&gt;du&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For convenience, I also create the following aliases which you can also place in your .profile or .bash_profile&amp;nbsp;file.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;alias du1='duf --max-depth=1'
alias du2='duf --max-depth=2'
alias du0='duf --max-depth=0'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once you have added these lines, remember to &lt;code&gt;source .profile&lt;/code&gt; to use it without logging&amp;nbsp;out.&lt;/p&gt;

&lt;fieldset class="zemanta-related"&gt;&lt;legend class="zemanta-related-title"&gt;Related articles by Zemanta&lt;/legend&gt;&lt;ul class="zemanta-article-ul"&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.slumpedoverkeyboarddead.com/2010/01/03/filelight-where-my-disk-space-has-gone/"&gt;Filelight: Where my disk space has gone?&lt;/a&gt;&amp;nbsp;(slumpedoverkeyboarddead.com)&lt;/li&gt;&lt;/ul&gt;&lt;/fieldset&gt;

&lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/dc045b05-f065-407c-9e79-f29d97f65150/" title="Reblog this post [with Zemanta]"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_c.png?x-id=dc045b05-f065-407c-9e79-f29d97f65150" alt="Reblog this post [with Zemanta]"&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/spf13?a=FkJdWuzcXNA:hTJCx06sEo0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/spf13?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/spf13/~4/FkJdWuzcXNA" height="1" width="1"/&gt;</description>
     <comments>http://spf13.com/post/human-readable-du-sorted-size#comments</comments>
 <category domain="http://spf13.com/tags/cli">CLI</category>
 <category domain="http://spf13.com/tags/du">du</category>
 <category domain="http://spf13.com/tags/linux">Linux</category>
 <category domain="http://spf13.com/category/it">IT</category>
 <category domain="http://spf13.com/category/systems">Systems</category>
 <pubDate>Sat, 23 Jan 2010 15:34:46 +0000</pubDate>
 <dc:creator>Steve Francia</dc:creator>
 <guid isPermaLink="false">2253 at http://spf13.com</guid>
  <feedburner:origLink>http://spf13.com/post/human-readable-du-sorted-size</feedburner:origLink></item>
  <item>
    <title>Benchmarking Cloudfront (and S3)</title>
    <link>http://feedproxy.google.com/~r/spf13/~3/XzW_7yN65YQ/benchmarking-cloudfront-and-s3</link>
    <description>&lt;div class="zemanta-img" style="margin: 1em; float: right; display: block; width: 210px;"&gt;&lt;a href="http://www.crunchbase.com/company/amazon"&gt;&lt;img src="http://www.crunchbase.com/assets/images/resized/0000/3898/3898v1-max-250x250.jpg" alt="Image representing Amazon as depicted in Crunc..." style="border: medium none; display: block;" height="89" width="200"&gt;&lt;/a&gt;&lt;p class="zemanta-img-attribution" style="font-size: 0.8em;"&gt;Image via &lt;a href="http://www.crunchbase.com"&gt;CrunchBase&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;&lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/amazon_com" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" class="zem_slink rdfa" href="http://amazon.com/" title="Amazon" rel="ctag:means homepage"&gt;Amazon&lt;/a&gt; has done it again bringing another computing service to the masses. This time it&amp;#8217;s the Content Delivery Network or &lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/content_delivery_network" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Content_delivery_network" title="Content delivery network" rel="ctag:means wikipedia"&gt;&lt;span class="caps"&gt;CDN&lt;/span&gt;&lt;/a&gt;. Cloudfront is a direct competitor to other popular CDNs such as &lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/akamai_technologies" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" class="zem_slink rdfa" href="http://www.akamai.com" title="Akamai" rel="ctag:means homepage"&gt;Akamai&lt;/a&gt;. While Akamai requires a fairly substantial amount of traffic to become a customer, Cloudfront doesn&amp;#8217;t. It follows all of Amazons, pay for what you use mentality. This means that everyone can benefit from incorporating Cloudfront into their blog, site, store,&amp;nbsp;etc..&lt;/p&gt;

&lt;p&gt;For purposes of experimentation, I decided to track how much of a difference Amazons Cloudfront made over simple &lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/amazon_s3" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" class="zem_slink rdfa" href="http://aws.amazon.com/s3" title="Amazon S3" rel="ctag:means homepage"&gt;s3&lt;/a&gt; public hosting vs hosting locally on my webhost. I decided to use &lt;a href="http://stevefrancia.com"&gt;stevefrancia.com&lt;/a&gt; for this experiment since it is a very small and simple site with a single html file a couple css and js files and a handful of images. No server side processing or other significant variables, perfect for benchmarking. 
&lt;!--break--&gt;
The next series of images shows the improvement as I moved towards all files (except the primary html file) on&amp;nbsp;cloudfront.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note, the scale of the following images isn&amp;#8217;t the same from one to the other, please note the x-axis scale for each&amp;nbsp;one&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;Base&amp;nbsp;Case&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/spf13/4177408474/" title="Base Case by steve.francia, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2569/4177408474_84b5bc017b.jpg" alt="Base Case" height="277" width="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Google Hosted&amp;nbsp;jQuery&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/spf13/4177410024/" title="Google Hosted jQuery by steve.francia, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2452/4177410024_2403c41158.jpg" alt="Google Hosted jQuery" height="278" width="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Resources on&amp;nbsp;S3&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/spf13/4176659019/" title="s3 hosted by steve.francia, on Flickr"&gt;&lt;img src="http://farm5.static.flickr.com/4041/4176659019_e2ef2ff41c.jpg" alt="s3 hosted" height="277" width="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Resources on&amp;nbsp;Cloudfront&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/spf13/4177419138/" title="cloudfront by steve.francia, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2645/4177419138_25deb10527.jpg" alt="cloudfront" height="276" width="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://www.flickr.com/photos/spf13/4176646691/" title="cloudfront-comparison by steve.francia, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2769/4176646691_5ffb9216b5_o.png" alt="cloudfront-comparison" height="210" width="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Cloudfront is a significant improvement over both my web host as well as serving files directly from s3. Each case the single &lt;span class="caps"&gt;HTML&lt;/span&gt; file was served from my web host. When you remove that from the totals (assuming an average of .5 s for the index.html file) it shows an even larger improvement. From just under 4 seconds in our base case, to around .4 seconds on cloudfront. Using cloudfront is easy and inexpensive. &lt;a class="zem_slink" href="http://aws.amazon.com/cloudfront/" title="CloudFront" rel="homepage"&gt;CloudFront&lt;/a&gt; integration is a no brainer. It works well, easily integrates and is inexpensive. Most people should use it to host all of their&amp;nbsp;resources.&lt;/p&gt;

&lt;p&gt;Of course this is a very small scale test and your mileage will vary, pingdom is a good resource for simple tests like this as it produces the graphs seen above and is easy to&amp;nbsp;use.&lt;/p&gt;

&lt;fieldset class="zemanta-related"&gt;&lt;legend class="zemanta-related-title"&gt;Related articles by Zemanta&lt;/legend&gt;&lt;ul class="zemanta-article-ul"&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://technology.razorfish.com/2009/10/09/cloudfront-amazons-caching-delivery-network-cdn/"&gt;Cloudfront, Amazon&amp;#8217;s Caching Delivery Network (&lt;span class="caps"&gt;CDN&lt;/span&gt;)&lt;/a&gt;&amp;nbsp;(technology.razorfish.com)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.mikebrittain.com/blog/2010/01/15/choosing-a-cdn/"&gt;Choosing a &lt;span class="caps"&gt;CDN&lt;/span&gt;&lt;/a&gt;&amp;nbsp;(mikebrittain.com)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.inquisitr.com/41869/amazon-cloudfront-cdn-with-a-wordpress-blog/"&gt;Amazon Cloudfront &lt;span class="caps"&gt;CDN&lt;/span&gt; with a WordPress Blog&lt;/a&gt;&amp;nbsp;(inquisitr.com)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://aws.typepad.com/aws/2009/11/new-amazon-cloudfront-feature-private-content.html"&gt;New Amazon CloudFront Feature: Private Content&lt;/a&gt;&amp;nbsp;(aws.typepad.com)&lt;/li&gt;&lt;/ul&gt;&lt;/fieldset&gt;

&lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/d4745278-cd2c-4c21-bbeb-492993649bbd/" title="Reblog this post [with Zemanta]"&gt;&lt;img style="border: medium none; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_c.png?x-id=d4745278-cd2c-4c21-bbeb-492993649bbd" alt="Reblog this post [with Zemanta]"&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/spf13?a=XzW_7yN65YQ:pQHLk33oH98:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/spf13?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/spf13/~4/XzW_7yN65YQ" height="1" width="1"/&gt;</description>
     <comments>http://spf13.com/post/benchmarking-cloudfront-and-s3#comments</comments>
 <category domain="http://spf13.com/tags/aws">aws</category>
 <category domain="http://spf13.com/category/blogging">blogging</category>
 <category domain="http://spf13.com/tags/cloudfront">cloudfront</category>
 <category domain="http://spf13.com/tags/s3">s3</category>
 <category domain="http://spf13.com/category/systems">Systems</category>
 <pubDate>Tue, 19 Jan 2010 20:20:53 +0000</pubDate>
 <dc:creator>Steve Francia</dc:creator>
 <guid isPermaLink="false">2252 at http://spf13.com</guid>
  <feedburner:origLink>http://spf13.com/post/benchmarking-cloudfront-and-s3</feedburner:origLink></item>
  <item>
    <title>Using the right keys</title>
    <link>http://feedproxy.google.com/~r/spf13/~3/C6qEp_sctH0/using-right-keys</link>
    <description>&lt;div class="zemanta-img" style="margin: 1em; float: right; display: block;"&gt;&lt;a href="http://www.flickr.com/photos/95257089@N00/380033747"&gt;&lt;img src="http://farm1.static.flickr.com/146/380033747_dc9507517e_m.jpg" alt="Keyc(ODE)" style="border: medium none; display: block;"&gt;&lt;/a&gt;&lt;p class="zemanta-img-attribution" style="font-size: 0.8em;"&gt;Image by &lt;a href="http://www.flickr.com/photos/95257089@N00/380033747"&gt;HeyThereSpaceman.&lt;/a&gt; via&amp;nbsp;Flickr&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;Today I was visiting a friends office and like many offices in &lt;span class="caps"&gt;NYC&lt;/span&gt; they have a shared bathroom in the hall for the entire floor. In this building it had five buttons on the door that when pressed in the correct order unlocked the door. A simple password. 
&lt;!--break--&gt;
In our office we have a similarly shared bathroom, but instead of a password, we have a physical key required to unlock the&amp;nbsp;door.&lt;/p&gt;

&lt;p&gt;A password for the bathroom was just the right amount of security. It prevented just any stranger from easily accessing the bathroom, but wasn’t inconvenient and easy to provide access to. My friend simply told me the password and I as a visitor had all I needed to enter. It was the right amount of security for the right&amp;nbsp;purpose.&lt;/p&gt;

&lt;p&gt;Our physical key certainly provides a higher level of security, but with additional inconvenience. Physical keys hang next to our door which is easy enough, but what happens when someone took the key into the bathroom, or home with them. The solution is for everyone to make their own copy which is excessive and unnecessary for a&amp;nbsp;bathroom.&lt;/p&gt;

&lt;p&gt;If our expensive merchandise was stored in a room, would we use a password to guard it. Never, wouldn’t think twice about it, we would have multiple security measures in place (and do at Portero Luxury). Keys, codes and&amp;nbsp;surveillance.&lt;/p&gt;

&lt;p&gt;In our increasingly electronic world how many times are you using passwords for sensitive data when a key (or key + alarm + password + &amp;#8230;) is appropriate. Or even worse, how many places share the same password. Is your email and bank password the same? If someone had access to your email address &lt;span class="amp"&gt;&amp;amp;&lt;/span&gt; password from a single site how much could they access? what damage could they&amp;nbsp;do?&lt;/p&gt;

&lt;p&gt;For those that claim they choose insecure over inconvenient I say to you why choose. You can have both secure and convenient. Excellent tools exist to fix this problem, whether it is server (&lt;a href="http://spf13.com/feature/secure-automated-key-based-ssh"&gt;&lt;span class="caps"&gt;SSH&lt;/span&gt; keys&lt;/a&gt;) or browser &lt;a href="http://agilewebsolutions.com/products/1Password"&gt;1 password&lt;/a&gt; (mac) or &lt;a href="http://keepass.info/"&gt;KeePass&lt;/a&gt;&amp;nbsp;(win).&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/spf13?a=C6qEp_sctH0:EbIXoQS7OYM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/spf13?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/spf13/~4/C6qEp_sctH0" height="1" width="1"/&gt;</description>
     <comments>http://spf13.com/post/using-right-keys#comments</comments>
 <category domain="http://spf13.com/tags/security">security</category>
 <category domain="http://spf13.com/category/it">IT</category>
 <category domain="http://spf13.com/category/systems">Systems</category>
 <pubDate>Tue, 19 Jan 2010 16:27:16 +0000</pubDate>
 <dc:creator>Steve Francia</dc:creator>
 <guid isPermaLink="false">2251 at http://spf13.com</guid>
  <feedburner:origLink>http://spf13.com/post/using-right-keys</feedburner:origLink></item>
  <item>
    <title>SOAP vs. REST</title>
    <link>http://feedproxy.google.com/~r/spf13/~3/olf-tOkj0Cw/soap-vs-rest</link>
    <description>&lt;div class="zemanta-img" style="margin: 1em; float: right; display: block; width: 249px;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Image:Webservice_xrpc.png"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/en/9/95/Webservice_xrpc.png" alt="Architectural elements involved in the XML-RPC." style="border: medium none; display: block;" height="93" width="239"&gt;&lt;/a&gt;&lt;p class="zemanta-img-attribution" style="font-size: 0.8em;"&gt;Image via &lt;a href="http://en.wikipedia.org/wiki/Image:Webservice_xrpc.png"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;Someone asked me a question today “Why would anyone choose &lt;span class="caps"&gt;SOAP&lt;/span&gt; (&lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/soap" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/SOAP" title="SOAP" rel="ctag:means wikipedia"&gt;Simple Object Access Protocol&lt;/a&gt;) instead of &lt;span class="caps"&gt;REST&lt;/span&gt; (&lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/representational_state_transfer" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Representational_State_Transfer" title="Representational State Transfer" rel="ctag:means wikipedia"&gt;Representational State Transfer&lt;/a&gt;)?” My response: “The general rule of thumb I’ve always heard is ‘Unless you have a definitive reason to use &lt;span class="caps"&gt;SOAP&lt;/span&gt; use &lt;span class="caps"&gt;REST&lt;/span&gt;’”. He asked “what’s one reason?” I thought about it for a minute and honestly answered that I haven’t ever come across a reason. My background is building great internet&amp;nbsp;companies.&lt;/p&gt;

&lt;!--break--&gt;

&lt;p&gt;While he seemed satisfied, I wasn’t very happy with that answer, I did some homework and here’s my summary on the difference between &lt;span class="caps"&gt;SOAP&lt;/span&gt; and &lt;span class="caps"&gt;REST&lt;/span&gt; and why anyone would choose &lt;span class="caps"&gt;SOAP&lt;/span&gt;. Clearly both have value, as always the challenge is to know when to use each one (spoiler: luckily the answer is almost always&amp;nbsp;&lt;span class="caps"&gt;REST&lt;/span&gt;).&lt;/p&gt;

&lt;p&gt;I’m clearly boiling down a somewhat so please don’t flame me for simplifying things, but feel free to provide any corrections you feel are&amp;nbsp;necessary.&lt;/p&gt;

&lt;h1&gt;Definitions&lt;/h1&gt;

&lt;h2&gt;&lt;span class="caps"&gt;REST&lt;/span&gt;&lt;/h2&gt;

&lt;p&gt;RESTs sweet spot is when you are exposing a public &lt;span class="caps"&gt;API&lt;/span&gt; over the internet to handle &lt;span class="caps"&gt;CRUD&lt;/span&gt; operations on data. 
&lt;span class="caps"&gt;REST&lt;/span&gt; is focused on accessing named resources through a single consistent&amp;nbsp;interface.&lt;/p&gt;

&lt;h2&gt;&lt;span class="caps"&gt;SOAP&lt;/span&gt;&lt;/h2&gt;

&lt;p&gt;&lt;span class="caps"&gt;SOAP&lt;/span&gt; brings it’s own protocol and focuses on exposing pieces of application logic (not data) as services. &lt;span class="caps"&gt;SOAP&lt;/span&gt; exposes operations. 
&lt;span class="caps"&gt;SOAP&lt;/span&gt; is focused on accessing named operations, each implement some business logic through different&amp;nbsp;interfaces.&lt;/p&gt;

&lt;p&gt;Though &lt;span class="caps"&gt;SOAP&lt;/span&gt; is commonly referred to as “&lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/web_service" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Web_service" title="Web service" rel="ctag:means wikipedia"&gt;web services&lt;/a&gt;” this is a misnomer. &lt;span class="caps"&gt;SOAP&lt;/span&gt; has very little if anything to do with the Web. &lt;span class="caps"&gt;REST&lt;/span&gt; provides true “Web services” based on URIs and&amp;nbsp;&lt;span class="caps"&gt;HTTP&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;By way of illustration here are few calls and their appropriate home with&amp;nbsp;commentary.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;getUser(User);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is a rest operation as you are accessing a resource&amp;nbsp;(data).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;switchCategory(User, OldCategory, NewCategory)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is a &lt;span class="caps"&gt;SOAP&lt;/span&gt; operation as you are performing an&amp;nbsp;operation.&lt;/p&gt;

&lt;p&gt;Yes, either could be done in either &lt;span class="caps"&gt;SOAP&lt;/span&gt; or &lt;span class="caps"&gt;REST&lt;/span&gt;. The purpose is to illustrate the conceptual&amp;nbsp;difference.&lt;/p&gt;

&lt;h1&gt;Why&amp;nbsp;&lt;span class="caps"&gt;REST&lt;/span&gt;?&lt;/h1&gt;

&lt;p&gt;Here are a few reasons why &lt;span class="caps"&gt;REST&lt;/span&gt; is almost always the right&amp;nbsp;answer.&lt;/p&gt;

&lt;p&gt;Since &lt;span class="caps"&gt;REST&lt;/span&gt; uses standard &lt;span class="caps"&gt;HTTP&lt;/span&gt; it is much simpler in just about ever way. Creating clients, developing APIs, the documentation is much easier to understand and there aren’t very many things that &lt;span class="caps"&gt;REST&lt;/span&gt; doesn’t do easier/better than&amp;nbsp;&lt;span class="caps"&gt;SOAP&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;&lt;span class="caps"&gt;REST&lt;/span&gt; permits many different data formats where as &lt;span class="caps"&gt;SOAP&lt;/span&gt; only permits &lt;span class="caps"&gt;XML&lt;/span&gt;. While this may seem like it adds complexity to &lt;span class="caps"&gt;REST&lt;/span&gt; because you need to handle multiple formats, in my experience it has actually been quite beneficial. &lt;span class="caps"&gt;JSON&lt;/span&gt; usually is a better fit for data and parses much faster. &lt;span class="caps"&gt;REST&lt;/span&gt; allows better support for browser clients due to it’s support for&amp;nbsp;&lt;span class="caps"&gt;JSON&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;&lt;span class="caps"&gt;REST&lt;/span&gt; has better performance and scalability. &lt;span class="caps"&gt;REST&lt;/span&gt; reads can be cached, &lt;span class="caps"&gt;SOAP&lt;/span&gt; based reads cannot be&amp;nbsp;cached.&lt;/p&gt;

&lt;p&gt;It’s a bad argument (by authority), but it’s worth mentioning that Yahoo uses &lt;span class="caps"&gt;REST&lt;/span&gt; for all their services including Flickr and del.ici.ous. Amazon and Ebay provide both though Amazon’s internal usage is nearly all &lt;span class="caps"&gt;REST&lt;/span&gt; &lt;a href="http://www.oreillynet.com/pub/wlg/3005"&gt;source&lt;/a&gt;. Google used to provide only &lt;span class="caps"&gt;SOAP&lt;/span&gt; for all their services, but in 2006 they deprecated in favor of &lt;span class="caps"&gt;REST&lt;/span&gt; &lt;a href="http://code.google.com/apis/soapsearch/"&gt;source&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;Why&amp;nbsp;&lt;span class="caps"&gt;SOAP&lt;/span&gt;?&lt;/h1&gt;

&lt;p&gt;Here are a few reasons you may want to use&amp;nbsp;&lt;span class="caps"&gt;SOAP&lt;/span&gt;.&lt;/p&gt;

&lt;h2&gt;&lt;span class="caps"&gt;WS&lt;/span&gt;-Security&lt;/h2&gt;

&lt;p&gt;While &lt;span class="caps"&gt;SOAP&lt;/span&gt; supports &lt;span class="caps"&gt;SSL&lt;/span&gt; (just like &lt;span class="caps"&gt;REST&lt;/span&gt;) it also supports &lt;span class="caps"&gt;WS&lt;/span&gt;-Security which adds some enterprise security features. Supports identity through intermediaries, not just point to point (&lt;span class="caps"&gt;SSL&lt;/span&gt;). It also provides a standard implementation of data integrity and data privacy. Calling it “Enterprise” isn’t to say it’s more secure, it simply supports some security tools that typical internet services have no need for, in fact they are really only needed in a few “enterprise”&amp;nbsp;scenarios.&lt;/p&gt;

&lt;h2&gt;&lt;span class="caps"&gt;WS&lt;/span&gt;-AtomicTransaction&lt;/h2&gt;

&lt;p&gt;Need &lt;span class="caps"&gt;ACID&lt;/span&gt; Transactions over a service, you’re going to need &lt;span class="caps"&gt;SOAP&lt;/span&gt;. While &lt;span class="caps"&gt;REST&lt;/span&gt; supports transactions, it isn’t as comprehensive and isn’t &lt;span class="caps"&gt;ACID&lt;/span&gt; compliant. Fortunately &lt;span class="caps"&gt;ACID&lt;/span&gt; transactions almost never make sense over the internet.  &lt;span class="caps"&gt;REST&lt;/span&gt; is limited by &lt;span class="caps"&gt;HTTP&lt;/span&gt; itself which can&amp;#8217;t provide two-phase commit across distributed transactional resources, but &lt;span class="caps"&gt;SOAP&lt;/span&gt; can. Internet apps generally don&amp;#8217;t need this level of transactional reliability, enterprise apps sometimes&amp;nbsp;do.&lt;/p&gt;

&lt;h2&gt;&lt;span class="caps"&gt;WS&lt;/span&gt;-ReliableMessaging&lt;/h2&gt;

&lt;p&gt;Rest doesn’t have a standard messaging system and expects clients to deal with communication failures by retrying. &lt;span class="caps"&gt;SOAP&lt;/span&gt; has successful/retry logic built in and provides end-to-end reliability even through &lt;span class="caps"&gt;SOAP&lt;/span&gt;&amp;nbsp;intermediaries.&lt;/p&gt;

&lt;h1&gt;Summary&lt;/h1&gt;

&lt;p&gt;In Summary, &lt;span class="caps"&gt;SOAP&lt;/span&gt; is clearly useful, and important. For instance, if I was writing an iPhone application to interface with my bank I would definitely need to use &lt;span class="caps"&gt;SOAP&lt;/span&gt;. All three features above are required for banking transactions. For example, if I was transferring money from one account to the other, I would need to be certain that it completed. Retrying it could be catastrophic if it succeed the first time, but the response&amp;nbsp;failed.&lt;/p&gt;

&lt;h1&gt;External&amp;nbsp;Resources&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;http: www.oreillynet.com="" pub="" wlg="" 3005=""&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.somebits.com/weblog/tech/bad/whySoapSucks.html?seemore=y"&gt;Why Soap&amp;nbsp;Sucks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;http: www.davidchappell.com="" blog="" 2009="" 04="" soap-vs-rest-complements-or-competitors.html=""&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.oracle.com/SOAandEDA/2009/04/soap_or_rest_its_about_your_pr.html"&gt;&lt;span class="caps"&gt;SOAP&lt;/span&gt; or &lt;span class="caps"&gt;REST&lt;/span&gt;? it&amp;#8217;s about your&amp;nbsp;priorities!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.somebits.com/weblog/tech/googleSearchAPI.html"&gt;Goodbye, Google &lt;span class="caps"&gt;SOAP&lt;/span&gt; search&amp;nbsp;&lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ioncannon.net/web-services/117/soap-vs-rest/"&gt;&lt;span class="caps"&gt;SOAP&lt;/span&gt; vs &lt;span class="caps"&gt;REST&lt;/span&gt;&lt;/a&gt;&lt;/http:&gt;&lt;/http:&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/spf13?a=olf-tOkj0Cw:Je__855hIK8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/spf13?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/spf13/~4/olf-tOkj0Cw" height="1" width="1"/&gt;</description>
     <comments>http://spf13.com/post/soap-vs-rest#comments</comments>
 <category domain="http://spf13.com/tags/rest">REST</category>
 <category domain="http://spf13.com/tags/soap">SOAP</category>
 <category domain="http://spf13.com/tags/web-services">web services</category>
 <category domain="http://spf13.com/category/development">Development</category>
 <category domain="http://spf13.com/category/systems">Systems</category>
 <pubDate>Fri, 15 Jan 2010 04:46:50 +0000</pubDate>
 <dc:creator>Steve Francia</dc:creator>
 <guid isPermaLink="false">2250 at http://spf13.com</guid>
  <feedburner:origLink>http://spf13.com/post/soap-vs-rest</feedburner:origLink></item>
  <item>
    <title>My Online Business Card (vCard)</title>
    <link>http://feedproxy.google.com/~r/spf13/~3/VbwP3xaPCAI/my-online-business-card-vcard</link>
    <description>&lt;p&gt;&lt;a target="_blank" href="http://stevefrancia.com" title="Steve Francia.com by steve.francia, on Flickr"&gt;&lt;img width="500" height="297" src="http://farm5.static.flickr.com/4069/4270027690_5ac5b77bea.jpg" alt="Steve Francia.com" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;wanted to polish up my javascript coding so I&amp;nbsp;decided that the best way to do that was with a project that I&amp;#8217;ve been wanted to do for a while anyway, my own identity site, or my online business card, or my online vcard. &lt;meta charset="utf-8"&gt;The idea was inspired by&amp;nbsp;&lt;a title="Tim Van Damme" href="http://timvandamme.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/timvandamme.com');" target="_blank"&gt;Tim Van Damme&lt;/a&gt;&amp;rsquo;s website.&lt;/meta&gt;&lt;/p&gt;
&lt;p&gt;To accomplish this I wrote a jquery plugin to handle the navigation, animation etc.. The site itself is rather simple, a single html page and a few images. The markup is written in such a way that it works perfectly (minus the hiding and animation) even when javascript isn&amp;#8217;t&amp;nbsp;present.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ll write a separate post on how I wrote the jquery plugin and would be happy if anyone else could use it. I just ask that if used that people provide proper attribution both in the code and with a link back to &lt;a target="_blank" href="http://stevefrancia.com"&gt;stevefrancia.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please enjoy my new site and feel free to provide suggestions in the comments below or via the &lt;a href="http://spf13.com/contact"&gt;contact form&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/spf13?a=VbwP3xaPCAI:uv8EMwHLNDw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/spf13?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/spf13/~4/VbwP3xaPCAI" height="1" width="1"/&gt;</description>
     <comments>http://spf13.com/post/my-online-business-card-vcard#comments</comments>
 <category domain="http://spf13.com/tags/business-card">business card</category>
 <category domain="http://spf13.com/tags/jquery">jquery</category>
 <category domain="http://spf13.com/tags/vcard">vcard</category>
 <category domain="http://spf13.com/category/development">Development</category>
 <category domain="http://spf13.com/category/personal">personal</category>
 <pubDate>Tue, 12 Jan 2010 21:27:14 +0000</pubDate>
 <dc:creator>Steve Francia</dc:creator>
 <guid isPermaLink="false">2249 at http://spf13.com</guid>
  <feedburner:origLink>http://spf13.com/post/my-online-business-card-vcard</feedburner:origLink></item>
  <item>
    <title>Vim Plugins: snipMate</title>
    <link>http://feedproxy.google.com/~r/spf13/~3/8ZJ0shG5eTc/vim-plugins-snipmate</link>
    <description>&lt;div style="margin: 1em; float: right; display: block; width: 138px;" class="zemanta-img"&gt;&lt;a href="http://commons.wikipedia.org/wiki/Image:Vim_gloss_128.png"&gt;&lt;img width="128" height="128" style="border: medium none; display: block;" alt="MacVim icon, glossy style" src="http://upload.wikimedia.org/wikipedia/commons/4/4a/Vim_gloss_128.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;p style="font-size: 0.8em;" class="zemanta-img-attribution"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/Image:Vim_gloss_128.png"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Today I discovered snipMate, and I feel like I have finally found the holy grail. SnipMate plays well with supertab and autocompletion. It provides pretty much all the beloved &lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/snippet" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" rel="ctag:means wikipedia" title="Snippet (programming)" href="http://en.wikipedia.org/wiki/Snippet_%28programming%29" class="zem_slink rdfa"&gt;snippet&lt;/a&gt; features of &lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/textmate" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" rel="ctag:means homepage" title="TextMate" href="http://www.macromates.com/" class="zem_slink rdfa"&gt;TextMate&lt;/a&gt;, it even has a nearly identical syntax to TextMate. If you&amp;#8217;re not using the snipMate plugin for &lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/vim" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" rel="ctag:means homepage" title="Vim (text editor)" href="http://www.vim.org/" class="zem_slink rdfa"&gt;vim&lt;/a&gt; yet you need to&amp;nbsp;be.&lt;/p&gt;
&lt;p&gt; &lt;!--break--&gt;&lt;br /&gt;
&lt;h2&gt;Why use&amp;nbsp;it&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;It&amp;#8217;s super easy to&amp;nbsp;use&lt;/li&gt;
&lt;li&gt;It has tons of&amp;nbsp;snippets&lt;/li&gt;
&lt;li&gt;It&amp;#8217;s pretty well compatible with TextMate snippets for easy&amp;nbsp;portability&lt;/li&gt;
&lt;li&gt;Dynamic variables, for all the times you use the same string multiple&amp;nbsp;times&lt;/li&gt;
&lt;li&gt;It&amp;#8217;s really easy to define your own&amp;nbsp;snippets&lt;/li&gt;
&lt;li&gt;It&amp;#8217;s better than anything else out there, trust me I&amp;#8217;ve tried them&amp;nbsp;all&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sometimes a video works better to explain things.. check out this video   &lt;/p&gt;
&lt;object width="400" height="225"&gt;&lt;param value="true" name="allowfullscreen" /&gt;&lt;param value="always" name="allowscriptaccess" /&gt;&lt;param value="http://vimeo.com/moogaloop.swf?clip_id=3535418&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" name="movie" /&gt;&lt;embed width="400" height="225" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" src="http://vimeo.com/moogaloop.swf?clip_id=3535418&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://vimeo.com/3535418"&gt;snipMate.vim Introductory Screencast&lt;/a&gt; from &lt;a href="http://vimeo.com/user1404868"&gt;Michael Sanders&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Installing&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;There are a couple of ways to obtain it either download the zip from the vim site: &lt;a href="http://www.vim.org/scripts/script.php?script_id=2540"&gt;snipMate&lt;/a&gt; or grab it from the authors &lt;a href="git://github.com/msanders/snipmate.vim.git"&gt;git repo&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Extract the zip file or tarball to ~/.vim (on Unix/Linux) or ~\vimfiles (on&amp;nbsp;Windows).&lt;/li&gt;
&lt;li&gt;As good measure, from inside vim, run :helptags ~/.vim/doc (on Unix/Linux) or :helptags ~/vimfiles/doc (on Windows) to rebuild the tags&amp;nbsp;file&lt;/li&gt;
&lt;li&gt;Restart&amp;nbsp;Vim&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Using&amp;nbsp;snipMate&lt;/h2&gt;
&lt;p&gt;snippet is a piece of often-typed text that you can insert into document using a trigger word followed by a &amp;lt;tab&amp;gt;.  For instance, in a C file using the default installation of snipMate.vim, if you type &amp;quot;for&amp;lt;tab&amp;gt;&amp;quot; in insert mode, it will expand a typical for loop in&amp;nbsp;C:&lt;/p&gt;
&lt;p&gt;&lt;span class="geshifilter"&gt;&lt;code class="geshifilter-bash"&gt;&amp;nbsp; &lt;span class="kw1"&gt;for&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;i = &lt;span class="nu0"&gt;0&lt;/span&gt;; i &lt;span class="sy0"&gt;&amp;amp;&lt;/span&gt;lt; count; i++&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="br0"&gt;&amp;#125;&lt;/span&gt; &lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;To go to the next item in the loop, simply &lt;tab&gt; over to it; if there is repeated code, such as the &amp;quot;i&amp;quot; variable in this example, you can simply start typing once it&amp;#8217;s highlighted and all the matches specified in the snippet will be updated. To go in reverse, use &amp;lt;shift-tab&amp;gt;. &lt;/tab&gt;&lt;/p&gt;
&lt;h2&gt;Beyond&amp;nbsp;Installation&lt;/h2&gt;
&lt;h3&gt;Grabbing Scrooloose&amp;#8217;s snippets repository from&amp;nbsp;github&lt;/h3&gt;
&lt;p&gt;Martin Grenfell (Scrooloose) maintains a nice repository of snippets. Though it is a bit ruby heavy, it has dozens of languages including a nice jquery section, and frankly quite a bit more than the stock snippets. I recommend installing his snippets and either fork it or customize it with your own. Here&amp;#8217;s how to install the repo (*nix&amp;nbsp;instructions)&lt;/p&gt;
&lt;pre&gt;
cd ~/.vim
mv snippets snippets.orig
git clone git://github.com/scrooloose/snipmate-snippets.git snippets
&lt;/pre&gt;&lt;p&gt;&lt;a property="ctag:label" resource="http://rdf.freebase.com/ns/en/git" typeof="ctag:Tag" xmlns:ctag="http://commontag.org/ns#" rel="ctag:means homepage" title="Git (software)" href="http://git-scm.com/" class="zem_slink rdfa"&gt;Git&lt;/a&gt; will take care of the installation for you. If you don&amp;#8217;t have git, I really recommend it, and I have a guide on how to install it locally.   	One thing you&amp;#8217;ll notice about this repository is that it&amp;#8217;s much more structured that the stock snippets. Rather than each language containing a snippet file, each language contains a directory full of snippets with each snippet is in it&amp;#8217;s own file. For situations where you want multiple snippets under the same keyword, create a subdirectory and place the snippets inside it. It works quite well, though it seems either approach would be sufficient for personal&amp;nbsp;use.&lt;/p&gt;
&lt;h3&gt;Creating your own&amp;nbsp;snippets&lt;/h3&gt;
&lt;p&gt;While there are a bunch of stock snippets, it didn&amp;#8217;t take me very long to realize it didn&amp;#8217;t have everything I wanted. Fortunately it&amp;#8217;s super easy to create your own&amp;nbsp;snippets.&lt;/p&gt;
&lt;p&gt;The following is largely lifted from the help file. I strongly recommend reading it (:help&amp;nbsp;snipMate).&lt;/p&gt;
&lt;p&gt;Snippets are by default looked for any &amp;#8216;snippets&amp;#8217; directory in your &amp;#8216;runtimepath&amp;#8217;. Typically, it is located at &amp;#8216;~/.vim/snippets/&amp;#8217; on *nix or &amp;#8216;$&lt;span class="caps"&gt;HOME&lt;/span&gt;\vimfiles\snippets&amp;#39; on Windows. (&lt;em&gt;To change that location or add another one, change the g:snippets_dir variable in your |.vimrc| to your preferred directory.&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;Snippets can be defined in two ways. They can be in their own file, named after their trigger in &amp;#8216;snippets/[filetype]/[trigger].snippet&amp;#8217;, or they can be defined together in a &amp;#8216;snippets/[filetype].snippets&amp;#8217;&amp;nbsp;file.&lt;/p&gt;
&lt;h4&gt;Syntax&lt;/h4&gt;
&lt;p&gt;The syntax for snippets in *.snippets files is the following:  &lt;span class="geshifilter"&gt;&lt;code class="geshifilter-bash"&gt;&amp;nbsp; snippet trigger &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; expanded text &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw2"&gt;more&lt;/span&gt; expanded text &lt;/code&gt;&lt;/span&gt;  Note that the first hard tab after the snippet trigger is required, and not expanded in the actual snippet. The syntax for *.snippet files is the same, only without the trigger declaration and starting&amp;nbsp;indentation.&lt;/p&gt;
&lt;h4&gt;tabstops&lt;/h4&gt;
&lt;p&gt;By default, the cursor is placed at the end of a snippet. To specify where the cursor is to be placed next, use &amp;quot;${#}&amp;quot;, where the # is the number of the tab stop. E.g., to place the cursor first on the id of a &amp;lt;div&amp;gt; tag, and then allow the user to press &amp;lt;tab&amp;gt; to go to the middle of&amp;nbsp;it:&lt;/p&gt;
&lt;p&gt;&lt;span class="geshifilter"&gt;&lt;code class="geshifilter-bash"&gt;&amp;nbsp; snippet div &lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div id="${1}"&gt;${2}&lt;/div&gt;
&lt;h4&gt;placeholders&lt;/h4&gt;
&lt;p&gt;Placeholder text can be supplied using &amp;quot;${#:text}&amp;quot;, where # is the number of  the tab stop. This text then can be copied throughout the snippet using &amp;quot;$#&amp;quot;,  given # is the same number as used before. So, to make a C for&amp;nbsp;loop:&lt;/p&gt;
&lt;p&gt;&lt;span class="geshifilter"&gt;&lt;code class="geshifilter-bash"&gt;&amp;nbsp; snippet &lt;span class="kw1"&gt;for&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;for&lt;/span&gt; &lt;span class="br0"&gt;&amp;#40;&lt;/span&gt;&lt;span class="co1"&gt;${2:i}&lt;/span&gt;; $2 &lt;span class="sy0"&gt;&amp;amp;&lt;/span&gt;lt; &lt;span class="co1"&gt;${1:count}&lt;/span&gt;; $&lt;span class="nu0"&gt;1&lt;/span&gt;++&lt;span class="br0"&gt;&amp;#41;&lt;/span&gt; &lt;span class="br0"&gt;&amp;#123;&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="co1"&gt;${4}&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;&amp;#125;&lt;/span&gt; &lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This will cause &amp;quot;count&amp;quot; to first be selected and change if the user starts typing. When &amp;lt;tab&amp;gt; is pressed, the &amp;quot;i&amp;quot; in ${2}&amp;#8217;s position will be selected; all $2 variables will default to &amp;quot;i&amp;quot; and automatically be updated if the user starts typing. &lt;em&gt; &lt;span class="caps"&gt;NOTE&lt;/span&gt;: &amp;quot;$#&amp;quot; syntax is used only for variables, not for tab stops as in&amp;nbsp;TextMate.  &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Variables within variables are also possible. For&amp;nbsp;instance:&lt;/p&gt;
&lt;p&gt;&lt;span class="geshifilter"&gt;&lt;code class="geshifilter-bash"&gt;&amp;nbsp; snippet opt &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="co1"&gt;${2:$1}&lt;/span&gt; &lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Will, as usual, cause &amp;quot;option&amp;quot; to first be selected and update all the $1 variables if the user starts typing. Since one of these variables is inside of ${2}, this text will then be used as a placeholder for the next tab stop, allowing the user to change it if he&amp;nbsp;wishes.&lt;/p&gt;
&lt;p&gt;To copy a value throughout a snippet without supplying default text, simply use the &amp;quot;${#:}&amp;quot; construct without the text;&amp;nbsp;e.g.:&lt;/p&gt;
&lt;p&gt;&lt;span class="geshifilter"&gt;&lt;code class="geshifilter-bash"&gt;&amp;nbsp; snippet foo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="co1"&gt;${1:}&lt;/span&gt;bar$&lt;span class="nu0"&gt;1&lt;/span&gt; &lt;/code&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;fieldset class="zemanta-related"&gt;&lt;legend class="zemanta-related-title"&gt;Related articles&lt;/legend&gt;&lt;br /&gt;
&lt;ul class="zemanta-article-ul"&gt;
&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://spf13.com/feature/vim-plugins-nerd-commenter"&gt;Vim Plugins: &lt;span class="caps"&gt;NERD&lt;/span&gt; Commenter&lt;/a&gt;&amp;nbsp;(spf13.com)&lt;/li&gt;
&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.zalas.eu/how-to-use-textmate-like-snippets-in-vim"&gt;Use TextMate like Snippets in Vim&lt;/a&gt;&amp;nbsp;(zalas.eu)&lt;/li&gt;
&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://vim.runpaint.org/typing/inserting-snippets/"&gt;Inserting Snippets&lt;/a&gt;&amp;nbsp;(runpaint.org)&lt;/li&gt;
&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://dancingpenguinsoflight.com/2009/07/light-at-the-end-of-the-carpal-tunnel-snippets-in-vim-with-snipmate/&amp;quot;"&gt; Snippets in Vim with snipMate&lt;/a&gt;&amp;nbsp;(dancingpenguinsoflight.com)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/fieldset&gt;&lt;br /&gt;
&lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/3f52d9b3-93fd-44c5-a605-a214d69165f1/" class="zemanta-pixie-a"&gt;&lt;img style="border: medium none; float: right;" alt="Reblog this post [with Zemanta]" src="http://img.zemanta.com/reblog_c.png?x-id=3f52d9b3-93fd-44c5-a605-a214d69165f1" class="zemanta-pixie-img" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;/p&gt;
&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/spf13?a=8ZJ0shG5eTc:ufNJUJ_u2sk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/spf13?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/spf13/~4/8ZJ0shG5eTc" height="1" width="1"/&gt;</description>
     <comments>http://spf13.com/feature/vim-plugins-snipmate#comments</comments>
 <category domain="http://spf13.com/tags/plugins">plugins</category>
 <category domain="http://spf13.com/tags/snipmate">snipMate</category>
 <category domain="http://spf13.com/tags/vim">VIM</category>
 <category domain="http://spf13.com/category/vim">vim</category>
 <category domain="http://spf13.com/category/development">Development</category>
 <pubDate>Tue, 29 Dec 2009 05:42:23 +0000</pubDate>
 <dc:creator>Steve Francia</dc:creator>
 <guid isPermaLink="false">2248 at http://spf13.com</guid>
  <feedburner:origLink>http://spf13.com/feature/vim-plugins-snipmate</feedburner:origLink></item>
  <item>
    <title>7 security practices you need to follow</title>
    <link>http://feedproxy.google.com/~r/spf13/~3/NqG2C93lMyg/7-security-practices-you-need-follow</link>
    <description>&lt;p&gt;Some of this may seem like a broken record, yet every single time you hear about a bank losing millions of customer data, or a company having a &lt;a class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Computer_security" title="Computer security" rel="ctag:means wikipedia" xmlns:ctag="http://commontag.org/ns#" typeof="ctag:Tag" resource="http://rdf.freebase.com/ns/en/computer_security" property="ctag:label"&gt;security breach&lt;/a&gt; they consistently have failed to implement and enforce the most basic security practices. Here are 7 simple security practices that you cannot afford to not&amp;nbsp;follow.&lt;/p&gt;
&lt;p&gt; &lt;!--break--&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;1. Secure pass&amp;nbsp;phrases&lt;/h3&gt;
&lt;p&gt;Throw away the notion of a &lt;a class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Password" title="Password" rel="ctag:means wikipedia" xmlns:ctag="http://commontag.org/ns#" typeof="ctag:Tag" resource="http://rdf.freebase.com/ns/en/password" property="ctag:label"&gt;password&lt;/a&gt;. Pass phrases consisting of multiple words and symbols are considerably more secure and easy to remember. Most people use the same password for everything and it&amp;#8217;s almost always a word or a word+#. A good &lt;a class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Passphrase" title="Passphrase" rel="ctag:means wikipedia" xmlns:ctag="http://commontag.org/ns#" typeof="ctag:Tag" resource="http://rdf.freebase.com/ns/en/passphrase" property="ctag:label"&gt;pass phrase&lt;/a&gt; can be something like &amp;quot;Mary.had.@.little.Lamb&amp;quot;. It&amp;#8217;s really easy to remember and nearly impossible to guess or brute force. Using a password management system like One Password for Mac is also a good&amp;nbsp;idea.&lt;/p&gt;
&lt;h3&gt;2. Educate your&amp;nbsp;users&lt;/h3&gt;
&lt;p&gt;All too often policies are put into place but lacking training necessary to ensure that policies are understood and followed. Quarterly web casts can go a long way to ensuring that the most critical policies are complied with without adding unnecessary disruptions to the&amp;nbsp;business.&lt;/p&gt;
&lt;h3&gt;3. Perform &lt;a class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Regulatory_compliance" title="Regulatory compliance" rel="ctag:means wikipedia" xmlns:ctag="http://commontag.org/ns#" typeof="ctag:Tag" resource="http://rdf.freebase.com/ns/en/compliance" property="ctag:label"&gt;regulatory compliance&lt;/a&gt; self&amp;nbsp;audits&lt;/h3&gt;
&lt;p&gt;Hackers are attempting to break into your systems right now. If you aren&amp;#8217;t holding self audits than the only ones auditing your systems are the hackers. It&amp;#8217;s critical that this practice takes place routinely to ensure that your data and systems are as safe as possible. It only takes one small mistake to make you vulnerable. Routine system checking means there is a chance you will find it before someone else&amp;nbsp;does.&lt;/p&gt;
&lt;h3&gt;4. Access provided on a needs to have&amp;nbsp;basis&lt;/h3&gt;
&lt;p&gt;Yes this is inconvenient. Yes you need to do it. Firewalls, &lt;span class="caps"&gt;ACL&lt;/span&gt;, fine grained permissions. Properly setup roles. In every system you do use, in every level. This also means that root/admin permission should always be behind sudo and never logged&amp;nbsp;in.&lt;/p&gt;
&lt;h3&gt;5. Encrypt all sensitive&amp;nbsp;data&lt;/h3&gt;
&lt;p&gt;All sensitive data should be encrypted. Hard drives should be encrypted; Tunnels should be encrypted using &lt;span class="caps"&gt;SSH&lt;/span&gt;, &lt;a class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Virtual_private_network" title="Virtual private network" rel="ctag:means wikipedia" xmlns:ctag="http://commontag.org/ns#" typeof="ctag:Tag" resource="http://rdf.freebase.com/ns/en/virtual_private_network" property="ctag:label"&gt;&lt;span class="caps"&gt;VPN&lt;/span&gt;&lt;/a&gt; or &lt;span class="caps"&gt;SSL&lt;/span&gt;; Wireless networks and even wireless keyboards. Passwords should be stored via a one way &lt;a class="zem_slink rdfa" href="http://en.wikipedia.org/wiki/Encryption" title="Encryption" rel="ctag:means wikipedia" xmlns:ctag="http://commontag.org/ns#" typeof="ctag:Tag" resource="http://rdf.freebase.com/ns/en/encryption" property="ctag:label"&gt;encryption&lt;/a&gt; like&amp;nbsp;md5.&lt;/p&gt;
&lt;h3&gt;6. Never take data off site (flash drives, laptops,&amp;nbsp;etc)&lt;/h3&gt;
&lt;p&gt;It seems every time you hear about a bank or government agency losing millions of critical identity information a portable drive or laptop is involved. While encryption is part of the solution here, it could entirely be avoided if sensitive data is not permitted off site. Data should reside on servers sitting behind properly established &lt;span class="caps"&gt;ACL&lt;/span&gt; and not be available to be copied or transferred onto a laptop or portable&amp;nbsp;drive.&lt;/p&gt;
&lt;h3&gt;7. Use common&amp;nbsp;sense&lt;/h3&gt;
&lt;p&gt;Lastly, the most important security principle is to use common sense. If it seems wrong, it probably is. Common sense is your best defense. Use it&amp;nbsp;wisely.&lt;/p&gt;
&lt;p&gt;  &lt;fieldset class="zemanta-related"&gt;&lt;legend class="zemanta-related-title"&gt;Related articles by Zemanta&lt;/legend&gt;&lt;br /&gt;
&lt;ul class="zemanta-article-ul"&gt;
&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://abusiveviews.wordpress.com/2009/11/01/data-security-in-simple-terms/"&gt;Data Security in Simple Terms&lt;/a&gt;&amp;nbsp;(abusiveviews.wordpress.com)&lt;/li&gt;
&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://techie-buzz.com/tips-and-tricks/protect-your-important-and-personal-data.html?utm_source=subscriber&amp;amp;utm_medium=rss&amp;amp;utm_campaign=rss"&gt;Protect Your Important and Personal Data&lt;/a&gt;&amp;nbsp;(techie-buzz.com)&lt;/li&gt;
&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.crunchgear.com/2009/10/08/secure-your-data-with-encrypted-usb-drives/"&gt;Secure your data with encrypted &lt;span class="caps"&gt;USB&lt;/span&gt; drives&lt;/a&gt;&amp;nbsp;(crunchgear.com)&lt;/li&gt;
&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.socialmediatoday.com/SMC/122938"&gt;Lawyers should leave their laptops at home when traveling abroad&lt;/a&gt;&amp;nbsp;(socialmediatoday.com)&lt;/li&gt;
&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://owencutajar.com/protect-your-data/"&gt;Protect your data&lt;/a&gt;&amp;nbsp;(owencutajar.com)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/fieldset&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"&gt;&lt;a title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/dd44da1e-a1e0-40f5-ad99-9c3ef82e89b3/" class="zemanta-pixie-a"&gt;&lt;img alt="Reblog this post [with Zemanta]" src="http://img.zemanta.com/reblog_c.png?x-id=dd44da1e-a1e0-40f5-ad99-9c3ef82e89b3" class="zemanta-pixie-img" style="border: medium none; float: right;" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;/p&gt;
&lt;script defer="defer" src="http://static.zemanta.com/readside/loader.js" type="text/javascript"&gt;&lt;/script&gt;&lt;p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/spf13?a=NqG2C93lMyg:TsZ4QqnaFvQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/spf13?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/spf13/~4/NqG2C93lMyg" height="1" width="1"/&gt;</description>
     <comments>http://spf13.com/post/7-security-practices-you-need-follow#comments</comments>
 <category domain="http://spf13.com/category/it">IT</category>
 <category domain="http://spf13.com/category/systems">Systems</category>
 <pubDate>Tue, 22 Dec 2009 14:52:29 +0000</pubDate>
 <dc:creator>Steve Francia</dc:creator>
 <guid isPermaLink="false">2235 at http://spf13.com</guid>
  <feedburner:origLink>http://spf13.com/post/7-security-practices-you-need-follow</feedburner:origLink></item>
  </channel>
</rss>
