<?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>Webmaster-Source &#187; Software &amp; Scripts</title>
	<atom:link href="https://www.webmaster-source.com/category/software-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.webmaster-source.com</link>
	<description>Useful Resources For Webmasters</description>
	<lastBuildDate>Thu, 24 Aug 2017 02:01:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>Automating Repetitive Text Editing with Vim Macros</title>
		<link>https://www.webmaster-source.com/2014/02/05/automating-repetitive-text-editing-with-vim-macros/</link>
		<comments>https://www.webmaster-source.com/2014/02/05/automating-repetitive-text-editing-with-vim-macros/#comments</comments>
		<pubDate>Wed, 05 Feb 2014 14:36:05 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Software & Scripts]]></category>
		<category><![CDATA[text editors]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5281</guid>
		<description><![CDATA[Don&#8217;t you just hate it when you have to do some repetitive text editing, such as wrapping several lines of text in &#60;li&#62;...&#60;/li&#62; tags or just about anything involving tables? (Actually, HTML is a veritable goldmine of repetition&#8230;) If you use vim, you can whip up macros on-the-fly to reduce this sort of tedium. The [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Don&#8217;t you just hate it when you have to do some repetitive text editing, such as wrapping several lines of text in <code>&lt;li&gt;...&lt;/li&gt;</code> tags or just about anything involving tables? (Actually, HTML is a veritable goldmine of repetition&#8230;) If you use vim, you can whip up macros on-the-fly to reduce this sort of tedium.</p>
<p>The commands to know are:</p>
<ul>
<li><code>q</code> — Start or stop macro recording. When starting, it should be used with a letter from <code>a</code> to <code>z</code>, which is the register it will record into. (So you can have more than one macro in memory at once.) The command is used singularly to end recording.</li>
<li><code>@</code> — Play back the macro. Use it in the form of <code>@a</code> to play the macro in register a.</li>
<li><code>@@</code> — Play the last-played macro again.</li>
</ul>
<p>Rather than explain it in textual form, I recorded <a href="http://www.youtube.com/watch?v=lXrymNTLKdo">a short screencast</a> that illustrates the basics of using macros in vim.</p>
<p><iframe width="500" height="375" src="http://www.youtube.com/embed/lXrymNTLKdo?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2014/02/05/automating-repetitive-text-editing-with-vim-macros/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>Ghost 0.4 Drops, Plugin API Slated for 0.5 Release</title>
		<link>https://www.webmaster-source.com/2014/01/29/ghost-0-4-drops-plugin-api-slated-for-0-5-release/</link>
		<comments>https://www.webmaster-source.com/2014/01/29/ghost-0-4-drops-plugin-api-slated-for-0-5-release/#comments</comments>
		<pubDate>Wed, 29 Jan 2014 11:42:18 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Software & Scripts]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Ghost]]></category>
		<category><![CDATA[Node.js]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5277</guid>
		<description><![CDATA[Version 0.4 of Ghost, the lightweight Node.js blogging platform, went live this month. Some of the more interesting features include support for static pages, a new way to quickly edit posts by appending /edit to the URL, support for date-based permalinks (e.g. /2014/01/25/example-post instead of /example-post), support for uploading SVG images, and the ability to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-full wp-image-5201" alt="Ghost Logo" src="//www.webmaster-source.com/wp-content/uploads/2013/10/ghost-logo.png" width="196" height="135" /><a href="https://github.com/TryGhost/Ghost/wiki/Release-Notes:-0.4.0">Version 0.4</a> of <a href="http://ghost.org">Ghost</a>, the lightweight Node.js blogging platform, went live this month. Some of the more interesting features include support for static pages, a new way to quickly edit posts by appending <code>/edit</code> to the URL, support for date-based permalinks (e.g. <code>/2014/01/25/example-post</code> instead of <code>/example-post</code>), support for uploading SVG images, and the ability to put Ghost in a subdirectory.</p>
<p>With this update out of the way, we&#8217;re one closer to seeing the plugin API. That&#8217;s currently scheduled for version 0.5 (to be released <a href="https://github.com/TryGhost/Ghost/wiki/Roadmap">sometime this spring</a>).</p>
<p>The ability to extend Ghost is, in my opinion, what will make it a truly excellent platform. I really like the editor—which is reason enough to start using Ghost—but I can&#8217;t switch any of my sites over (not even my personal blog) until it&#8217;s possible for me to add in some features Ghost is missing. I do a bit of linkblogging on my personal blog (<a href="http://daringfireball.net/">Daring Fireball</a> style, with headlines that link to external sites), and Ghost doesn&#8217;t offer the ability to do that out of the box. I also have a couple posts on the blog that feature image galleries, originally with WordPress and later through <a href="https://github.com/redwallhp/JekyllGalleryTag">my Jekyll plugin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2014/01/29/ghost-0-4-drops-plugin-api-slated-for-0-5-release/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Vim Tip: Sort Lines Alphabetically</title>
		<link>https://www.webmaster-source.com/2014/01/01/vim-tip-sort-lines-alphabetically/</link>
		<comments>https://www.webmaster-source.com/2014/01/01/vim-tip-sort-lines-alphabetically/#comments</comments>
		<pubDate>Wed, 01 Jan 2014 11:01:33 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Software & Scripts]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5268</guid>
		<description><![CDATA[Have a list that you need to alphabetize quickly? Vim has you covered. There&#8217;s a handy :sort command (:help sort for optional arguments) that will do just what it says on the box. All you have to do is select the lines in visual mode (v), and run :sort. What sort of arguments does it [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Have a list that you need to alphabetize quickly? Vim has you covered. There&#8217;s a handy <code>:sort</code> command (<code>:help sort</code> for optional arguments) that will do just what it says on the box. All you have to do is select the lines in visual mode (<code>v</code>), and run <code>:sort</code>.</p>
<p style="text-align: center;"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-medium wp-image-5269 imgborder" alt="vim :sort" src="//www.webmaster-source.com/wp-content/uploads/2013/12/vim-sort-600x83.png" width="600" height="83" /></p>
<p>What sort of arguments does it support? The most common are probably <code>!</code> and <code>i</code>, which reverse the sort order and ignore case, respectively. It supports some more advanced pattern-matching stuff, but I haven&#8217;t had cause to experiment with it yet.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2014/01/01/vim-tip-sort-lines-alphabetically/feed/</wfw:commentRss>
		<slash:comments>56</slash:comments>
		</item>
		<item>
		<title>Visualizing Directory Structures with the Tree Command</title>
		<link>https://www.webmaster-source.com/2013/12/18/visualizing-directory-structures-with-the-tree-command/</link>
		<comments>https://www.webmaster-source.com/2013/12/18/visualizing-directory-structures-with-the-tree-command/#comments</comments>
		<pubDate>Wed, 18 Dec 2013 11:41:04 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Software & Scripts]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5254</guid>
		<description><![CDATA[Sometimes good old ls just doesn&#8217;t cut it when you&#8217;re browsing directories from the command line. Sometimes you just need a more visual overview of the nested files and directories. Well, it turns out there&#8217;s a useful command for those cases, and it&#8217;s available for Linux, OS X, FreeBSD and just about any OS you [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Sometimes good old <code>ls</code> just doesn&#8217;t cut it when you&#8217;re browsing directories from the command line. Sometimes you just need a more visual overview of the nested files and directories. Well, it turns out there&#8217;s a useful command for those cases, and it&#8217;s available for Linux, OS X, FreeBSD and just about any OS you can think of. (Except Windows, of course.) It&#8217;s called <a href="http://mama.indstate.edu/users/ice/tree/"><code>tree</code></a>.</p>
<p>To install it on OS X, with <a href="http://brew.sh/">Homebrew</a>:</p>
<pre class="brush: plain; title: ; notranslate">brew install tree</pre>
<p>On Ubuntu/Debian, or other Linux distros that use Debian packages:</p>
<pre class="brush: plain; title: ; notranslate">apt-get install tree</pre>
<p>To use it, just navigate to a directory and type <code>tree</code>. It has various options (visible with <code>tree --help</code>), so you can limit how many levels down it will go, exclude items that match a pattern, adjust sorting, etc.. You get a spiffy diagram that looks something like this:</p>
<pre class="brush: plain; title: ; notranslate">
.
├── application.rb
├── boot.rb
├── database.yml
├── environment.rb
├── environments
│   ├── development.rb
│   ├── production.rb
│   └── test.rb
├── initializers
│   ├── backtrace_silencers.rb
│   ├── filter_parameter_logging.rb
│   ├── inflections.rb
│   ├── mime_types.rb
│   ├── secret_token.rb
│   ├── session_store.rb
│   └── wrap_parameters.rb
├── locales
│   └── en.yml
└── routes.rb
</pre>
<p>Is that cool or what? This should be quite useful for writing tutorials, since a plain-text directory tree is more accessible than a screenshot of a file manager window.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2013/12/18/visualizing-directory-structures-with-the-tree-command/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>List.js: Table and List Sorting in 5kb of JavaScript</title>
		<link>https://www.webmaster-source.com/2013/12/11/list-js-table-and-list-sorting-in-5kb-of-javascript/</link>
		<comments>https://www.webmaster-source.com/2013/12/11/list-js-table-and-list-sorting-in-5kb-of-javascript/#comments</comments>
		<pubDate>Wed, 11 Dec 2013 13:52:43 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Software & Scripts]]></category>
		<category><![CDATA[(x)html]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5252</guid>
		<description><![CDATA[List.js is a tiny (five kilobytes!) library that can add dynamic sorting, searching and pagination to HTML lists and tables. It requires no dependencies, and claims to be able to handle lists with &#8220;thousands of items.&#8221; It also includes a templating system that makes it possible to allow the addition and editing of items, a [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://listjs.com/">List.js</a> is a tiny (five kilobytes!) library that can add dynamic sorting, searching and pagination to HTML lists and tables. It requires no dependencies, and claims to be able to handle lists with &#8220;thousands of items.&#8221;</p>
<p>It also includes a templating system that makes it possible to allow the addition and editing of items, a pagination plugin, and a plugin that adds <a href="http://listjs.com/examples/fuzzy-search">fuzzy search</a>. (Also, they get bonus points for using characters from <a href="http://en.wikipedia.org/wiki/The_Secret_of_Monkey_Island"><em>The Secret of Monkey Island</em></a> as an example.)</p>
<p>The script looks very promising, though there is one caveat about the file size claim: the minified version is 5kb when served with gzip compression. If, for whatever reason, your server is not configured to do so, then it&#8217;s more to the order of 15kb. Still small, but not quite as amazingly so.</p>
<p><a href="http://listjs.com">List.js</a> [listjs.com]</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2013/12/11/list-js-table-and-list-sorting-in-5kb-of-javascript/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>Take the Vim Challenge!</title>
		<link>https://www.webmaster-source.com/2013/12/02/take-the-vim-challenge/</link>
		<comments>https://www.webmaster-source.com/2013/12/02/take-the-vim-challenge/#comments</comments>
		<pubDate>Mon, 02 Dec 2013 23:12:13 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Software & Scripts]]></category>
		<category><![CDATA[text editors]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5247</guid>
		<description><![CDATA[If you&#8217;re at all familiar with the Linux/Unix world, it&#8217;s safe to say you&#8217;ve probably heard of vim. The mode-based editor is famed for both its power and frustrating learning curve. Unlike most editors, which default to a mode where you can type text, vim defaults to a &#8220;command mode&#8221; where you can edit text [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you&#8217;re at all familiar with the Linux/Unix world, it&#8217;s safe to say you&#8217;ve probably heard of <a href="http://en.wikipedia.org/wiki/Vim_(text_editor)">vim</a>. The mode-based editor is famed for both its power and frustrating learning curve. Unlike most editors, which default to a mode where you can type text, vim defaults to a &#8220;command mode&#8221; where you can edit text through short commands bound to single keys on the keyboard. If you want to enter &#8220;insert mode&#8221; to type text, you need to press the <code>i</code> key, and then the escape key to return to command mode when you&#8217;re done. The commands can even be chained together, so you can, for example, use <code>dw</code> to delete the word the cursor is currently over. Or move the cursor three characters to the right with <code>3l</code>.</p>
<p><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-full wp-image-5248" alt="vim" src="//www.webmaster-source.com/wp-content/uploads/2013/12/vim-css.png" width="600" height="424" /></p>
<p>The tricky part, besides learning and remembering the various commands is picking up the habit of not staying in insertion mode. The way you&#8217;re supposed to use vim is to enter that mode only for short bursts of typing. Then you exit back to command mode. This makes it more natural to use the fast cursor movement and text operation commands.<span id="more-5247"></span></p>
<h3>Why learn vim?</h3>
<ul>
<li>It&#8217;s everywhere! Pretty much every *nix system has vim/vi preinstalled. (Even OS X!) So if you frequently connect to servers to edit config files, you&#8217;ll be able to do so much more effectively than if you use nano. (Strangely, though, Ubuntu doesn&#8217;t include vim by default. They have vi, but not vim. You can install it easily through apt, though.)</li>
<li>It&#8217;s efficient. Once you get the hang of it, you&#8217;re not just operating a text editor, you&#8217;re <em>flying</em> a text editor. Watch someone <a href="http://www.youtube.com/watch?v=pCiVCiku3cM">take a large amount of tabular data and turn it into an HTML table</a> with vim. Usually that would take awhile to do by hand in your average text editor. In vim? Thirty-two seconds.</li>
<li>It&#8217;s stood the test of time. Vim has been around since 1993, and its more limited precursor, vi, dates back to 1978. Vim is an open source project that is still maintained to this day, and used by legions of programmers who depend on it, after all this time. It&#8217;s been here for a long time, and you can be sure it won&#8217;t be going anywhere. Which is more than I can say for Sublime Text, which, while I really like it as an editor, is maintained by one person. (The dev world is no stranger to projects grinding to a halt when the lead developer loses interest or passes away!)</li>
<li>If you do use Sublime Text for larger projects, you can enable <a href="http://www.sublimetext.com/docs/2/vintage.html">vintage mode</a> to use the same vim commands in Sublime!</li>
<li>For further reasons, see <a href="http://www.viemu.com/a-why-vi-vim.html">&#8220;Why, oh WHY, do those #?@! nutheads use vi?&#8221;</a></li>
</ul>
<h3>The Challenge</h3>
<p>Learn vim! No, really, that&#8217;s it. Install vim, <a href="http://vim.wikia.com/wiki/Example_vimrc">customize your .vimrc</a>, and try using it for a week or two. Put some effort into learning it, give it a chance, and see how you like it. If you want to ease into it, you can use a graphical version like <a href="https://code.google.com/p/macvim/">MacVim</a> so you can still use the mouse or familiar keyboard shortcuts when you&#8217;re not feeling particularly adventurous.</p>
<p>Be sure to go through <code>vimtutor</code>, which you should be able to launch by running <code>vimtutor</code> at the command line. It walks you through the basics of using vim.</p>
<h3>Helpful Resources</h3>
<ul>
<li><a href="http://vimcasts.org/">Vimcasts</a></li>
<li><a href="http://vim.wikia.com/">Vim Wiki</a></li>
<li><a href="http://net.tutsplus.com/articles/web-roundups/25-vim-tutorials-screencasts-and-resources/">25 Vim Tutorials, Screencasts, and Resources</a></li>
<li><a href="http://ethanschoonover.com/solarized">Solarized color scheme</a> (as seen in the screenshot above)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2013/12/02/take-the-vim-challenge/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Installing Multiple Ghost Blogs Behind NGINX on Ubuntu 12.04</title>
		<link>https://www.webmaster-source.com/2013/11/06/installing-multiple-ghost-blogs-behind-nginx-on-ubuntu-12-04/</link>
		<comments>https://www.webmaster-source.com/2013/11/06/installing-multiple-ghost-blogs-behind-nginx-on-ubuntu-12-04/#comments</comments>
		<pubDate>Wed, 06 Nov 2013 15:15:16 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Software & Scripts]]></category>
		<category><![CDATA[DigitalOcean]]></category>
		<category><![CDATA[Ghost]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5236</guid>
		<description><![CDATA[Looking to set up a blog with Ghost? While it still has a few rough edges and missing features at the time of this writing, as it&#8217;s essentially in beta at this point (hence the &#8220;0.3&#8221; versioning), it definitely shows promise as a blogging platform. If you&#8217;re reading this, you&#8217;re probably aware that you can&#8217;t [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  src="//www.webmaster-source.com/wp-content/uploads/2013/10/ghost-logo.png" alt="Ghost Logo" width="196" height="135" class="alignright size-full wp-image-5201 imgborder" />Looking to set up a blog with <a href="http://ghost.org">Ghost?</a> While it still has a few rough edges and missing features at the time of this writing, as it&#8217;s essentially in beta at this point (hence the &#8220;0.3&#8221; versioning), it definitely <a href="http://www.webmaster-source.com/2013/10/02/ghost-the-new-blogging-platform-and-why-it-matters/">shows promise</a> as a blogging platform.</p>
<p>If you&#8217;re reading this, you&#8217;re <em>probably</em> aware that you can&#8217;t just FTP Ghost to a dinky shared host and expect it to run like your average PHP script. Ghost is a Node.js application, which works differently, and has yet to be adopted by services that generally cater to newbies. You&#8217;re going to need a <abbr title="Virtual Private Server">VPS</abbr> and command line access. I&#8217;m also going to assume a rudimentary knowledge of Linux commands. (You can pick up the basics pretty easily at <a href="http://linuxcommand.org/">linuxcommand.org</a> if need be.)</p>
<p>This tutorial aims to walk you through the process of installing one ore more instances of Ghost behind the NGINX server. NGINX is a fast and lightweight web server that, when configured in this manner, acts as a proxy, forwarding requests to the correct Ghost blog.</p>
<h3>DigitalOcean</h3>
<p>I&#8217;m a big fan of <a href="https://www.digitalocean.com/?refcode=b6711983671a">DigitalOcean</a>. I&#8217;ve been hosting my various web sites with them since this June, and their service has been of excellent quality. In addition to their rock-bottom price, their virtual machines have performed well and their staff has been competent and helpful. (You can find my review of DigitalOcean here.)</p>
<p>$5/month will get you a &#8220;Droplet&#8221; with 512MB of RAM, 20GB of storage on a solid state drive and plenty of data transfer. (It&#8217;s a soft cap with reasonable overages. You&#8217;re very, very unlikely to ever reach it, though. Unless you&#8217;re a popular podcaster or something, in which case you should be looking into a CDN&#8230;)</p>
<p>The figure that&#8217;s the most important is the RAM. Just like with the computer you&#8217;re using to read this, active applications reside in the system&#8217;s memory, and the amount they use varies depending on what the app is doing. Ghost, in my informal tests, doesn&#8217;t seem to be too memory-intense. So a 512MB Droplet could probably host a few Ghost blogs at once, depending on their popularity and how the system is configured.</p>
<p>There are plenty of options for a VPS, though. If you&#8217;re not too keen on DigitalOcean, <a href="https://www.linode.com/">Linode</a>, <a href="http://www.rackspace.com/">Rackspace</a>, <a href="http://aws.amazon.com/ec2/">Amazon EC2</a> and <a href="http://ramnode.com/">RamNode</a> are popular. If you want to give DigitalOcean a try, you can sign up with the promo code DIVEIN5 to get a $5 credit. You can also pay by the hour if you just want to fire up a VM for a few hours to experiment before making a decision.</p>
<h3>Initial Setup</h3>
<p>Once you&#8217;ve got your VPS, it&#8217;s time to start setting things up. For simplicity, I will assume you are running Ubuntu 12.04. You can follow along with any Linux distribution on any hosting provider, but some commands may be a little different.</p>
<p>First, if you haven&#8217;t already, use SSH to log in to your <abbr title="Virtual Machine">VM</abbr> as <code>root</code>, using the password your host gave you. Take this opportunity to change your password to something different, and reasonably strong, for security. Just run the <code>passwd</code> command and follow the on-screen instructions.</p>
<p>Now let the system update its package index by running the following command:</p>
<pre class="brush: bash; title: ; notranslate">apt-get update</pre>
<p>While you&#8217;re at it, install the <code>unzip</code> tool so you can unpack the Ghost archive later on.</p>
<pre class="brush: bash; title: ; notranslate">apt-get install unzip</pre>
<p><span id="more-5236"></span></p>
<h3>Installing Node.js</h3>
<p>Now we need to install <a href="http://nodejs.org/">Node.js</a>, the JavaScript platform that Ghost is built on. Ubuntu&#8217;s pre-made package probably isn&#8217;t new enough to run Ghost, so we&#8217;ll have to compile it ourselves.</p>
<p>First, install the Linux build tools through Ubuntu&#8217;s package manager. This will install the necessary compilers, as well as the <code>make</code> tool.</p>
<pre class="brush: bash; title: ; notranslate">apt-get install build-essential</pre>
<p>Now you need to change to your home folder, make a new directory to contain the source, and download Node.js.</p>
<pre class="brush: bash; title: ; notranslate">
cd
mkdir src
cd src
wget http://nodejs.org/dist/v0.10.21/node-v0.10.21.tar.gz
</pre>
<p>If you run <code>ls</code>, you should see the archive in the src directory. If the file was successfully downloaded, you can unpack the archive and change to the resulting directory.</p>
<pre class="brush: bash; title: ; notranslate">
tar -zxvf node-v0.10.21.tar.gz
cd node-v0.10.21
</pre>
<p>Ready to compile? After you run the next two commands, be prepared to wait 5-10 minutes while the system works its magic and converts raw source code into an executable binary.</p>
<pre class="brush: bash; title: ; notranslate">
./configure
make
</pre>
<p>Once the messages stop scrolling by and the command prompt returns, you just need to run the installer.</p>
<pre class="brush: bash; title: ; notranslate">
make install
</pre>
<p>Congratulations, you&#8217;ve successfully compiled and installed a program from source! To verify that everything worked properly, run <code>node -v</code>. It should output the Node.js version, which in this case is v0.10.21. (Or a greater version if there is a newer one out by the time you read this.)</p>
<h3>Ghost Installation</h3>
<p>The next step is to install a copy of Ghost for each of your blogs. First, let&#8217;s make a place for them to reside in.</p>
<pre class="brush: bash; title: ; notranslate">
mkdir /var/ghost
cd /var/ghost
</pre>
<p>If you intend to use an FTP client to make it easier to upload themes or such, /var/ghost is the place where your blogs&#8217; files will be found. So it&#8217;s a good path to remember. (On a related note, the SSH process also doubles as a secure FTP server. If your FTP client supports SFTP, you can connect to the domain/IP and log in with a valid username and password.)</p>
<p>To add a copy of Ghost, just follow these steps:</p>
<pre class="brush: bash; title: ; notranslate">
mkdir myghostblog
cd myghostblog
wget https://ghost.org/zip/ghost-0.3.3.zip
unzip ghost-0.3.3.zip
rm ghost-0.3.3.zip
npm install --production
</pre>
<p>What you&#8217;re doing is:</p>
<ol>
<li>Creating a folder for the blog</li>
<li>Changing to that folder</li>
<li>Downloading Ghost</li>
<li>Unzipping Ghost</li>
<li>Removing the .zip file</li>
<li>Installing Ghost</li>
</ol>
<p>Before we can actually start Ghost up, there is some essential configuration that needs to be adjusted.</p>
<p>Copy the example configuration file to a new <code>config.js</code> file with <code>cp config.example.js config.js</code>. Open the <code>config.js</code> file in the <code>nano</code> text editor with <code>nano config.js</code>. Use the arrow keys to scroll down to where the &#8220;production&#8221; environment starts in the config. It looks something like this:</p>
<pre class="brush: jscript; title: ; notranslate">
production: {
    url: 'http://my-ghost-blog.com',
    mail: {},
    database: {
        client: 'sqlite3',
        connection: {
            filename: path.join(__dirname, '/content/data/ghost.db')
        },
        debug: false
    },
    server: {
        host: '127.0.0.1',
        port: '2368'
    }
},
</pre>
<p>There are three things you need to change:</p>
<ol>
<li>The <code>url</code> field. Replace <code>http://my-ghost-blog.com</code> with <code>http://whatever-your-domain-is.com</code>.</li>
<li>The <code>port</code> field in the <code>server</code> block may need to be changed, depending on whether this is the first blog you&#8217;re setting up or not.</li>
</ol>
<p>To save the file, press control+o and, then control+x to exit.</p>
<p>Web browsers, by default, connect to HTTP port 80 when requesting a web page. The way we&#8217;re setting this up, NGINX will listen on port 80, waiting for requests, and forward them to the ports your Ghost blogs are listening on. So Blog A can listen on port 2368 and Blog B can listen on port 2369. NGINX will listen on port 80, figure out which domain name belongs to which blog, and route the requests to the appropriate port.</p>
<p>Repeat the relevant steps in this section to set up additional blogs. You can wait until after you&#8217;ve finished setting up the first, if you want.</p>
<h3>Upstart</h3>
<p>We need to make it easy to start and stop the Ghost processes, and ensure that they come back online automatically if the server is restarted. On Ubuntu, it&#8217;s super simple with a system known as Upstart.</p>
<p>First, create a new Upstart configuration file called <code>ghost.conf</code>.</p>
<pre class="brush: bash; title: ; notranslate">
cd /etc/init
nano ghost.conf
</pre>
<p>Now fill it with the following Upstart script, replacing <code>myghostblog</code> with the directory you created for your blog:</p>
<pre class="brush: plain; title: ; notranslate">
start on startup

script
    cd /var/ghost/myghostblog
    npm start --production
end script
</pre>
<p>If you have multiple Ghost blogs set up, you would do something like this:</p>
<pre class="brush: plain; title: ; notranslate">
start on startup

script
    cd /var/ghost/myghostblog
    npm start --production
    cd /var/ghost/myotherghostblog
    npm start --production
end script
</pre>
<h3>NGINX Installation</h3>
<pre class="brush: bash; title: ; notranslate">
apt-get install nginx
</pre>
<p>That was easy, wasn&#8217;t it?</p>
<h3>NGINX Configuration</h3>
<p>NGINX keeps its site configuration files in two directories within <code>/etc/nginx</code>:</p>
<ul>
<li><code>sites-available</code> — Each site gets its own configuration file in here</li>
<li><code>sites-enabled</code> — This directory contains <a href="http://en.wikipedia.org/wiki/Symbolic_link">symbolic links</a> pointing to the files in <code>sites-available</code>.</li>
</ul>
<p>Let&#8217;s create a new site configuration for <code>myghostblog</code>.</p>
<pre class="brush: bash; title: ; notranslate">
cd /etc/nginx/sites-available
nano myghostblog
</pre>
<p>A simple configuration that does nothing but pass traffic addressed to <code>my-awesome-ghost-blog.com</code> to the Ghost blog listening on port 2368 looks like this:</p>
<pre class="brush: plain; title: ; notranslate">
server {
    server_name my-awesome-ghost-blog.com;

    location / {
        proxy_pass http://127.0.0.1:2368;
    }
}
</pre>
<p>Of course, <a href="http://wiki.nginx.org/Main">NGINX</a> is a powerful and flexible piece of software that is capable of a lot more. This is just one of many things you can use it for.</p>
<p>As before, save the file by pressing control+o and quit nano with control+x. Next, move back up one directory level to /etc/nginx and create a symbolic link in <code>sites-enabled</code>, pointing to the file in <code>sites-available</code>.</p>
<pre class="brush: bash; title: ; notranslate">
cd ../
ln -s sites-available/myghostblog sites-enabled/myghostblog
</pre>
<h3>Fire it Up</h3>
<p>Now that you have everything configured, you can start (or stop) the processes with the <code>service</code> command.</p>
<pre class="brush: bash; title: ; notranslate">
service ghost start
service nginx start
</pre>
<p>You can replace <code>start</code> with <code>stop</code> to exit ghost or nginx if you have reason to do so, or <code>restart</code> if you need to reload one after making some sort of change. (e.g. editing Ghost&#8217;s <code>config.js</code> file requires that Ghost be restarted.) NGINX can reload its config files without doing a full restart of the process with <code>service nginx reload</code>, which takes less time and is useful when making edits.</p>
<p>If all went well, you should be able to open your Ghost blog in a browser.</p>
<h3>Managing Memory</h3>
<p>How much memory is Ghost using, you may wonder. And if you aren&#8217;t, you probably should. The enemy of performance on web servers is <a href="http://en.wikipedia.org/wiki/Paging">swapping</a>, which is where the system runs out of available RAM and starts copying things back and forth to the hard disk, causing major slowdowns. This is frequently referred to as &#8220;thrashing.&#8221; Even a fast solid state drive is orders of magnitude slower than RAM.</p>
<p>There are some useful tools for monitoring available RAM and inspecting active processes. The most commonly used ones are <code>free</code>, <code>top</code>, and <code>ps</code>.</p>
<p>The <code>free</code> command shows the system&#8217;s memory totals. If you run it with the <code>m</code> flag (<code>free -m</code>) to show the values in human-readable megabytes instead of plain bytes, you should see something like this:</p>
<pre class="brush: bash; title: ; notranslate">
root@DeepSpaceNine:~$ free -m
             total       used       free     shared    buffers     cached
Mem:           369        129        239          0         11         51
-/+ buffers/cache:         67        302
Swap:          767          0        767
</pre>
<p>The most important line is the one labeled <code>-/+ buffers/cache</code>. Modern operating systems don&#8217;t waste memory. If nothing else is making use of it, the OS will make use of it until the space is needed. The <code>-/+</code> line shows the usage sans caches. In this example, there are 302MB of free memory with only 67 being in use. There is also nothing in swap, which is exactly what you want to see.</p>
<p>The <code>top</code> command shows a live-updated table of currently running processes, and statistics for them. By default, it&#8217;s sorted by CPU activity, but you can sort by memory usage by pressing shift+M.</p>
<p style="text-align: center;"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-full wp-image-5237 imgborder" alt="The top command" src="//www.webmaster-source.com/wp-content/uploads/2013/11/ghost-top-cmd.png" width="600" height="381" /></p>
<p>Pressing control+C exits <code>top</code>.</p>
<p>Need to see a list of all running processes? Run <code>ps aux</code>. Be prepared for a huge list, as it will be full of system processes.</p>
<h3>Conclusion</h3>
<p>I hope this guide helps you get started with Ghost. I realize it is a bit technical, something the upcoming hosted service and DigitalOcean&#8217;s <a href="https://www.digitalocean.com/community/articles/how-to-use-the-digitalocean-ghost-application">one-click Ghost image</a> should help obviate, but hey, it&#8217;s new. It was harder to get up an running with WordPress back in 2003, too.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2013/11/06/installing-multiple-ghost-blogs-behind-nginx-on-ubuntu-12-04/feed/</wfw:commentRss>
		<slash:comments>242</slash:comments>
		</item>
		<item>
		<title>Dashing — The Exceptionally Handsome Dashboard Framework</title>
		<link>https://www.webmaster-source.com/2013/09/18/dashing-the-exceptionally-handsome-dashboard-framework/</link>
		<comments>https://www.webmaster-source.com/2013/09/18/dashing-the-exceptionally-handsome-dashboard-framework/#comments</comments>
		<pubDate>Wed, 18 Sep 2013 11:37:56 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Software & Scripts]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Sinatra]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5183</guid>
		<description><![CDATA[Need to throw together a quick dashboard with live-updated information and statistical readouts? Dashing is a fun new framework built atop Sinatra that lets you quickly setup dashboards, much in the style of Microsoft&#8217;s &#8220;Metro&#8221; UI. You can leverage premade widgets (which include numerical readouts, meters, graphs and lists) or make your own with HTML, [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Need to throw together a quick dashboard with live-updated information and statistical readouts? <a href="http://shopify.github.io/dashing/">Dashing</a> is a fun new framework built atop <a href="http://www.sinatrarb.com/">Sinatra</a> that lets you quickly setup dashboards, much in the style of Microsoft&#8217;s &#8220;Metro&#8221; UI. You can leverage premade widgets (which include numerical readouts, meters, graphs and lists) or make your own with HTML, SCSS, CoffeeScript and a bit of Ruby. Dashing uses Batman.js and rufus-scheduler to run server-side jobs at scheduled intervals and update the browser.</p>
<p>A live demo of Dashing can be <a href="http://dashingdemo.herokuapp.com/sample">seen here</a>.</p>
<p style="text-align: center;"><a href="http://shopify.github.io/dashing/"><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-full wp-image-5184 imgborder" alt="Dashing" src="//www.webmaster-source.com/wp-content/uploads/2013/09/dashing-framework.png" width="600" height="342" /></a></p>
<p>I know I&#8217;m going to have a bit of fun setting up personal dashboards that pull in various fun statistics. There are already quite a few <a href="https://github.com/Shopify/dashing/wiki/Additional-Widgets">pre-made widgets</a> out there, which should be helpful.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2013/09/18/dashing-the-exceptionally-handsome-dashboard-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Homebrew: The Missing Package Manager for OS X</title>
		<link>https://www.webmaster-source.com/2013/09/11/homebrew-the-missing-package-manager-for-os-x/</link>
		<comments>https://www.webmaster-source.com/2013/09/11/homebrew-the-missing-package-manager-for-os-x/#comments</comments>
		<pubDate>Wed, 11 Sep 2013 11:11:11 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Software & Scripts]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5178</guid>
		<description><![CDATA[If you have worked at all with Linux, you&#8217;re probably familiar with the concept of a package manager. Type a short command and instantly install software. Programming languages even have their own these days, for managing libraries. Ruby has RubyGems, Node has NPM, PHP has Composer and Python has pip. If you work with those [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you have worked at all with Linux, you&#8217;re probably familiar with the concept of a package manager. Type a short command and instantly install software. Programming languages even have their own these days, for managing libraries. Ruby has RubyGems, Node has NPM, PHP has Composer and Python has pip.</p>
<p>If you work with those tools enough, the Mac OS&#8217;s blatant lack of a package manager will leave you frustrated when you need to install a package on your Mac.</p>
<p>Fortunately, there is an elegant third party option. <a href="http://brew.sh/">Homebrew</a> sets up a directory (the &#8220;Cellar&#8221;) where any packages you install will live, so as not to break things if there are conflicts with versions of packages Apple pre-installed, and it adds it to your shell path. From there, you can find packages with <code>brew search something</code> and install them with <code>brew install something</code>. Need <code>wget</code>? <code>brew install wget</code> and you&#8217;re done.</p>
<p>The number of headaches I&#8217;ve experienced with Homebrew is far lower than that of MacPorts, an older package manager that loves to fail compiles and create conflicts.</p>
<p><a href="http://brew.sh/">Homebrew</a> [brew.sh]</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2013/09/11/homebrew-the-missing-package-manager-for-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Enable Curly Quotes in Jekyll</title>
		<link>https://www.webmaster-source.com/2013/06/26/how-to-enable-curly-quotes-in-jekyll/</link>
		<comments>https://www.webmaster-source.com/2013/06/26/how-to-enable-curly-quotes-in-jekyll/#comments</comments>
		<pubDate>Wed, 26 Jun 2013 11:12:27 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Software & Scripts]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Jekyll]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5117</guid>
		<description><![CDATA[I recently migrated one of my blogs from WordPress to Jekyll and painstakingly ported my custom theme to the new blog engine. I didn&#8217;t notice it at first, but Jekyll makes a major typographic faux pas by default: it uses ugly, straight &#8220;typewriter quotes&#8221; instead of converting them to proper &#8220;curly quotes.&#8221; (Sometimes you&#8217;ll see [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Quotation_mark"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-full wp-image-5118 imgborder" alt="Curly vs Straight Quotes" src="//www.webmaster-source.com/wp-content/uploads/2013/06/curlyquotes.png" width="209" height="234" /></a>I recently migrated one of my blogs from WordPress to <a href="http://jekyllrb.com/">Jekyll</a> and painstakingly ported my custom theme to the new blog engine. I didn&#8217;t notice it at first, but Jekyll makes a major typographic <em>faux pas</em> by default: it uses ugly, straight &#8220;typewriter quotes&#8221; instead of converting them to proper &#8220;curly quotes.&#8221; (Sometimes you&#8217;ll see them referred to as &#8220;smart quotes.&#8221;)</p>
<p>For the uninitiated, straight quotes are a relic from the old days of mechanical typewriters. Rather than have separate keys for the opening and closing marks, they instead used a single key that functioned as both. The single-quote glyph also sometimes served as half of an exclamation point on some models, which would be produced by pressing the backspace key and typing the single-quote over a period.</p>
<p>I&#8217;m sure that must have been a constant annoyance to professional typesetters, just like seeing signs printed in Comic Sans today&#8230;</p>
<p>History lesson aside, what can we do about Jekyll&#8217;s carefree attitude about quotation marks? We <em>could</em> type them manually, memorizing our preferred operating systems&#8217; <a href="http://en.wikipedia.org/wiki/Quotation_mark#Typing_quotation_marks_on_a_computer_keyboard">keyboard sequence</a> to produce proper quotes. But that&#8217;s not much of a solution, is it? Shouldn&#8217;t a blog engine designed to wrangle Markdown into HTML automatically replace straight quotes for us?</p>
<p>I have good news: it can do just that, and it&#8217;s a simple matter of editing the <code>_config.yml</code> file.</p>
<p>Jekyll can use more than one Markdown parser in its build process, and the default one (Maruku) is the most basic of the bunch. If you switch to RDiscount, which has a few advantages, you can enable the <a href="http://daringfireball.net/projects/smartypants/">SmartyPants</a> plugin, which automatically substitutes proper typographical characters for ones that are easier to enter on a keyboard. (Typewriter quotes become curly quotes, triple-dashes become <a href="http://en.wikipedia.org/wiki/Dash#Em_dash">em-dashes</a>, etc.)</p>
<p>First, you need to install RDiscount.</p>
<pre class="brush: bash; title: ; notranslate">gem install rdiscount</pre>
<p>Now add the following lines to <code>_config.yml</code>:</p>
<pre class="brush: plain; title: ; notranslate">
markdown: rdiscount
rdiscount:
extensions: ['smart']
</pre>
<p>This switches the Markdown parser to RDiscount and enables the &#8220;smart&#8221; extension, which should enable smart quotes in your post content. Yay!</p>
<p>Now there&#8217;s one problem remaining: this doesn&#8217;t do anything for post <em>titles.</em> It only affect the main content. You need to edit your templates to make them Markdown-ready. You need to hunt down every instance of <code>{{ page.title }}</code> and <code>{{ post.title }} </code>and apply the <code>markdownify</code> filter. For example:</p>
<pre class="brush: xml; title: ; notranslate">&lt;h2&gt;&lt;a rel=&quot;bookmark&quot; href=&quot;{{ page.external-url }}&quot;&gt;{{ page.title | markdownify }}&lt;/a&gt;&lt;/h2&gt;</pre>
<p>With that change in place, you should get your proper typography in your post titles as well.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2013/06/26/how-to-enable-curly-quotes-in-jekyll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/


Served from: www.webmaster-source.com @ 2026-04-06 12:04:49 by W3 Total Cache
-->