<?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: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/" version="2.0">

<channel>
	<title>almost effortless</title>
	
	<link>http://almosteffortless.com</link>
	<description />
	<lastBuildDate>Fri, 06 Nov 2009 20:27:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/almosteffortless" type="application/rss+xml" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">almosteffortless</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Weekly Digest, 11-6-09</title>
		<link>http://almosteffortless.com/2009/11/06/weekly-digest-11-6-09/</link>
		<comments>http://almosteffortless.com/2009/11/06/weekly-digest-11-6-09/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 20:27:15 +0000</pubDate>
		<dc:creator>Weekly Digest</dc:creator>
				<category><![CDATA[Weekly Digest]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1806</guid>
		<description><![CDATA[How to Gemify your Rails Plugins
Ever since Rails added support for declaring gem dependencies, there is really no (good) reason to use plain ol’ plugins.
Plugging Rack into Rails
Rails 2.3 has Rack baked in. It uses Rack for things like sessions and parameter parsing. But what if you want to add your own middleware to a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://opensoul.org/2009/10/5/how-to-gemify-your-rails-plugins">How to Gemify your Rails Plugins</a></p>
<blockquote><p>Ever since Rails added support for declaring gem dependencies, there is really no (good) reason to use plain ol’ plugins.</p></blockquote>
<p><a href="http://opensoul.org/2009/3/3/plugging-rack-into-rails">Plugging Rack into Rails</a></p>
<blockquote><p>Rails 2.3 has Rack baked in. It uses Rack for things like sessions and parameter parsing. But what if you want to add your own middleware to a Rails app?</p></blockquote>
<p><a href="http://magicscalingsprinkles.wordpress.com/2009/11/02/the-meaning-of-information-technology/">The Meaning of Information Technology</a></p>
<blockquote><p>The first commercial computer was the Lyons Electronic Office I and was used in 1951 to perform vast calculations pertaining to the making and consumption of biscuits. You see, after the war, J. Lyons & Co., a popular chain of British tea shops, was confronted with an appetite for pastries so astronomical (which is understandable given years of tedious disputes with Germany), that the human mind was incapable of solving unaided the problem of distributing tea cakes to their customers.</p></blockquote>
<p><a href="http://librelist.com/">librelist.com</a></p>
<blockquote><p>Librelist.com is a free as in freedom mailing list site for open source projects. It is a place for FOSS communities to discuss all the things they want without ads, censorship, signup requirements, bundled apps, or requirements that you use any particular email client or service.</p></blockquote>
<p><a href="http://github.com/blog/542-introducing-resque">Introducing Resque - GitHub</a></p>
<blockquote><p>Resque is our Redis-backed library for creating background jobs, placing those jobs on multiple queues, and processing them later.</p></blockquote>
<p><a href="http://www.persistentfs.com/">PersistentFS.com</a></p>
<blockquote><p>PersistentFS is a fast and efficient POSIX-compliant file system that provides unlimited online storage in the Amazon Web Services (AWS) storage cloud. A PersistentFS file system can be mounted on any Linux computer connected to the internet and accessed like local storage. All data written to the file system is uploaded to Amazon S3 for reliable and cost effective off-site storage, while remaining instantly accessible. This allows you to take advantage of Amazon S3 using your existing software, without writing a single line of code.</p></blockquote>
<p><a href="http://coderack.org/users/tylerhunt/entries/6-canonical-host">CodeRack: Canonical Host</a></p>
<blockquote><p>There are often times when you'll need to redirect requests for some domains or subdomains to a single canonical host. This middleware lets you specify the canonical host for your application, and will perform a 301 redirect for all non-canonical requests.</p></blockquote>
<p><a href="http://www.slideshare.net/ihower/rails-best-practices">Rails Best Practices</a></p>
<blockquote><p>[Nice overview.]</p></blockquote>
<p><a href="http://diveintomark.org/archives/2009/11/02/why-do-we-have-an-img-element">Why do we have an IMG element?</a></p>
<blockquote><p>But none of this answers the original question: why do we have an <img> element? Why not an <icon> element? Or an <include> element? Why not a hyperlink with an include attribute, or some combination of rel values? Why an <img> element? Quite simply, because Marc Andreessen shipped one, and shipping code wins.</p></blockquote>
<p><a href="http://github.com/gabriel/shrub">gabriel's shrub</a></p>
<blockquote><p>S3 Proxy for Google App Engine [Awesome.]</p></blockquote>
<p><a href="http://s3hub.com/">S3Hub: S3 Client (for Mac OS X)</a></p>
<blockquote><p>View your S3 online storage, upload, download, set permissions, share with friends and more.</p></blockquote>
<p><a href="http://googleblog.blogspot.com/2009/10/this-week-in-search-103009.html">Official Google Blog: This week in search 10/30/09</a></p>
<blockquote><p>On Wednesday, we rolled out our new music search feature, fully integrated into Google's web search. Now, when you search for a band, singer, song name, or album title, Google will recognize it and return a special music result on the top of the page. These new special music results do exactly what you want - they let you listen to the full song.</p></blockquote>
<p><a href="http://incubator.apache.org/projects/trafficserver.html">Traffic Server Podling Status Page - Apache Incubator</a></p>
<blockquote><p>Traffic Server fills the need for a fast, extensible and scalable HTTP 1.1 proxy and cache. We have a production proven piece of software that can deliver HTTP traffic at high rates, and can scale well on modern SMP hardware. We have benchmarked Traffic Server to handle in excess of 35,000 RPS on a single box. Traffic Server has a rich feature set, implementing most of HTTP/1.1 to the RFC specifications.</p></blockquote>
<p><a href="http://entrepreneur.venturebeat.com/2009/10/30/start-up-studies-a-pop-quiz/">Start-up studies: A pop quiz</a></p>
<blockquote><p>There’s a classroom exercise that’s a part of the  Stanford technology venture program hits its students with each year: If you had five dollars and two hours, what would you do to make as much money as possible?</p></blockquote>
<p><a href="http://kottke.org/09/10/one-handed-computing-with-the-iphone">One-handed computing with the iPhone</a></p>
<blockquote><p>The easy single-handed operation of the iPhone1 is not one of its obvious selling points but is one of those little features that grows on you and becomes nearly indispensable. A portable networked computing and gaming device that can be easily operated with one hand can be used in a surprising variety of situations.</p></blockquote>
<p><a href="http://www.wired.com/techbiz/it/magazine/17-10/ff_netflix?currentPage=all">Netflix Everywhere: Sorry Cable, You're History</a></p>
<blockquote><p>There are a million different ways for Netflix to fail. But that has always been the case. Netflix should have failed already, taken down by Blockbuster or Wal-Mart, kneecapped by Hollywood, made irrelevant by BitTorrent or iTunes. Yet time and again, the company has not only survived but quietly thrived—on the strength of its unique algorithms and its relentless focus on getting customers content they didn't even know they wanted.</p></blockquote>
<p><a href="http://37signals.com/svn/posts/1989-speakers-tip-dont-tell-the-audience-you-arent-prepared">Speaker's Tip: Don't tell the audience you aren't prepared</a></p>
<blockquote><p>People take days off of work, spend hundreds on a conference ticket, travel for thousands of miles, and pay hefty rates for flights and hotels to come hear you speak, and you tell them you didn’t have time to prepare a talk? What’s cool about that?</p></blockquote>
<p><a href="http://documentcloud.github.com/underscore/">Underscore.js</a></p>
<blockquote><p>Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.</p></blockquote>
<p><a href="http://journal.markbao.com/2009/10/startup-school-2009-summary/">The Y Combinator Startup School 2009 Summary</a></p>
<blockquote><p>Y Combinator’s Startup School 2009 was an incredible learning experience for new and experienced entrepreneurs alike. There are ten talks. Here are their key points.</p></blockquote>
<p><a href="http://rack.rubyforge.org/doc/classes/Rack/Utils.html">Module: Rack::Utils</a></p>
<blockquote><p>Rack::Utils contains a grab-bag of useful methods for writing web applications adopted from all kinds of Ruby libraries.</p></blockquote>
<p><a href="http://radar.oreilly.com/2009/10/whitehouse-switch-drupal-opensource.html">Thoughts on the Whitehouse.gov switch to Drupal</a></p>
<blockquote><p>Yesterday, the new media team at the White House announced via the Associated Press that whitehouse.gov is now running on Drupal, the open source content management system. That Drupal implementation is in turn running on a Red Hat Linux system with Apache, MySQL and the rest of the LAMP stack. Apache Solr is the new White House search engine. This move is obviously a big win for open source.</p></blockquote>
<p><a href="http://tomayko.com/writings/things-caches-do">Things Caches Do</a></p>
<blockquote><p>There are different kinds of HTTP caches that are useful for different kinds of things. I want to talk about gateway caches — or, “reverse proxy caches” — and consider their effects on modern, dynamic web application design.</p></blockquote>
<p><a href="http://www.websequencediagrams.com/">WebSequenceDiagrams.com - Create sequence diagrams in seconds</a></p>
<blockquote><p>Don't waste your afternoon drawing UML Sequence Diagrams. Just enter the description here, and click "draw". The SD/MSC Generator is an easy alternative to using mouse-centric tools like Microsoft Visio.</p></blockquote>
<p><a href="http://github.com/stefankroes/ancestry">stefankroes's ancestry</a></p>
<blockquote><p>Ancestry allows the records of a Ruby on Rails ActiveRecord model to be organised as a tree structure (or hierarchy). It uses a single, intuitively formatted database column, using a variation on the materialised path pattern. It exposes all the standard tree structure relations (ancestors, parent, root, children, siblings, descendants) and all of them can be fetched in a single sql query.</p></blockquote>
<p><a href="http://www.codinghorror.com/blog/archives/001306.html">Treating User Myopia</a></p>
<blockquote><p>When I said users don't read anything you put on the screen, I was lying. Users do read. But users will only read the absolute minimum amount of text on the screen necessary to complete their task. I can't quite explain it, but this kind of user myopia is epidemic. It's the same problem, everywhere I turn.</p></blockquote>
<p><a href="http://www.allthingsdistributed.com/2009/10/amazon_relational_database_service.html">The Amazon Relational Database Service (RDS)</a></p>
<blockquote><p>Today marks the launch of Amazon RDS - the Amazon Relational Database Service. Amazon RDS is a web service that makes it easy to set up, operate, and scale a relational database in the cloud. Amazon RDS handles all the "muck" of relational database management freeing up its users to focus on their applications and business.</p></blockquote>
<p><a href="http://blog.flickr.net/2009/10/21/people-in-photos/">Flickr! It’s made of people</a></p>
<blockquote><p>We’ve launched People in Photos, a new feature that will help put a face to the Flickrverse and enable you to highlight members that you’ve photographed in a whole new way. People in Photos lets you add a member to a photo, find photos of people you know, and manage which photos you’re in.</p></blockquote>
<p><a href="http://github.com/blog/530-how-we-made-github-fast">How We Made GitHub Fast</a></p>
<blockquote><p>Now that things have settled down from the move to Rackspace, I wanted to take some time to go over the architectural changes that we’ve made in order to bring you a speedier, more scalable GitHub.</p></blockquote>
<p><a href="http://www.rubyenterpriseedition.com/documentation.html#_garbage_collector_performance_tuning">Ruby Enterprise Edition Features Guide</a></p>
<blockquote><p>With REE, one can tune the garbage collector’s behavior for better server performance. It is possible to specify the initial heap size to start with. The heap size will never drop below the initial size. By carefully selecting the initial heap size one can decrease startup time and increase throughput of server applications.</p></blockquote>
<p><a href="http://blog.phusion.nl/2008/12/16/passing-environment-variables-to-ruby-from-phusion-passenger/">Passing environment variables to Ruby from Phusion Passenger</a></p>
<blockquote><p>Some environment variables must be set before Ruby is started because the Ruby interpreter itself uses them. The RailsBench GC settings environment variables, which are now supported by Ruby Enterprise Edition, are examples of such environment variables.</p></blockquote>
<p><a href="http://www.pauldix.net/2009/10/using-the-nginx-memcached-module-with-passenger.html">Using the Nginx Memcached module with Passenger</a></p>
<blockquote><p>Nginx, everyone's favorite speedy web server has a module to hook in directly to memcached. For those of us running Ruby servers behind nginx we can avoid hitting our running Ruby processes completely on a cache hit.</p></blockquote>
<p><a href="http://collison.ie/blog/2009/10/surprises">Surprises</a></p>
<blockquote><p>Now, when coding, I try to think: “how can I write this such that if people saw my code, they’d be amazed at how little there is and how little it does”.</p></blockquote>
<p><a href="http://m.onkey.org/2009/10/18/railssummit-slides">Railssummit Slides</a></p>
<blockquote><p>Here are the slides of [Pratik Naik's] presentation at Railssummit 2009...  about Rails focused tips/tricks.</p></blockquote>
<p><a href="http://vimeo.com/6960507">Mint CEO Aaron Patzer on Startups</a></p>
<blockquote><p>Mint CEO Aaron Patzer talks with entrepreneurs at a JuicePitcher event about the history of his startup, Mint.</p></blockquote>
<p><a href="http://frozenplague.net/2009/10/connecting-to-multiple-databases-using-activerecord/">Connecting to Multiple Databases Using ActiveRecord</a></p>
<blockquote><p>You can call establish_connection with the key that points to another database config in your config/database.yml file</p></blockquote>
<p><a href="http://shortwaveapp.com/">Shortwave</a></p>
<blockquote><p>...is an extensible quick-search and shortcut bookmark. [Awesome.]</p></blockquote>
<p><a href="http://danieltenner.com/posts/0012-google-wave.html">What problems does Google Wave solve?</a></p>
<blockquote><p>It will probably take years before Wave fully penetrates large corporations and replaces the email systems everyone is used to. But it solves so many thorny problems with email that it might well manage to do so, where so many other tentative “email fixes” have failed.</p></blockquote>
<p><a href="http://www.rubyinside.com/21-rack-middlewares-2649.html">21 Rack Middlewares To Turbocharge Your Ruby Webapps</a></p>
<blockquote><p>In this post, we're going to highlight various Rack middlewares from CodeRack, an on-going Rack middleware competition...</p></blockquote>
<p><a href="http://github.com/hiddenloop/paging_keys_js/tree">hiddenloop's paging_keys_js</a></p>
<blockquote><p>Keyboard short cuts for paging through listings one item at at time (and across entire pages). Inspired by the navigation at FFFFOUND!</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/11/06/weekly-digest-11-6-09/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>no-www Rack Middleware</title>
		<link>http://almosteffortless.com/2009/11/05/no-www-rack-middleware/</link>
		<comments>http://almosteffortless.com/2009/11/05/no-www-rack-middleware/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 00:59:58 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1790</guid>
		<description><![CDATA[I'm pleased to present my submission to the CodeRack contest: no-www. 
This middleware catches requests that begin with “www” and redirects them to the more reasonable "non-www" address. 
For example: http://www.example.com -> http://example.com
While such redirects might better be performed from within an Apache or nginx config, some hosts (i.e. Heroku) don't give you access to [...]]]></description>
			<content:encoded><![CDATA[<p>I'm pleased to present my submission to the <a href="http://coderack.org/">CodeRack</a> contest: <b>no-www</b>. </p>
<p>This middleware catches requests that begin with “www” and redirects them to the more reasonable "non-www" address. </p>
<p>For example: http://www.example.com -> http://example.com</p>
<p>While such redirects might better be performed from within an Apache or nginx config, some hosts (i.e. <a href="http://heroku.com">Heroku</a>) don't give you access to configure the server as such. </p>
<p>If you're unfamiliar with the <i>no-www</i> movement, the philosophy is simple. Websites should have a canonical address. This address shouldn’t begin with “www” because the use of "www" is unnecessary and wasteful. See <a href="http://no-www.org/">http://no-www.org/</a> for details. </p>
<p>And, without further ado:</p>
<p><script src="http://gist.github.com/224812.js"></script></p>
<p>If you know what <a href="http://rack.rubyforge.org">Rack</a> is, you problably already know how to use this. Still, an example usage for a Rails app wouldn't hurt. Start by copying the above middleware into <i>lib/no_www.rb</i>. Then, configure your application to use the middleware by placing the following in <i>config/environment.rb</i>: </p>
<pre class="ruby">&nbsp;
<span style="color:#6666ff; font-weight:bold;">Rails::Initializer</span>.<span style="color:#9900CC;">run</span> <span style="color:#9966CC; font-weight:bold;">do</span> |config|
  config.<span style="color:#9900CC;">middleware</span>.<span style="color:#9900CC;">use</span> “NoWWW” <span style="color:#9966CC; font-weight:bold;">if</span> RAILS_ENV == ‘production’
<span style="color:#9966CC; font-weight:bold;">end</span></pre>
<p>No more www. </p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/11/05/no-www-rack-middleware/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Varnish with nginx, Passenger, and Monit on Ubuntu 8.10 intrepid</title>
		<link>http://almosteffortless.com/2009/10/22/installing-varnish-with-nginx-passenger-and-monit-on-ubuntu-8-10-intrepid/</link>
		<comments>http://almosteffortless.com/2009/10/22/installing-varnish-with-nginx-passenger-and-monit-on-ubuntu-8-10-intrepid/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 02:32:23 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Ruby/Rails]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1761</guid>
		<description><![CDATA[Varnish is a state-of-the-art, high-performance HTTP accelerator. I first came to know about it thanks to Heroku, where they use it to provide built-in HTTP Caching. 
As their docs describe, using Varnish is easy:
# This tells the cache (Varnish) to serve the page for 300 seconds (5 minutes).
&#160;
class MyController &#60; ApplicationController
  def index
  [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://varnish.projects.linpro.no/">Varnish</a> is a state-of-the-art, high-performance HTTP accelerator. I first came to know about it thanks to <a href="http://heroku.com/">Heroku</a>, where they use it to provide built-in <a href="http://docs.heroku.com/http-caching">HTTP Caching</a>. </p>
<p>As their docs describe, using Varnish is easy:</p>
<pre class="ruby"><span style="color:#008000; font-style:italic;"># This tells the cache (Varnish) to serve the page for 300 seconds (5 minutes).</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> MyController &lt; ApplicationController
  <span style="color:#9966CC; font-weight:bold;">def</span> index
    response.<span style="color:#9900CC;">headers</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Cache-Control'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'public, max-age=300'</span>
    render <span style="color:#ff3333; font-weight:bold;">:text</span> =&gt; <span style="color:#996600;">&quot;Rendered at #{Time.now}&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre>
<p>Simply setting the "Cache-Control" header like so allows you to serve up a page extremely quickly because requests completely bypass your application logic, database, and all of that related overhead and read straight from the cache. </p>
<p>If you're serving up the same page to all visitors, then setting up Varnish HTTP caching is a no-brainer. If you're serving up pages that are mostly the same for all users but have a custom header or something, you can still take advantage of the caching speed boost if you're willing to investigate the ins and outs of ESI and/or serving partials with Javascript. If you're serving pages that are different for each user, then you're out of luck :)</p>
<p>So, using Varnish for HTTP acceleration is great, but unfortunately for me the version of Ubuntu (8.10 intrepid) that we're using has a painfully out of date package in aptitude. If you're already running Varnish, you can check to make sure you're using a relatively recent release by running <i>varnishd -V</i>. If you see anything less than <i>2.0.4</i>, you should seriously consider upgrading. </p>
<p>Thanks to the <a href="http://projects.linpro.no/pipermail/varnish-dist/2009-October/thread.html">helpful people on the Varnish mailing lists</a>, I was able to get things up and running by doing the following:</p>
<pre>apt-get update
apt-get install subversion autotools-dev automake1.9 libtool autoconf libncurses-dev xsltproc quilt
cd /tmp
svn co http://varnish.projects.linpro.no/svn/tags/varnish-2.0.4
cd varnish-2.0.4/varnish-cache
dpkg-buildpackage
cd ..
dpkg -i libvarnish1_2.0.4-6_i386.deb
dpkg -i varnish_2.0.4-6_i386.deb</pre>
<p>You can then use <i>/etc/init.d/varnish</i> to stop/start/restart the service. </p>
<p>But, we're not done yet. Since it took me a while to get the whole app server stack configured, I thought it might help someone else out if I covered the rest of the steps it took to get Varnish working properly with my Ruby application. </p>
<p>You can get <a href="http://nginx.net/">nginx</a> installed with <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a> and <a href="http://www.modrails.com/">Passenger</a> by following the excellent documentation <a href="http://www.modrails.com/documentation/Users%20guide%20Nginx.html#install_passenger">on the Phusion website</a>. </p>
<p>I might suggest, however, doing the installation <a href="http://gist.github.com/216561">like this</a> in order to get the latest (secure) version of nginx. Even before that, you'll probably want to install Ruby Enterprise Edition, which I like to do <a href="http://gist.github.com/216587">the old fashioned way</a>.</p>
<p>You may also be interested in this <a href="http://gist.github.com/216549">example nginx init.d config</a>, which allows you to use nginx as you would if installed from a package. Make sure to consider doing some kind of log rotation with this kind of setup as well.</p>
<p>...</p>
<p>Now that you're using the fantastic nginx web server, you'll want to configure it to listen to port 8080, so that Varnish can listen to port 80 and forward any requests that aren't in its cache to the backend server (nginx). I'll just post the complete config we're using, and you can pick out the relevant details for your case. </p>
<p>Some interesting things to note is that this setup is configured to use <a href="http://www.sinatrarb.com/">Sinatra</a>, the lightweight Ruby web framework. If the application throws an exception, we're routing to the /error page. We're also using various other settings that you may or may not agree with. The important part with regard to Varnish and nginx cooperating, however, is that you set nginx to listen to port 8080 in your config file. My config is located in <i>/opt/nginx/conf/nginx.conf</i>:</p>
<pre>worker_processes 1;
pid /var/run/nginx.pid;

events {
  worker_connections  1024;
}

http {
  access_log /var/log/nginx_access.log;
  error_log /var/log/nginx_error.log;
  passenger_root /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.2.5;
  passenger_ruby /opt/ruby-enterprise/bin/ruby;
  passenger_max_pool_size 10;
  include mime.types;
  default_type application/octet-stream;
  sendfile on;
  tcp_nopush on;
  keepalive_timeout 65;
  gzip on;
  gzip_comp_level 2;
  gzip_buffers 16 8k;
  gzip_disable "MSIE [1-6]\.";
  gzip_proxied any;
  gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

  server {
    listen 8080; # the important part!
    root /var/www/example/current/public;
    passenger_enabled on;
    passenger_use_global_queue on;
    rack_env production; # use rails_env for a rails app
    # serve static files without running more rewrite tests
    if (-f $request_filename) {
      break;
    }
    # disable site via capistrano (cap deploy:web:disable)
    if (-f $document_root/system/maintenance.html) {
      rewrite ^(.*)$ /system/maintenance.html break;
    }
    # expires headers
    location ~* \.(ico|css|js|gif|jp?g|png)(\?[0-9]+)?$ {
      expires max;
      break;
    }
  }
}</pre>
<p>Now, I'm fairly new to using Varnish, so perhaps someone can advise me about how to better configure things, but I'll cover how I did it. Varnish comes with a few example configs loaded up in <i>/etc/default/varnish</i>. I ended up using the following:</p>
<pre>NFILES=131072
MEMLOCK=82000
INSTANCE=$(uname -n)
DAEMON_OPTS="-a :80 -f /etc/varnish/default.vcl -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"</pre>
<p>You can review the examples provided and see how you want to go about it, though. </p>
<p>Once you're all set with the general config, you'll need to provide a <a href="http://varnish.projects.linpro.no/wiki/VCL">VCL config</a>. I'm putting ours in <i>/etc/varnish/default.vcl</i> and it looks like this:</p>
<pre>backend default {
  .host = "127.0.0.1";
  .port = "8080";
}

# Warning: read the following before using this config:
# http://varnish.projects.linpro.no/wiki/VCLExampleCacheCookies

sub vcl_recv {
  unset req.http.cookie;
}</pre>
<p>The first part tells Varnish to forward any requests that aren't in its cache to a webserver running on localhost port 8080. That's nginx!</p>
<p>The second part unsets any cookies that are sent along with any requests. You won't want to do this unless you're serving the same pages for all users for your entire application. If you aren't careful here, you can very easily end up serving pages meant for one user to another. Be careful!</p>
<p>In my case this works fine because we're serving a site with no user-specific actions or views. It's all public. You're case might be different. Perhaps you can cache things like static files (images, etc) or certain areas of your application. Maybe you have a CMS with an admin interface that can't be cached, but with publically viewable pages that could be cached. I dunno. In any case, you should definitely read more about this <a href="http://varnish.projects.linpro.no/wiki/VCLExampleCacheCookies">on the Varnish wiki</a>.</p>
<p>Finally, since we're using <a href="http://mmonit.com/monit/">Monit</a> to monitor the health of our systems, I'll throw in an example config that covers SSH, nginx, and Varnish. This Monit config would email you using a Google Apps Domain if there was a problem. You probably wouldn't want to use this as-is, but it should serve as a decent starting point for you to create your own. We've got the config in <i>/etc/monit/monitrc</i>:</p>
<pre># Alerts
set daemon 120
set logfile syslog facility log_daemon
set mailserver smtp.gmail.com port 587
    username "noreply@example.com" password "sldkjkfdsj"
    using tlsv1
    with timeout 30 seconds
set alert tech@example.com with reminder on 30 cycles
set httpd port 2812
allow example:slkdjlskdjflskjd

# SSH
check process sshd with pidfile /var/run/sshd.pid
start program "/etc/init.d/ssh start"
stop program "/etc/init.d/ssh stop"
if failed port 22 protocol ssh then restarts
if 5 restarts within 5 cycles then timeout

# nginx
check process nginx with pidfile /var/run/nginx.pid
start program = "/etc/init.d/nginx start"
stop  program = "/etc/init.d/nginx stop"
if failed host 127.0.0.1 port 8080 then restart
if cpu is greater than 40% for 2 cycles then alert
if cpu > 60% for 5 cycles then restart
if 10 restarts within 10 cycles then timeout

# Varnish
check process varnish with pidfile /var/run/varnishd.pid
start program = "/etc/init.d/varnish start"
stop  program = "/etc/init.d/varnish stop"
if failed host 127.0.0.1 port 80 then restart
if cpu is greater than 40% for 2 cycles then alert
if cpu > 60% for 5 cycles then restart
if 10 restarts within 10 cycles then timeout</pre>
<p>That's all folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/10/22/installing-varnish-with-nginx-passenger-and-monit-on-ubuntu-8-10-intrepid/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Weekly Digest, 10-12-09</title>
		<link>http://almosteffortless.com/2009/10/12/weekly-digest-10-12-09/</link>
		<comments>http://almosteffortless.com/2009/10/12/weekly-digest-10-12-09/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 15:17:43 +0000</pubDate>
		<dc:creator>Weekly Digest</dc:creator>
				<category><![CDATA[Weekly Digest]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1756</guid>
		<description><![CDATA[Monthly Digest? ;)
Pomodoro
Pomodoro Desktop is a desktop application for Time Management on your Mac OSX. It is a simple but effective way to manage your (coding) time, and it's based on the Pomodoro technique
Clean CSS
Optmize and Format your CSS
Hacker News &#124; GitHub's Unicorn Setup
[Interesting comments as usual.]
Picnik
Photo editing the easy way, online in your browser. [...]]]></description>
			<content:encoded><![CDATA[<p>Monthly Digest? ;)</p>
<p><a href="http://pomodoro.ugolandini.com/">Pomodoro</a></p>
<blockquote><p>Pomodoro Desktop is a desktop application for Time Management on your Mac OSX. It is a simple but effective way to manage your (coding) time, and it's based on the Pomodoro technique</p></blockquote>
<p><a href="http://www.cleancss.com/">Clean CSS</a></p>
<blockquote><p>Optmize and Format your CSS</p></blockquote>
<p><a href="http://news.ycombinator.com/item?id=872283">Hacker News | GitHub's Unicorn Setup</a></p>
<blockquote><p>[Interesting comments as usual.]</p></blockquote>
<p><a href="http://www.picnik.com/">Picnik</a></p>
<blockquote><p>Photo editing the easy way, online in your browser. Picnik makes your photos fabulous with easy to use yet powerful editing tools. Tweak to your heart’s content, then get creative with oodles of effects, fonts, shapes, and frames.</p></blockquote>
<p><a href="http://github.com/blog/517-unicorn">Unicorn! - GitHub</a></p>
<blockquote><p>We’ve been running Unicorn for more than a month. Time to talk about it.</p></blockquote>
<p><a href="http://munin.projects.linpro.no/">Munin</a></p>
<blockquote><p>Munin the monitoring tool surveys all your computers and remembers what it saw. It presents all the information in graphs through a web interface. Its emphasis is on plug and play capabilities. After completing a installation a high number of monitoring plugins will be playing with no more effort.</p></blockquote>
<p><a href="http://litanyagainstfear.com/blog/2009/10/09/on-gem-forking/">On Gem Forking</a></p>
<blockquote><p>So, GitHub has recommended Gemcutter as an alternative to hosting gems on GitHub...</p></blockquote>
<p><a href="http://cloudvox.com/">Cloudvox</a></p>
<blockquote><p>API-driven phone calls, in minutes (call your code: AGI/AMI, HTTP, Asterisk-Java, Adhearsion). Cloudvox is the most practical, stable, open environment for API-driven phone calls.</p></blockquote>
<p><a href="http://github.com/blog/515-gem-building-is-defunct">Gem Building is Defunct</a></p>
<blockquote><p>We will continue to serve old gems at http://gems.github.com/ for at least one year. [New gems can't be built, though.]</p></blockquote>
<p><a href="http://jacobian.org/writing/star-is-unix/">* is Unix</a></p>
<blockquote><p>Ryan’s I like Unicorn because it’s Unix appears to have started a mini-meme of folks writing simple forking network servers in their language of choice. I’m really enjoying reading ‘em — they’re a sort of Rosetta Stone of network code...</p></blockquote>
<p><a href="http://chargify.com/index.html">Chargify</a></p>
<blockquote><p>Chargify simplifies recurring billing for Web 2.0 and SaaS companies.</p></blockquote>
<p><a href="http://www.slideshare.net/atmosorg/everything-i-know-about-open-source-i-learned-from-indie-hip-hop">Everything I know about Open Source I learned from Indie Hip Hop</a></p>
<blockquote><p>Slides from an Aloha on Rails presentation.</p></blockquote>
<p><a href="http://www.apple.com/downloads/dashboard/status/flipclock_thedashboardwidgetandgadgetdevelopment.html">FlipClock</a></p>
<blockquote><p>Get the FlipClock Widget for your Dashboard!</p></blockquote>
<p><a href="http://tomster.org/blog/nginx-and-varnish-on-mac-os-x">nginx and varnish on Mac OS X</a></p>
<blockquote><p>Since I'm a happy user of the macports collection already anyway, I let it do the 'heavy lifting' of actually installing nginx and varnish. In addition I provided a launchd startup item for varnish and also added a host entry for wahlcomputer to enable virtual hosting for nginx and varnish.</p></blockquote>
<p><a href="http://github.com/atmos/rack_hoptoad">atmos's rack_hoptoad</a></p>
<blockquote><p>A gem that provides exception notifications to hoptoad as rack middleware.</p></blockquote>
<p><a href="http://articles.slicehost.com/2009/3/4/ubuntu-intrepid-adding-an-nginx-init-script">Ubuntu Intrepid - adding an Nginx init script</a></p>
<blockquote><p>...let's go ahead and create one for easy control of Nginx, and to ensure it restarts on a reboot.</p></blockquote>
<p><a href="http://blog.madeofcode.com/post/194902314/generate-gem-yml-and-gems-for-rails">Generate gem.yml and .gems for Rails</a></p>
<blockquote><p>A rake task which will generate gem configuration files based on your “config.gem” specifications in Rails. This comes in handy when deploying to Engine Yard, or Heroku.</p></blockquote>
<p><a href="http://www.engineyard.com/blog/2009/custom-chef-recipes-with-engine-yard-cloud/">Custom Chef Recipes with Engine Yard Cloud</a></p>
<blockquote><p>One of the power user features of Engine Yard Cloud is the ability to use custom Chef recipes to install or configure anything that can run on Gentoo Linux that we have not already automated as part of the platform. This allows for extensive customizations of your environments and empowers you to run virtually all custom software you might need.</p></blockquote>
<p><a href="http://shjs.sourceforge.net/">SHJS</a></p>
<blockquote><p>SHJS is a JavaScript program which highlights source code passages in HTML documents. Documents using SHJS are highlighted on the client side by the web browser.</p></blockquote>
<p><a href="http://zdzolton.wordpress.com/2009/09/04/getting-ready-for-couchdb-0-10/">Getting ready for CouchDB 0.10</a></p>
<blockquote><p>I’ve setup a local copy of CouchDB, from the 0.10 branch, just to see if my application code could handle its awesome powers. Here are my two big takeaways...</p></blockquote>
<p><a href="http://blog.madeofcode.com/post/201282903/paperclip-s3-delayed-job-in-rails">Paperclip, S3 & Delayed Job in Rails</a></p>
<blockquote><p>Here’s how I use Paperclip (with storage on S3) and delayed_job to process images after they’re uploaded in the background.</p></blockquote>
<p><a href="http://37signals.com/svn/posts/1952-i-gave-a-talk-on-ui-fundamentals-for-programmers">Ryan Singer of 37signals - UI Fundamentals for Programmers</a></p>
<blockquote><p>I gave a talk on “UI Fundamentals for Programmers” at WindyCityRails in Chicago last month. The talks covered modeling, breaking apps into screens, visual techniques, flows, and a few coding tips. [This is a great talk. Highly recommended viewing.]</p></blockquote>
<p><a href="http://www.hilite.me/">Source code beautifier / syntax highlighter – convert code snippets to HTML</a></p>
<blockquote><p>hilite.me converts your code snippets into pretty-printed HTML format, easily embeddable into blog posts and websites.</p></blockquote>
<p><a href="http://themomorohoax.com/2009/09/21/keeping-controllers-empty-with-faux-attributes">Keeping controllers empty with faux attributes - Momoro Machine</a></p>
<blockquote><p>The barely any code way... use a fake attribute. Define an attribute setter on User, and then just make a small form in the view to set it.</p></blockquote>
<p><a href="http://garry.posterous.com/build-it-9">Build it</a></p>
<blockquote><p>The good innovation -- the innovation that makes the world a better place and builds real wealth in society -- that stuff is done by radically self-reliant creators who get their hands dirty. Not talkers. Not dreamers. Builders.</p></blockquote>
<p><a href="http://actionrails.com/services.html">ActionRails</a></p>
<blockquote><p>At ActionRails, we offer a variety of services designed to push your Rails developers to the next level... Application Evaluation; Weekly Code Reviews; Developer Hotline.</p></blockquote>
<p><a href="http://sivers.org/1pct">And if only 1% of those people...</a></p>
<blockquote><p>...he forgot there was a number lower than one percent...</p></blockquote>
<p><a href="http://www.caterina.net/archive/001196.html">Working hard is overrated</a></p>
<blockquote><p>Much more important than working hard is knowing how to find the right thing to work on.</p></blockquote>
<p><a href="http://wiki.apache.org/couchdb/Nginx_As_a_Reverse_Proxy">Nginx_As_a_Reverse_Proxy - Couchdb Wiki</a></p>
<blockquote><p>Nginx can serve as a reverse proxy to CouchDB for scenarios such as URL rewriting, load-balancing, access restriction, etc.</p></blockquote>
<p><a href="http://s3sync.net/wiki">S3Sync</a></p>
<blockquote><p>This is a ruby program that easily transfers directories between a local<br />
directory and an S3 bucket:prefix. It behaves somewhat, but not precisely, like the rsync program. [I can verify that this is an awesome little tool.]</p></blockquote>
<p><a href="http://japhr.blogspot.com/2009/09/full-stack-etag-support.html">Full Stack ETag Support</a></p>
<blockquote><p>The conclusion that I draw is that I definitely want to use Rack::Cache—100% improvement over reassembling the HTML on each request is too good to pass up. As for the 20% speed boost that full stack ETag buys me, I am not sure that the complexity that is introduced warrants the speed boost.</p></blockquote>
<p><a href="http://yuiblog.com/blog/2007/01/04/performance-research-part-2/">Browser Cache Usage Exposed</a></p>
<blockquote><p>...reducing the number of HTTP requests has the biggest impact on reducing response time...</p></blockquote>
<p><a href="http://googleblog.blogspot.com/2009/09/place-pages-for-google-maps-there-are.html">Place Pages for Google Maps</a></p>
<blockquote><p>A Place Page is a webpage for every place in the world, organizing all the relevant information about it. By every place, we really mean *every* place — there are Place Pages for businesses, points of interest, transit stations, neighborhoods, landmarks and cities all over the world.</p></blockquote>
<p><a href="http://github.com/couchapp/couchapp">couchapp</a></p>
<blockquote><p>CouchApp is designed to structure standalone CouchDB application development for maximum application portability. CouchApp is a set of scripts and a jQuery plugin designed to bring clarity and order to the freedom of CouchDB's document-based approach.</p></blockquote>
<p><a href="http://groups.google.com/group/phusion-passenger/browse_thread/thread/c004030ab1471e01">nginx, worker_processes, and passenger_max_pool_size</a></p>
<blockquote><p>The Phusion Passenger pool size is independent from the number of<br />
Nginx worker processes that you have. Setting the number of Nginx workers to the number of CPU cores should be sufficient.</p></blockquote>
<p><a href="http://www.sinatrarb.com/extensions.html">Sinatra: Writing Extensions</a></p>
<blockquote><p>Sinatra includes an API for extension authors to help ensure that consistent behavior is provided for application developers.</p></blockquote>
<p><a href="http://daringfireball.net/2009/09/how_should_mac_apps_be_distributed">How Should Mac Apps Be Distributed?</a></p>
<blockquote><p>...but to make this work for apps delivered by disk image, users have to understand that they must copy the app from the image to their startup drive. This is where some get lost.</p></blockquote>
<p><a href="http://www.quirkey.com/blog/2009/09/15/sammy-js-couchdb-and-the-new-web-architecture/">Sammy.js, CouchDB, and the new web architecture</a></p>
<blockquote><p>Welcome to the new world. HTTP Databases and JSON Storage. The simple act of making the database and the browser more powerful on either end has destroyed the need for the middle tier.</p></blockquote>
<p><a href="http://github.com/blog/493-github-is-moving-to-rackspace">GitHub is Moving to Rackspace!</a></p>
<blockquote><p>In just a few short weeks we will be moving GitHub to a new home at Rackspace. We’re aware of the current stability and performance issues, and we want to let you know what we’re doing about it.</p></blockquote>
<p><a href="http://hurl.it/">hurl</a></p>
<blockquote><p>Hurl makes HTTP requests. Enter a URL, set some headers, then view the response. Perfect for APIs.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/10/12/weekly-digest-10-12-09/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Pygments</title>
		<link>http://almosteffortless.com/2009/09/16/pygments/</link>
		<comments>http://almosteffortless.com/2009/09/16/pygments/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 05:38:38 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1719</guid>
		<description><![CDATA[I'm pleased to announce the immediate availability of http://pygments.appspot.com. It's an unofficial API for the Pygments syntax highlighting library. It's designed to provide syntax highlighting for web applications that don't have Python installed. You can think of it as an HTTP interface for Pygments. 
To use it, simply POST to http://pygments.appspot.com with "lang" and "code" [...]]]></description>
			<content:encoded><![CDATA[<p>I'm pleased to announce the immediate availability of <a href="http://pygments.appspot.com">http://pygments.appspot.com</a>. It's an unofficial API for the <a href="http://pygments.org/">Pygments</a> syntax highlighting library. It's designed to provide syntax highlighting for web applications that don't have Python installed. You can think of it as an HTTP interface for Pygments. </p>
<p>To use it, simply POST to http://pygments.appspot.com with "lang" and "code" parameters in the body. You'll receive pygmentized HTML back, which you can store for later display on your site.</p>
<p><script src="http://gist.github.com/188359.js"></script></p>
<p>I'm using it so that I can host <a href="http://flowcoder.com">Flowcoder</a> on <a href="http://heroku.com">Heroku</a>. I was really impressed with the ease of getting this Pygments app running on <a href="http://appengine.google.com/">Google App Engine</a>. GAE is very much like a Python version of Heroku, which means it's awesome.</p>
<p> I'm hoping that this little project will spike my interest in learning a bit more about Python, which actually doesn't seem as evil as all my Ruby friends have made it out to be :P</p>
<p>The <a href="http://github.com/trevorturk/pygments">source code is on github</a>, in case you're curious about how this all works. </p>
<p>Enjoy!</p>
<p><a href="http://pygments.appspot.com">http://pygments.appspot.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/09/16/pygments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Passenger with nginx on Mac OS X</title>
		<link>http://almosteffortless.com/2009/09/16/passenger-with-nginx-on-mac-os-x/</link>
		<comments>http://almosteffortless.com/2009/09/16/passenger-with-nginx-on-mac-os-x/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 20:19:42 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Ruby/Rails]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1690</guid>
		<description><![CDATA[Setting up nginx with Passenger support turns out to be fairly easy. 
Start by making sure you have the most recent version of Passenger, then install the nginx module. This will actually install and compile nginx with the Passenger module enabled, which is handy. Choose the recommended/default options when the installer prompts you.
sudo gem update [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up <a href="http://www.nginx.net/">nginx</a> with <a href="http://www.modrails.com/">Passenger</a> support turns out to be fairly easy. </p>
<p>Start by making sure you have the most recent version of Passenger, then install the nginx module. This will actually install and compile nginx with the Passenger module enabled, which is handy. Choose the recommended/default options when the installer prompts you.</p>
<pre>sudo gem update passenger
sudo passenger-install-nginx-module</pre>
<p>Then, open up the nginx config file:</p>
<pre>mate /opt/nginx/conf/nginx.conf</pre>
<p>Add the following line to the top of the file:</p>
<pre>daemon off;</pre>
<p>This will prevent the "502 Bad Gateway" error you may see otherwise. I'm not sure why this is necessary, but I read about it <a href="http://www.ruby-forum.com/topic/161424">here</a>, and it seems to do the trick. nginx specifies that this should only be used for development, though. </p>
<p>Next, find the <i>http {</i> block, which should start around line 15 or so. You'll want to add a <i>server {</i> block within the <i>http {</i> block for each of your Rails/Rack applications, like so:</p>
<pre>server {
   listen 80;
   server_name eldorado.local;
   root /Users/trevorturk/Code/eldorado/public;
   passenger_enabled on;
   rails_env development;
}</pre>
<p>You'll need an entry in your <i>hosts</i> file if you don't already have one. Simply open up the file:</p>
<pre>mate /etc/hosts</pre>
<p>...and add lines for each of the apps you plan to run, like so:</p>
<pre>127.0.0.1 eldorado.local </pre>
<p>Now, we can set up a launchd item, so that nginx will start up automatically after a system reboot. Create a new plist file by opening it up in TextMate:</p>
<pre>mate /System/Library/LaunchDaemons/nginx.plist</pre>
<p>...and paste the following code in, which was kindly provided for us by this <a href="http://innenin.blogspot.com/2009/05/running-nginx-on-osx.html">helpful person</a>:</p>
<p><script src="http://gist.github.com/188167.js"></script></p>
<p>Then, run the following command to load it:</p>
<pre>launchctl load -F /System/Library/LaunchDaemons/nginx.plist</pre>
<p>Now, you can reboot your system and make sure it's all working as expected by visiting <a href="http://eldorado.local">http://eldorado.local</a>, or whatever address you've configured your application to be on. </p>
<p>I believe this nginx installation will override the existing Apache installation you may have running. This doesn't bother me, so I opened up my System Preferences -> Sharing prefpane and unchecked the Web Sharing box, so Apache is no longer running. If you have any ideas about how to keep both services running cooperatively, please do let me know. </p>
<p><b>Update</b>: Here are some additionally configuration options I'm using, which I cobbled together from various sources after Googling for things like "nginx, rails, gzip, expires" and such. Their powers combined, and I seem to have a <a href="http://developer.yahoo.com/yslow/">YSlow</a>-approved setup.</p>
<p>Just above your <i>server {</i> block, around line 40, add the following:</p>
<pre>gzip on;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.";
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;</pre>
<p>That should cover gzip well enough. </p>
<p>Then, amend the aforementioned <i>server {</i> block to include some far future expires goodness that takes advantage of the Rails asset_tag helpers:</p>
<pre>server {
  listen 80;
  server_name eldorado.local;
  root /Users/trevorturk/Code/eldorado/public;
  passenger_enabled on;
  rails_env development;
  location ~* \.(ico|css|js|gif|jp?g|png)(\?[0-9]+)?$ {
      expires max;
      break;
  }
}</pre>
<p>These two configuartion tweeks are, I believe, the rough equivalent of the <a href="http://almosteffortless.com/2009/06/11/speed-up-your-apachepassenger-rails-app-in-2min/">technique previously discussed</a> on this blog for Apache. </p>
<p>Of course, any additional suggestions, comments, or insights you may have would be most welcome. I'm new to this whole nginx thing, but I'm enjoying it so far. </p>
<p><b>Update</b>: Here's an easy way to reload nginx, if you need to make a change to your conf. Make sure to have the following in your <i>/opt/nginx/conf/nginx.conf</i> file:</p>
<pre>pid /var/run/nginx.pid;</pre>
<p>Then, you can make an alias for the reload task in your <i>~/.bash_profile</i>:</p>
<pre>alias nr='sudo kill -HUP `cat /var/run/nginx.pid`'</pre>
<p>In case you're interested, you can check out my full <i>nginx.conf</i> file for local development here: </p>
<p><a href="http://gist.github.com/191331">http://gist.github.com/191331</a></p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/09/16/passenger-with-nginx-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Static: a super simple Rails CMS for Heroku</title>
		<link>http://almosteffortless.com/2009/09/11/static-a-super-simple-rails-cms-for-heroku/</link>
		<comments>http://almosteffortless.com/2009/09/11/static-a-super-simple-rails-cms-for-heroku/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 22:20:18 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Ruby/Rails]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1665</guid>
		<description><![CDATA[Static is a super simple Rails CMS built for Heroku. It supports file uploads to S3, makes image thumbnails, lets you make pages, has an optional admin password, and a customizable application layout that supports erb. It's really easy to install and deploy to Heroku. If you have an S3 account, you can get up [...]]]></description>
			<content:encoded><![CDATA[<p>Static is a super simple Rails CMS built for Heroku. It supports file uploads to S3, makes image thumbnails, lets you make pages, has an optional admin password, and a customizable application layout that supports erb. It's really easy to install and deploy to Heroku. If you have an S3 account, you can get up and running in under 5 minutes. </p>
<p>I made this little app a few weekends back because it scratched a personal itch of mine. I maintain a few small "static" or "brochure" <a href="http://seemaxwork.com/">sites</a> <a href="http://psalmuno.com/">for</a> <a href="http://amandagad.com/">friends</a>, which means I get to do boring HTML updates whenever they have a new picture or video they want to add. I figured that I could do a little upfront work and let them to do the rest. So, I looked around for a simple Rails CMS, but I couldn't find anything simple enough. Thusly, Static was born. </p>
<p>It doesn't do much for you, but that's the point. You get a really simple little Rails app that lets you add pages, upload stuff, and wrap everything in a layout that can be updated online. If you ever need to add any cool new functionality (like displaying recent Twitter updates?) you can do it using Ruby/Rails. No more lame old hacked-together PHP sites ;) Static's well-tested, 175 line code base could be the solid foundation for a site that grows over time. </p>
<p>This thing does exactly and only what I need it to do, but I'm happy to accept patches and such. Give it a shot, fork away, and let me know if you have something good for me to pull. </p>
<p><a href="http://github.com/trevorturk/static/">http://github.com/trevorturk/static/</a></p>
<p><a href="http://github.com/trevorturk/static/"><img style="margin-left:-30px;" src="http://s3.amazonaws.com/almosteffortless/static.png" /></a></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/09/11/static-a-super-simple-rails-cms-for-heroku/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Weekly Digest, 9-11-09</title>
		<link>http://almosteffortless.com/2009/09/11/weekly-digest-9-11-09/</link>
		<comments>http://almosteffortless.com/2009/09/11/weekly-digest-9-11-09/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 21:55:51 +0000</pubDate>
		<dc:creator>Weekly Digest</dc:creator>
				<category><![CDATA[Weekly Digest]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1662</guid>
		<description><![CDATA[Still not weekly ;)
Github and Engineyard part ways
[This Hacker News thread has some more detail from EY and GH. EY couldn't afford to continue with the preexisting arrangement, so GH is moving to Rackspace.]
Tornado Web Server
Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed. The FriendFeed application [...]]]></description>
			<content:encoded><![CDATA[<p>Still not weekly ;)</p>
<p><a href="http://news.ycombinator.com/item?id=817864">Github and Engineyard part ways</a></p>
<blockquote><p>[This Hacker News thread has some more detail from EY and GH. EY couldn't afford to continue with the preexisting arrangement, so GH is moving to Rackspace.]</p></blockquote>
<p><a href="http://www.tornadoweb.org/">Tornado Web Server</a></p>
<blockquote><p>Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed. The FriendFeed application is written using a web framework that looks a bit like web.py or Google's webapp, but with additional tools and optimizations to take advantage of the underlying non-blocking infrastructure.</p></blockquote>
<p><a href="http://www.techcrunch.com/2009/09/09/twitter-and-the-revenue-dilemma/">Twitter And The Revenue Dilemma</a></p>
<blockquote><p>The company has to decide whether or not to turn revenue on. It sounds ridiculous, but it is a real decision. Once revenue is on, how the company is valued by the market can change dramatically.</p></blockquote>
<p><a href="http://groups.google.com/group/emm-ruby/browse_thread/thread/7d98a9bdf06c77c0">Using Ruby Enterprise for Rails script/console</a></p>
<blockquote><p>If you want to just use REE for script/console, without setting it for<br />
everything, you can...</p></blockquote>
<p><a href="http://blog.monochrome.co.uk/2009/02/if-architects-had-to-work-like-software-developers/">If architects had to work like software developers</a></p>
<blockquote><p>Please don’t bother me with small details right now. Your job is to develop the overall plans for the house: get the big picture. At this time, for example, it is not appropriate to be choosing the color of the carpet. However, keep in mind that my wife likes blue.</p></blockquote>
<p><a href="http://www.tbray.org/ongoing/When/200x/2009/09/02/Ravelry">Ravelry</a></p>
<blockquote><p>What we’ve done only takes 1 not-even-fulltime (I have lots of other duties) programmer/sysadmin and it’s very cool that the software available today makes this possible. It’s important — we can’t be spending money on “professional services” and we only have 3.5 employees.</p></blockquote>
<p><a href="http://epeus.blogspot.com/2009/03/how-twitter-works-in-theory.html">How Twitter works in theory</a></p>
<blockquote><p>It is said that an economist is someone who sees something that works in practice and wonders whether it works in theory. Twitter clearly works in practice... and I wanted to write about some theories that help me understand it.</p></blockquote>
<p><a href="http://www.emeraldion.it/software/widgets/minibatterystatus.html">MiniBatteryStatus Widget</a></p>
<blockquote><p>MiniBatteryStatus is a small Dashboard widget that monitors battery status, charge percentage and remaining battery life. Integrated with Growl to alert you when it's time to recharge your battery.</p></blockquote>
<p><a href="http://thewebfellas.com/blog/2009/8/29/protecting-your-paperclip-downloads/comments/8430#comment-8430">Protecting your Paperclip downloads</a></p>
<blockquote><p>[Excellent write-up that covers protected downloads using Apache, nginx, the local filsystem, and/or Amazon S3. Awesome.]</p></blockquote>
<p><a href="http://belitsky.info/freelance/yehuda-katz/">Yehuda Katz Interview</a></p>
<blockquote><p>A pretty good idea would be to contribute heavily to open source, and then look for work at companies that look at open source work as equivalent to a resume. If you build up enough really good open source work, you'll soon find people clamoring to hire you. [Even with my limited experience, I've found this to be true. Working in Open Source is a really efficient way to improve your skills, and helps immensely when looking for work.]</p></blockquote>
<p><a href="http://arstechnica.com/apple/reviews/2009/08/mac-os-x-10-6.ars">Mac OS X 10.6 Snow Leopard: the Ars Technica review - Ars Technica</a></p>
<blockquote><p>Mac OS X 10.6, aka Snow Leopard has landed. This time around, Apple goes light on the glitz in favor of some heavy work under the hood. John Siracusa dives deep into Apple's new OS offering to see what's new, what's still the same, and whether it's worth upgrading.</p></blockquote>
<p><a href="http://lab.andre-michelle.com/tonematrix">aM laboratory</a></p>
<blockquote><p>Simple sinewave synthesizer triggered by an ordinary 16step sequencer. Each triggered step causes a force on the underlaying wave-map, which makes it more cute.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/09/11/weekly-digest-9-11-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Poor Man’s Heroku Backups</title>
		<link>http://almosteffortless.com/2009/09/11/poor-mans-heroku-backups/</link>
		<comments>http://almosteffortless.com/2009/09/11/poor-mans-heroku-backups/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 19:35:34 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ruby/Rails]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1645</guid>
		<description><![CDATA[Here's a quick and dirty way to back up all of your Heroku-powered databases using their Taps gem with one easy command. It works well enough for my simple needs, but any improvements you've got would be most welcome!
Just add the following to your ~/.bash_profile, and you're good to go:

]]></description>
			<content:encoded><![CDATA[<p>Here's a quick and dirty way to <a href="http://docs.heroku.com/backups">back up</a> all of your <a href="http://heroku.com">Heroku</a>-powered databases using their <a href="http://adam.blog.heroku.com/past/2009/2/11/taps_for_easy_database_transfers/">Taps</a> gem with one easy command. It works well enough for my simple needs, but any improvements you've got would be most welcome!</p>
<p>Just add the following to your ~/.bash_profile, and you're good to go:</p>
<p><script src="http://flowcoder.com/59.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/09/11/poor-mans-heroku-backups/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Weekly Digest, 8-29-09</title>
		<link>http://almosteffortless.com/2009/08/29/weekly-digest-8-29-09/</link>
		<comments>http://almosteffortless.com/2009/08/29/weekly-digest-8-29-09/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 01:19:50 +0000</pubDate>
		<dc:creator>Weekly Digest</dc:creator>
				<category><![CDATA[Weekly Digest]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1641</guid>
		<description><![CDATA[3 bugs that will screw you
Definitly turn up your paranoia when dealing with e-mail, security or payements. If someone’s picture doesn’t upload occasionally due to an ill-conceived model, that not a huge problem. If 30k people get sent a bad e-mail, hacked, or overcharged due to three lines of code, that’s a serious bummer.
5 Tips [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://themomorohoax.com/2009/08/26/3-bugs-that-will-screw-you">3 bugs that will screw you</a></p>
<blockquote><p>Definitly turn up your paranoia when dealing with e-mail, security or payements. If someone’s picture doesn’t upload occasionally due to an ill-conceived model, that not a huge problem. If 30k people get sent a bad e-mail, hacked, or overcharged due to three lines of code, that’s a serious bummer.</p></blockquote>
<p><a href="http://www.engineyard.com/blog/2009/5-tips-for-sphinx-indexing/">5 Tips for Sphinx Indexing</a></p>
<blockquote><p>Sphinx is our favorite tool for the job. Written in C++ by Andrew Aksyonoff, and originally released to open source in 2001, Sphinx is a blazing fast search engine. Considering that fast and complex full-text searching is a somewhat frequent need, I’ve put together this post with my top five tips for implementing Sphinx.</p></blockquote>
<p><a href="http://toffeenut.deviantart.com/art/Metal-Lights-Wallpaper-86093066">Metal Lights Wallpaper by ~ToffeeNut on deviantART</a></p>
<blockquote><p>Minimal desktop with two styles: Spotlights and Streaks.</p></blockquote>
<p><a href="http://www.macosxhints.com/article.php?story=20090608212411305">Remove the Add Bookmark button from Safari 4</a></p>
<blockquote><p>By default, the Add Bookmark button (+) is attached to the URL address in Safari 4. There isn't an option to turn it off, but there's a workaround...</p></blockquote>
<p><a href="http://garrickvanburen.com/archive/productivity-tip-empty-your-dock">Productivity Tip: Empty Your Dock</a></p>
<blockquote><p>Inspired partially by my preparation for the Tiger upgrade and partially by my proficiency with QuickSilver, I’ve emptied everything out of the doc. Only the Finder and Trash are persistent. Everything else, in when in use, out when not.</p></blockquote>
<p><a href="http://minimalmac.com/post/159796749/the-menubar-challenge">The Menubar Challenge</a></p>
<blockquote><p>...taking everything you own, save for the bare essentials, and moving it into storage. For a set period of time, retrieve items from the store when needed. Anything not accessed after said set period of time you likely do not really need and should be disposed of.</p></blockquote>
<p><a href="http://zygat3r.deviantart.com/art/Dark-Wood-58266349">Dark Wood</a></p>
<blockquote><p>The wood-like wallpaper pack. Hope u'll like it.</p></blockquote>
<p><a href="http://www.techcrunch.com/2009/08/23/the-funded-publishes-ideal-first-round-term-sheet/">The Funded Publishes Ideal First Round Term Sheet</a></p>
<blockquote><p>Start with the Y Combinator docs for your first early angel round, and move to Adeo’s document in your first real round of venture capital.</p></blockquote>
<p><a href="http://gist.github.com/173604">Poor Man's Deploy</a></p>
<blockquote><p>Start a Sinatra server on port 4000; GET / to that server triggers a git pull and mod_rails restart; Hit port 4000 locally after pushing</p></blockquote>
<p><a href="http://blog.antarestrader.com/posts/116">Antares Trader Blog</a></p>
<blockquote><p>Previous on this blog alluded to my misgivings about the big merge between Rails and Merb. I liked the trimmed-down, uncomplicated API of Merb. I knew what it was going to do and how to make non-standard things happen. Well it looks like Rails 3 is getting some of that mojo.</p></blockquote>
<p><a href="http://r09.railsrumble.com/">Rails Rumble :: Welcome to the '09 Rumble</a></p>
<blockquote><p>The Rails Rumble is a 48 hour web application development competition. As a contestant, your team gets one weekend to design, develop, and deploy the best web property that you can, using the awesome power of Ruby and Rails.</p></blockquote>
<p><a href="http://www.irradiatedsoftware.com/sizeup/">SizeUp</a></p>
<blockquote><p>SizeUp allows you to quickly position a window to fill exactly half the screen (splitscreen), a quarter of the screen (quadrant), full screen, or centered via the menu bar or configurable system-wide shortcuts (hotkeys). Similar to "tiled windows" functionality available on other operating systems.</p></blockquote>
<p><a href="http://blog.everyblock.com/2009/aug/17/acquisition/">MSNBC.com acquires EveryBlock</a></p>
<blockquote><p>After considering a number of options (some wildly different from others), we decided that working with MSNBC.com was the best fit for our site and our team.</p></blockquote>
<p><a href="http://www.changedetection.com/">ChangeDetection</a></p>
<blockquote><p>ChangeDetection.com provides page change monitoring and notification services to internet users worldwide. Anyone can use our service to monitor any website page for changes.</p></blockquote>
<p><a href="http://adam.blog.heroku.com/past/2009/7/15/video_game_lessons_for_business_strategy/">Video Game Lessons for Business Strategy</a></p>
<blockquote><p>I see video games as a petri dish, a place where the challenges and rewards of the real world are simulated in a simpler, more discrete fashion. Often the challenges faced remind me of the same challenges I face in my work as an entrepreneur. In the spirit of Scott Berkun’s Management lessons from Gears of War 2, I present you three business lessons I’ve learned from video games.</p></blockquote>
<p><a href="http://www.brandonwalkin.com/blog/2009/08/10/managing-ui-complexity/">Managing UI Complexity</a></p>
<blockquote><p>I’ve spent the past year redesigning a particularly complex application with my primary focus being on reducing complexity. In this article, I’ll go over some of the issues surrounding complexity and techniques that can be used to manage it.</p></blockquote>
<p><a href="http://github.com/aanand/deadweight/tree/master">aanand's deadweight</a></p>
<blockquote><p>Deadweight is RCov for CSS, kind of. Given a set of stylesheets and a set of URLs, it determines which selectors are actually used and reports which can be "safely" deleted.</p></blockquote>
<p><a href="http://github.com/blog/471-continuous-integration-spring-cleaning">Continuous Integration Spring Cleaning at GitHub</a></p>
<blockquote><p>We’re currently in the process of revamping our test suite (which we’ll blog about in the future) and moving servers, so I thought it’d be a good time to re-evaluate our options.</p></blockquote>
<p><a href="http://ihardlyknowher.com/faq.html">I Hardly Know Her</a></p>
<blockquote><p>IHKH is a minimalist Flickr viewer. Captions and titles are omitted and metadata is hidden until needed. Images can be made large in place.</p></blockquote>
<p><a href="http://github.com/laserlemon/vestal_versions/tree/master">laserlemon's vestal_versions</a></p>
<blockquote><p>vestal_versions keeps in the spirit of consolidating to one versions table, polymorphically associated with its parent models. But it goes one step further by storing a serialized hash of only the models’ changes.</p></blockquote>
<p><a href="http://www.ted.com/talks/lang/eng/alain_de_botton_a_kinder_gentler_philosophy_of_success.html">A kinder, gentler philosophy of success</a></p>
<blockquote><p>Alain de Botton examines our ideas of success and failure -- and questions the assumptions underlying these two judgments. Is success always earned? Is failure? He makes an eloquent, witty case to move beyond snobbery to find true pleasure in our work.</p></blockquote>
<p><a href="http://redbot.org/">RED: <></a></p>
<blockquote><p>RED is a robot that checks HTTP resources to see how they'll behave, pointing out common problems and suggesting improvements. Although it is not a HTTP conformance tester, it can find a number of HTTP-related issues.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/08/29/weekly-digest-8-29-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weekly Digest, 8-10-09</title>
		<link>http://almosteffortless.com/2009/08/10/weekly-digest-8-10-09/</link>
		<comments>http://almosteffortless.com/2009/08/10/weekly-digest-8-10-09/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 15:41:12 +0000</pubDate>
		<dc:creator>Weekly Digest</dc:creator>
				<category><![CDATA[Weekly Digest]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1599</guid>
		<description><![CDATA[Weekly in name only ;)
What's New in Edge Rails: Default RESTful Rendering
Controller responders handle the chore of matching the HTTP request method and the resource format type to determine what type of response should be sent. And since REST is so well-defined it’s very easy to establish a default responder to handle the basics.
Out of [...]]]></description>
			<content:encoded><![CDATA[<p>Weekly in name only ;)</p>
<p><a href="http://ryandaigle.com/articles/2009/8/10/what-s-new-in-edge-rails-default-restful-rendering">What's New in Edge Rails: Default RESTful Rendering</a></p>
<blockquote><p>Controller responders handle the chore of matching the HTTP request method and the resource format type to determine what type of response should be sent. And since REST is so well-defined it’s very easy to establish a default responder to handle the basics.</p></blockquote>
<p><a href="http://www.nytimes.com/2009/08/02/magazine/02cooking-t.html?_r=1&pagewanted=print">Out of the Kitchen, Onto the Couch</a></p>
<blockquote><p>“Here’s an analogy,” Balzer said. “A hundred years ago, chicken for dinner meant going out and catching, killing, plucking and gutting a chicken. Do you know anybody who still does that? It would be considered crazy! Well, that’s exactly how cooking will seem to your grandchildren: something people used to do when they had no other choice. Get over it.”</p></blockquote>
<p><a href="http://www.threeriversinstitute.org/blog/?p=333">Approaching a Minimum Viable Product</a></p>
<blockquote><p>The purpose of the MVP is to answer your most pressing question, to validate your most pressing business assumption. To create an MVP work backwards from your question, not forwards from a feature list. Invest as little as possible to answer the question because after this there will be another question and another and you’ll need enough money to answer them all.</p></blockquote>
<p><a href="http://m.onkey.org/2009/8/7/save-save/comments/11157#comment-11157">save! > save</a></p>
<blockquote><p>When you’re not expecting something to fail, always use the methods that raise exceptions on failure.</p></blockquote>
<p><a href="http://ryandaigle.com/articles/2009/8/6/what-s-new-in-edge-rails-cleaner-restful-controllers-w-respond_with">What's New in Edge Rails: Cleaner RESTful Controllers w/ respond_with</a></p>
<blockquote><p>REST is a first-class citizen in the Rails world, though most of the hard work is done at the routing level. The controller stack has some niceties revolving around mime type handling with the respond_to facility but, to date, there’s not been a lot built into actionpack to handle the serving of resources.</p></blockquote>
<p><a href="http://github.com/cldwalker/hirb/tree/master">cldwalker's hirb</a></p>
<blockquote><p>A mini view framework for console/irb that's easy to use, even while under its influence. Console goodies include a no-wrap table, auto-pager, tree and menu.</p></blockquote>
<p><a href="http://github.com/josevalim/simple_form/tree/master">josevalim's simple_form</a></p>
<blockquote><p>Simple easy contact form for Rails with I18n, validations, attachments and request information.</p></blockquote>
<p><a href="http://blog.envylabs.com/2009/08/the-rails-state-machine/">The Rails State Machine</a></p>
<blockquote><p>Ruby on Rails recently added a built-in ActiveModel::StateMachine implementation and even more recently tied it in to ActiveRecord.  And, for being a built-in library, it’s pretty damned fully-featured.</p></blockquote>
<p><a href="http://github.com/blog/470-deployment-script-spring-cleaning">Deployment Script Spring Cleaning at GitHub</a></p>
<blockquote><p>As we get ready to upgrade our servers I thought it’d be a good time to upgrade our deployment process. Currently pushing out a new version of GitHub takes upwards of 15 minutes. Ouch. My goal: one minute deploys (excluding server restart time).</p></blockquote>
<p><a href="http://quickmagick.rubyforge.org/">Quick_magick</a></p>
<blockquote><p>QuickMagick is a gem for easily accessing ImageMagick command line tools from Ruby programs.</p></blockquote>
<p><a href="http://github.com/GreenAsJade/s3-swf-upload-plugin/tree/master">GreenAsJade's s3-swf-upload-plugin</a></p>
<blockquote><p>A rails plugin which allow user upload files to S3 through an embedded flash directly. This fork has environment setting of amazon creds (to avoid hardcode in app), configurable message for the select button, bugfix on submit-without-select, much improved feedback to the user about what is happening, ability to check the file they selected, before it gets actually uploaded.</p></blockquote>
<p><a href="http://gigaom.com/2009/08/01/rss-subscribers-or-twitter-followers-which-are-worth-more/">RSS Subscribers or Twitter Followers: Which Are Worth More?</a></p>
<blockquote><p>I would need to test first to find the optimal valuation, but I am guessing it would be between 5 and 10 Twitter followers for each RSS subscriber.</p></blockquote>
<p><a href="http://www.tbray.org/ongoing/When/200x/2009/07/29/Feeds-and-Streams-and-People">You Have to Choose Who To Read</a></p>
<blockquote><p>The wonderful thing is that in A.D. 2009, the option of reading primary sources is open to anybody who’s willing to take a little trouble.</p></blockquote>
<p><a href="http://inessential.com/2009/07/30/anatomy_of_a_feature">Anatomy of a feature</a></p>
<blockquote><p>“Oh, it’s easy, just a quick http call. I could write a script to do it in like 20 seconds.” But of course it’s not as simple as just writing a quick script. It’s tempting to think that adding a feature like this is just about adding the functionality — but there’s a bunch more to it than that.</p></blockquote>
<p><a href="http://blog.evanweaver.com/articles/2009/07/06/up-and-running-with-cassandra/">up and running with cassandra</a></p>
<blockquote><p>I think that Cassandra is the most promising current implementation of a runtime distributed database, but much work remains to be done. We're beginning to use Cassandra at Twitter</p></blockquote>
<p><a href="http://startuplessonslearned.blogspot.com/2009/07/embrace-technical-debt.html">Embrace technical debt</a></p>
<blockquote><p>As in many scalability decisions, we’d have been much better off investing in agility, so that we could change the architecture in response to actual customer demand, rather than trying to predict the future. That’s what Just-in-time Scalability is all about. Sometimes quick and dirty actually incurs less debt.</p></blockquote>
<p><a href="http://cssprism.com/">CSS Prism</a></p>
<blockquote><p>Enter the URL of any CSS file to view and modify its color spectrum.</p></blockquote>
<p><a href="http://www.paulgraham.com/ramenprofitable.html">Ramen Profitable</a></p>
<blockquote><p>Now that the term "ramen profitable" has become widespread, I ought to explain precisely what the idea entails.</p></blockquote>
<p><a href="http://www.37signals.com/svn/posts/1819-basecamp-now-with-more-vroom">Basecamp, now with more vroom</a></p>
<blockquote><p>To make a long story a little less long, we saw some pretty extreme performance improvements from moving Basecamp out of a virtualized environment and back onto dedicated hardware.</p></blockquote>
<p><a href="http://progit.org/">Pro Git Book</a></p>
<blockquote><p>This is the website for the Pro Git book, written by Scott Chacon and published by Apress. Here you can find the full content of the book, a blog with tips and updates about Git and the book and open source projects related to Git or referenced in the book.</p></blockquote>
<p><a href="http://blog.wyeworks.com/2009/7/27/drag-drop-sortable-lists">Drag & Drop Sortable Lists</a></p>
<blockquote><p>Time has come for us to make a sortable list, and let’s face it, drag&drop are the prettiest ones. So, let me explain how to proceed.</p></blockquote>
<p><a href="http://developer.yahoo.com/ypatterns/parent.php?pattern=reputation">Reputation - Yahoo! Design Pattern Library</a></p>
<blockquote><p>A person participating in a social structure expects to develop a reputation and hopes for insight into the reputations of others, but each designed model of participation and reputation embodies its own set of biases and incentive structures. Balancing these forces determines in large measure the success or failure of a social system.</p></blockquote>
<p><a href="http://code.google.com/p/pubsubhubbub/">pubsubhubbub</a></p>
<blockquote><p>A simple, open, web-hook-based pubsub protocol & open source reference implementation.</p></blockquote>
<p><a href="http://sethgodin.typepad.com/seths_blog/2009/07/death-spiral.html">Death spiral!</a></p>
<blockquote><p>As Tom Peters says, "You can't shrink your way to greatness," and yet that's what so many dying businesses try to do. They hunker down and wait for things to get better, but they don't. This isn't a dip, it's a cul de sac. It's over.</p></blockquote>
<p><a href="http://daringfireball.net/2009/07/pay_walls">Pay Walls</a></p>
<blockquote><p>Newsstand and subscription prices have never been the main source of revenue for newspapers anyway — advertising is. But they can’t make as much money from web advertising as from print for several reasons. Pre-Internet, newspapers had inordinate control over the supply of news, and therefore over the supply of advertising, and they grew fat on the profits.</p></blockquote>
<p><a href="http://blog.railsrumble.com/2009/7/23/this-bird-s-ready-to-rumble">Rails Rumble - This Bird's Ready to Rumble</a></p>
<blockquote><p>Of course, even applications that aren’t quite so Twitter-centric can benefit from some Twitter integration. Here’s a list of some resources that may inspire you to include them in your Rumble application in some way.</p></blockquote>
<p><a href="http://railstips.org/2009/7/21/uploadify-and-rails23">Uploadify and Rails 2.3</a></p>
<blockquote><p>A few weeks back we (Steve and I) added multiple asset upload to Harmony using Uploadify. If you are thinking that sounds easy, you would be sorely mistaken.</p></blockquote>
<p><a href="http://github.com/madx/rackable/tree/master">madx's rackable</a></p>
<blockquote><p>Rackable is a tiny module that aims to make any Ruby object Rack-friendly and provide it with a REST-like interface. Basically, what it does is providing an object with a call() method that uses the Rack environement to dispatch to a method, giving helper objects such as headers, query parameters, ...</p></blockquote>
<p><a href="http://github.com/grosser/text_filter/tree/master">grosser's text_filter</a></p>
<blockquote><p>ActiveRecord / Rails Filter Text Fields Before Assigning them</p></blockquote>
<p><a href="http://railscasts.com/episodes/163-self-referential-association">Railscasts Self-Referential Association</a></p>
<blockquote><p>Creating a social networking site often requires a self-referential association on the User model to define friends/followers. In this episode I show how to do exactly that.</p></blockquote>
<p><a href="http://www.panic.com/~wade/picker/">Developer Color Picker</a></p>
<blockquote><p>A custom color picker designed specifically for developers. Makes getting colors out of Photoshop/Acorn mock-ups quick and easy.</p></blockquote>
<p><a href="http://www.collegemogul.com/content/plenty-drupal-jobs-computer-science-students">Drupal Job Boards</a></p>
<blockquote><p>If you're just getting started in computer science or looking to specialize in a web technology, then you should definitely look into Drupal. Jobs in the marketplace are in high demand, especially compared to some of the other CMS platforms. The number of Drupal job opportunities continues to increase.</p></blockquote>
<p><a href="http://paulgraham.com/makersschedule.html">Maker's Schedule, Manager's Schedule</a></p>
<blockquote><p>Those of us on the maker's schedule are willing to compromise. We know we have to have some number of meetings. All we ask from those on the manager's schedule is that they understand the cost.</p></blockquote>
<p><a href="http://www.therailsway.com/2009/7/22/do-it-later-with-delayed-job">Do it Later With Delayed Job</a></p>
<blockquote><p>The killer feature that delayed_job has is send_later, this lets you transparently turn a method call on a class or object into a delayed_job. It also supports declaring certain methods to be handled asynchronously in an environment file...</p></blockquote>
<p><a href="http://files.getdropbox.com/u/2/app.html">DropBox Y Combinator Application</a></p>
<blockquote><p>Y Combinator Funding Application, Summer 2007, DropBox</p></blockquote>
<p><a href="http://wiki.apache.org/incubator/TrafficServerProposal">TrafficServerProposal Apache Proposal from Yahoo</a></p>
<blockquote><p>Traffic Server fills a need for a fast, extensible and scalable HTTP proxy and caching. We have a production proven piece of software that can deliver HTTP traffic at high rates, and can scale well on modern SMP hardware. We have benchmarked Traffic Server to handle in excess of 35,000 RPS on a single box. Traffic Server has a rich feature set, implementing most of HTTP/1.1 to the RFC specifications.</p></blockquote>
<p><a href="http://daringfireball.net/2009/07/charging_for_access_to_news_sites">Daring Fireball: Charging for Access to News Sites</a></p>
<blockquote><p>...and it’s not really surprising that they’re failing to evolve. The decision-makers — the executives sitting atop large non-editorial management bureaucracies — are exactly the people who need to go if newspapers are going to remain profitable.</p></blockquote>
<p><a href="http://github.com/cldwalker/alias/tree/master">cldwalker's alias</a></p>
<blockquote><p>Creates, manages and saves aliases for class methods, instance methods, constants, delegated methods and more.</p></blockquote>
<p><a href="http://news.ycombinator.com/item?id=713339">Why Does Time Go Faster As We Get Older?</a></p>
<blockquote><p>If you travel to Australia, and the yield sign says "Give Way",you notice it again. That's why travel is so memorable... As we get older, unfamiliar things and new perceptions are fewer and fewer... Thus it seems that time is passing faster... My own philosophy, which I often forget to follow, is to optimize my perceived lifespan by doing as many unfamiliar things as possible.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/08/10/weekly-digest-8-10-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weekly Digest, 7-19-09</title>
		<link>http://almosteffortless.com/2009/07/19/weekly-digest-7-19-09/</link>
		<comments>http://almosteffortless.com/2009/07/19/weekly-digest-7-19-09/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 16:09:14 +0000</pubDate>
		<dc:creator>Weekly Digest</dc:creator>
				<category><![CDATA[Weekly Digest]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1567</guid>
		<description><![CDATA[Fever and the Future of Feed Readers
I’m not sure what the solution is here. Feed readers as we’ve known them are dying, but it’s as yet unclear what will take their place. Filtering feeds for relevance algorithmically seems all but fruitless; filtering through the social graph is only a slight improvement, but misses the rare [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://al3x.net/2009/07/18/fever-and-the-future-of-feed-readers.html">Fever and the Future of Feed Readers</a></p>
<blockquote><p>I’m not sure what the solution is here. Feed readers as we’ve known them are dying, but it’s as yet unclear what will take their place. Filtering feeds for relevance algorithmically seems all but fruitless; filtering through the social graph is only a slight improvement, but misses the rare content that may only strike a chord with a small audience.</p></blockquote>
<p><a href="http://giantrobots.thoughtbot.com/2009/7/17/the-journey-to-ruby-1-9">The Journey to Ruby 1.9</a></p>
<blockquote><p>Here’s some tips and tricks for those who want to upgrade their own Ruby install and have their gems to be compatible.</p></blockquote>
<p><a href="http://afreshcup.com/2009/07/12/big-old-rails-template/">Big Old Rails Template from A Fresh Cup</a></p>
<blockquote><p>Here’s a list of what this template sets up...</p></blockquote>
<p><a href="http://inessential.com/2009/07/16/dont_offer_50_for_your_favorite_feat">Don’t offer $50 for your favorite feature</a></p>
<blockquote><p>I bet every Mac and iPhone developer (and probably some Windows developers too) has heard this at least once, if not dozens of times, from someone who uses their software: “I will PayPal you $50 right now if you will add this feature for me.”</p></blockquote>
<p><a href="http://orderedlist.com/articles/structural-tags-in-html5">Structural Tags in HTML5</a></p>
<blockquote><p>The HTML5 specification has added quite a few interesting and useful tags for structuring your markup. For a majority of everyday uses, these tags will replace many of our typical div entries from our code. So let’s dig in.</p></blockquote>
<p><a href="http://nubyonrails.com/articles/five-features-from-mercurial-that-would-make-git-suck-less">Five Features from Mercurial That Would Make Git Suck Less</a></p>
<blockquote><p>This isn’t an attempt to convince you to use Mercurial exclusively. And I’m intentionally skipping any mention of Mercurial’s shortcomings. I want to see these features in upcoming versions of Git.</p></blockquote>
<p><a href="http://www.marco.org/143265621">Serious doubts</a></p>
<blockquote><p>I’ve never doubted the viability of running a serious business of writing iPhone apps before. For the first time, now, I am. [The developer of Instapaper on the state of the iPhone App Store.]</p></blockquote>
<p><a href="http://www.ultrasaurus.com/sarahblog/2009/07/rails-admin-interface-roundup/">rails admin interface roundup</a></p>
<blockquote><p>...I evaluated four plugins for admin UI...</p></blockquote>
<p><a href="http://unqualified-reservations.blogspot.com/2009/07/wolfram-alpha-and-hubristic-user.html">Wolfram Alpha and hubristic user interfaces</a></p>
<blockquote><p>Strangely, to the developers of intelligent control interfaces, these interfaces appear to work perfectly well. Moreover, when the developers demo these interfaces, the demo comes off without a hitch - and is often quite impressive. This is not the normal result of broken software. This "demo illusion" convinces the developers that the product is ready to ship, although it is not and will never be ready to ship.</p></blockquote>
<p><a href="http://iphonedevelopment.blogspot.com/2009/07/gah-up-is-down-right-is-wrong-make-it.html">Gah! Up is Down! Right is Wrong! Make it Stop!</a></p>
<blockquote><p>I'm not a fan of the GPL quite simply because I don't see the GPL as "open". The GPL is not defined by what it is, it's defined by what it isn't. It's "against" proprietary closed source code. It's against corporations. It's against software as a commercial product... Knowledge is expanded when it is shared. When solutions to problems are shared, that frees us up to tackle the next obstacle rather than spending time solving problems that have already been solved by others... If you truly believe that knowledge is not a zero-sum game, and that sharing knowledge tends to increase the sum of societal knowledge, then you don't go putting petty restrictions on your knowledge.</p></blockquote>
<p><a href="http://www.contrast.ie/blog/there-are-no-small-changes/">There are no small changes</a></p>
<blockquote><p>Adding a plugin to a codebase is easy. Integrating a new feature within an existing application is not. When you’re striving for quality there are no small changes.</p></blockquote>
<p><a href="http://blog.talbott.ws/articles/2009/7/15/how-capitalism-saves-ruby-from-corporatism">How Capitalism Saves Ruby from Corporatism</a></p>
<blockquote><p>...or... Owning the Means of Production. This talk was given at FutureRuby in Toronto, Canada in the summer of 2009.</p></blockquote>
<p><a href="http://daringfireball.net/2009/07/chrome_os_context">Putting What Little We Actually Know About Chrome OS Into Context</a></p>
<blockquote><p>I’m skeptical about the prospects of any new system or product that isn’t intended for use by the people creating it. Gmail, for example, is the best web mail system because it was designed to be used not just by “typical” users but by expert users, including the engineers at Google who made it.</p></blockquote>
<p><a href="http://www.softwarebyrob.com/2009/07/14/one-of-the-most-common-startup-roadblocks/">One of the Most Time Consuming Startup Roadblocks</a></p>
<blockquote><p>So take a risk this month: outsource your first task and see where it takes you. When was the last time a single tool or work habit offered the opportunity to save 20-60 hours in a month?</p></blockquote>
<p><a href="http://blog.wyeworks.com/2009/7/13/paperclip-file-rename">Paperclip file rename</a></p>
<blockquote><p>While developing an application with Sebastián that allow users to upload videos with some file name restrictions, meaning that it must contain only A-Z and 0-9 digits, underscores (_) as a valid component as well, and also the name must be preceded by it’s own #id, we came up with the need of applying this custom filter to each uploaded video.</p></blockquote>
<p><a href="http://www.techcrunch.com/2009/07/14/youtube-will-be-next-to-kiss-ie6-support-goodbye/">YouTube Will Be Next To Kiss IE6 Support Goodbye</a></p>
<blockquote><p>Judging by this screenshot taken by an IE6 user who was watching some videos on YouTube, it appears the Google company will be phasing out support for the browser shortly. [Die!]</p></blockquote>
<p><a href="http://news.ycombinator.com/item?id=703086">Hacker News on Zed Shaw: Why I (A/L)GPL</a></p>
<blockquote><p>[Interesting comments, as usual. My take: the GPL is like half-assed open-source. Sure, you can see the source, but it's not really open.]</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/07/19/weekly-digest-7-19-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>El Dorado on Heroku</title>
		<link>http://almosteffortless.com/2009/07/09/el-dorado-on-heroku/</link>
		<comments>http://almosteffortless.com/2009/07/09/el-dorado-on-heroku/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 20:26:05 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[El Dorado]]></category>
		<category><![CDATA[Ruby/Rails]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1535</guid>
		<description><![CDATA[I'm pleased to announce that El Dorado is now compatible with Heroku, the instant Ruby platform. 

This means that deploying El Dorado is no longer a pain in the ass. It also means that you can get started with El Dorado for free. Just follow along with the installation and deployment instructions in the README [...]]]></description>
			<content:encoded><![CDATA[<p>I'm pleased to announce that <a href="/eldorado">El Dorado</a> is now compatible with <a href="http://heroku.com">Heroku</a>, the instant Ruby platform. </p>
<p><a href="http://heroku.com"><img src="http://s3.amazonaws.com/almosteffortless/heroku.jpg" alt="heroku" title="heroku" width="185" height="73" class="alignnone size-full wp-image-1536" /></a></p>
<p>This means that deploying El Dorado is no longer a pain in the ass. It also means that you can get started with El Dorado <i>for free</i>. Just follow along with the installation and deployment instructions in the <a href="http://github.com/trevorturk/eldorado/tree/master">README</a> and you're good to go. </p>
<p>If you need help along the way, drop by the support site: <a href="http://eldorado.heroku.com/">http://eldorado.heroku.com/</a></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/07/09/el-dorado-on-heroku/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weekly Digest, 7-9-09</title>
		<link>http://almosteffortless.com/2009/07/09/weekly-digest-7-9-09/</link>
		<comments>http://almosteffortless.com/2009/07/09/weekly-digest-7-9-09/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 19:54:54 +0000</pubDate>
		<dc:creator>Weekly Digest</dc:creator>
				<category><![CDATA[Weekly Digest]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1533</guid>
		<description><![CDATA[..."weekly," eh?
pauldix's typhoeus
Like a modern code version of the mythical beast with 100 serpent heads, Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling logic.
iPhone-like password fields using jQuery
That may have been the reason why Apple developed implemented an alternative method on iPhone/iPod Touch: passwords get masked while typing but the last character in [...]]]></description>
			<content:encoded><![CDATA[<p>..."weekly," eh?</p>
<p><a href="http://github.com/pauldix/typhoeus/tree/master">pauldix's typhoeus</a></p>
<blockquote><p>Like a modern code version of the mythical beast with 100 serpent heads, Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling logic.</p></blockquote>
<p><a href="http://blog.decaf.de/2009/07/iphone-like-password-fields-using-jquery/">iPhone-like password fields using jQuery</a></p>
<blockquote><p>That may have been the reason why Apple developed implemented an alternative method on iPhone/iPod Touch: passwords get masked while typing but the last character in row is shown in plain text.</p></blockquote>
<p><a href="http://www.apple.com/downloads/dashboard/developer/tangopalette.html">Tango Palette Dashboard Widget</a></p>
<blockquote><p>Colors from Tango Desktop Project with one-click! Click on color box will copy hex value (without #, useful, for example, with Photoshop) into the clipboard. Enjoy!</p></blockquote>
<p><a href="http://www.everyblock.com/code/">The EveryBlock source code</a></p>
<blockquote><p>EveryBlock.com is an experimental news Web site that provides information at a "microlocal" level — by neighborhood or city block. It was funded by a grant from Knight Foundation, which requires the site's backend code to be open-sourced. Here is the code.</p></blockquote>
<p><a href="http://railstips.org/2009/6/27/mongomapper-the-rad-mongo-wrapper">MongoMapper, The Rad Mongo Wrapper</a></p>
<blockquote><p>A few weeks ago, I wrote about Mongo and how awesome it is. Towards the end of the article (and in the slideshow) I mentioned MongoMapper, a project I’ve been working on.</p></blockquote>
<p><a href="http://wiki.apache.org/cassandra/">Cassandra Wiki</a></p>
<blockquote><p>Cassandra is a highly scalable, eventually consistent, distributed, structured key-value store. Cassandra brings together the distributed systems technologies from  Dynamo and the data model from Google's  BigTable. Like Dynamo, Cassandra is  eventually consistent. Like BigTable, Cassandra provides a ColumnFamily-based data model richer than typical key/value systems.</p></blockquote>
<p><a href="http://github.com/tmm1/youtube-g/tree/master">tmm1's youtube-g</a></p>
<blockquote><p>youtube-g is a pure Ruby client for the YouTube GData API. It provides an easy way to access the latest YouTube video search results from your own programs. In comparison with the earlier Youtube search interfaces, this new API and library offers much-improved flexibility around executing complex search queries to obtain well-targeted video search results.</p></blockquote>
<p><a href="http://github.com/JaredKuolt/robustthread/tree/master">JaredKuolt's robustthread</a></p>
<blockquote><p>This module allows for the creation of a thread that will not simply die when the process dies. Instead, it joins all RobustThreads in Ruby’s exit handler.</p></blockquote>
<p><a href="http://github.com/zilkey/active_api/tree/master">zilkey's active_api</a></p>
<blockquote><p>ActiveApi allows you to define an XML schema in Ruby, and use that schema to convert ruby objects to xml. Features XSD or DTD generation; Versioning; The ability to represent your model in a way that is not tightly coupled to the model itself.</p></blockquote>
<p><a href="http://github.com/neerajdotname/admin_data/tree/master">neerajdotname's admin_data</a></p>
<blockquote><p>Rails plugin to browse and manage your data using your browser.</p></blockquote>
<p><a href="http://github.com/adamsalter/sitemap_generator-plugin/tree/master">adamsalter's sitemap_generator-plugin</a></p>
<blockquote><p>This plugin enables 'enterprise-class' Google Sitemaps to be easily generated for a Rails site as a rake task, using a simple 'Rails Routes'-like DSL. It allows you to take care of familiar Sitemap issues...</p></blockquote>
<p><a href="http://kottke.org/04/04/google-operating-system">GooOS, the Google Operating System</a></p>
<blockquote><p>Google isn't worried about Yahoo! or Microsoft's search efforts...although the media's focus on that is probably to their advantage. Their real target is Windows. Who needs Windows when anyone can have free unlimited access to the world's fastest computer running the smartest operating system? Mobile devices don't need big, bloated OSes...they'll be perfect platforms for accessing the GooOS.</p></blockquote>
<p><a href="http://googleblog.blogspot.com/2009/07/introducing-google-chrome-os.html">Introducing the Google Chrome OS</a></p>
<blockquote><p>So today, we're announcing a new project that's a natural extension of Google Chrome — the Google Chrome Operating System. It's our attempt to re-think what operating systems should be.</p></blockquote>
<p><a href="http://blog.posterous.com/new-on-posterous-audio-and-video-plays-on-you">New on Posterous: Audio and video *plays* on your iPhone in Safari, no flash needed</a></p>
<blockquote><p>Now, audio and video you attach and send to Posterous can be played on an iPhone in Mobile Safari. No more "missing flash" errors!</p></blockquote>
<p><a href="http://www.red-sweater.com/blog/825/getting-pretty-lonely">Getting Pretty Lonely</a></p>
<blockquote><p>As the developer evaluates communities to participate in, they must evaluate the legal impact such participation will have on their own project. The closed source communities are, by definition uninviting to outsiders. GPL communities are open and embracing of other GPL developers, but generally off-putting to liberal-license and closed-license developers. Only the liberal-license communities are attractive to developers from all 3 camps.</p></blockquote>
<p><a href="http://blog.clickdeck360.com/the-mythical-man-weekend">The Mythical Man Weekend</a></p>
<blockquote><p>The "I can do it in a weekend" beast reared its naive head on Hacker News recently which in turn generated some intelligent discussion on the topic. We've all been there and we've all learned the hard way.</p></blockquote>
<p><a href="http://ozmm.org/posts/when_github_goes_down.html">When GitHub goes down...</a></p>
<blockquote><p>There are quite a few ways to deploy without github… ah the wonders of git!</p></blockquote>
<p><a href="http://railslab.newrelic.com/2009/06/18/adam-wiggins-and-ryan-tomayko-heroku">Adam Wiggins and Ryan Tomayko, Heroku</a></p>
<blockquote><p>An interview in 3 parts with Adam Wiggins and Ryan Tomayko of Heroku from their recent visit to New Relic. They discuss the vision behind the creation of Heroku, their passion for helping developers create scalable, high-performance Rails apps in the cloud, taking full advantage of cloud deployment, and their tips and best practices to create a high-performance app.</p></blockquote>
<p><a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-June/020620.html">[whatwg] Codecs for audio and video</a></p>
<blockquote><p>After an inordinate amount of discussions, both in public and privately, on the situation regarding codecs for video and audio in HTML5, I have reluctantly come to the conclusion that there is no suitable codec that all vendors are willing to implement and ship. I have therefore removed the two subsections in the HTML5 spec in which codecs would have been required, and have instead left the matter undefined, as has in the past been done with other features like img and image formats, embed and plugin APIs, or Web fonts and font formats.</p></blockquote>
<p><a href="http://www.slideshare.net/cxpartners/secrets-of-simplicity">Secrets of Simplicity</a></p>
<blockquote><p>Rules for being simple and usable (Giles Colborne)</p></blockquote>
<p><a href="http://onticoren.com/2009/06/29/go-daddy-dns-heroku/">Go Daddy DNS & Heroku</a></p>
<blockquote><p>As easy as using Heroku is, setting up DNS seems to be one of the trickier parts.</p></blockquote>
<p><a href="http://blog.bitquabit.com/2009/07/01/one-which-i-call-out-hacker-news/">The One in Which I Call Out Hacker News</a></p>
<blockquote><p>The next time you see an application you like, think very long and hard about all the user-oriented details that went into making it a pleasure to use, before decrying how you could trivially reimplement the entire damn thing in a weekend. Nine times out of ten, when you think an application was ridiculously easy to implement, you’re completely missing the user side of the story.</p></blockquote>
<p><a href="http://www.infoq.com/news/2009/06/Twitter-Architecture">Twitter, an Evolving Architecture</a></p>
<blockquote><p>Most of the tools used by Twitter are open source. The stack is made up of Rails for the front side, C, Scala and Java for the middle business layer, and MySQL for storing data. Everything is kept in RAM and the database is just a backup. The Rails front end handles rendering, cache composition, DB querying and synchronous inserts. This front end mostly glues together several client services, many written in C: MySQL client, Memcached client, a JSON one, and others.</p></blockquote>
<p><a href="http://en.blog.wordpress.com/2009/03/11/p2-the-new-prologue/">P2: The New Prologue</a></p>
<blockquote><p>Prologue broke ground when it brought microblogging to WordPress.com. Now it’s cooler, faster, sleeker, and ready for 2009 and beyond.</p></blockquote>
<p><a href="http://github.com/fesplugas/typus/tree/master">fesplugas's typus</a></p>
<blockquote><p>Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator.)</p></blockquote>
<p><a href="http://blog.posterous.com/posterous-is-the-best-way-to-publish-video-an-0">Posterous is the best way to publish video and photos from your new iPhone 3G S</a></p>
<blockquote><p>Posterous has always been about email, so when Apple announced the iPhone 3G S would shoot video, we already knew it would just work with our site! We've optimized Posterous to work well with the iPhone 3.0, so now it's better than ever. [The benefits of having a simple, universal input are obvious.]</p></blockquote>
<p><a href="http://nuts.redsquirrel.com/post/128789373/fails-on-rails">Fails on Rails</a></p>
<blockquote><p>The total cost of development for a failed Ruby on Rails system is much less than a failed Java EE system.</p></blockquote>
<p><a href="http://intranation.com/entries/2009/03/development-virtual-machines-os-x-using-vmware-and/">Development virtual machines on OS X using VMWare and Ubuntu</a></p>
<blockquote><p>I’ve been using Linux as my primary development environment for a number of months now, despite being an abject Mac fanboy.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/07/09/weekly-digest-7-9-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Config vars and Heroku</title>
		<link>http://almosteffortless.com/2009/06/25/config-vars-and-heroku/</link>
		<comments>http://almosteffortless.com/2009/06/25/config-vars-and-heroku/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 02:52:04 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[El Dorado]]></category>
		<category><![CDATA[Ruby/Rails]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1479</guid>
		<description><![CDATA[I don't really care for the suggested approach in the Heroku docs for setting configuration variables locally. I have an open-source project that I'm working to get onto Heroku, so I decided to do a little work to come up with a solution that I prefer. I think this would work well for open source [...]]]></description>
			<content:encoded><![CDATA[<p>I don't really care for the <a href="http://docs.heroku.com/config-vars#local-setup ">suggested approach</a> in the <a href="http://heroku.com">Heroku</a> docs for setting configuration variables locally. I have an open-source project that I'm working to get onto Heroku, so I decided to do a little work to come up with a solution that I prefer. I think this would work well for open source projects, as well as projects with multiple developers. </p>
<p>Here's the basic idea: </p>
<p>You have a config file that contains all of your local configuration variables. It looks a lot like database.yml.</p>
<pre class="ruby">&nbsp;
<span style="color:#008000; font-style:italic;"># config/config.yml</span>
&nbsp;
development:
  session_key: example_development
  session_secret: ESl6X3oKM1i1RRrD2QLwUUzz9jr1zxNO
  domain: http://example.<span style="color:#9900CC;">com</span>
&nbsp;
test:
  session_key: example_test
  session_secret: vrwPpJTvwnMVLP1wTSgqigSl7PMI7QcE
  domain: http://example.<span style="color:#9900CC;">com</span>
&nbsp;
production:
  session_key: <span style="color:#008000; font-style:italic;"># any string identifying your app</span>
  session_secret: <span style="color:#008000; font-style:italic;"># a random, secret string at least 32 characters long</span>
  domain: <span style="color:#008000; font-style:italic;"># http://example.com</span>
  mailer: <span style="color:#008000; font-style:italic;"># noreply@example.com</span>
&nbsp;</pre>
<p>You perform a little trickery in environment.rb to prefer the Heroku ENV storage of config vars (in the production environment), but you fall back to your config.yml if the config vars aren't found in ENV (in the development and test environments). </p>
<pre class="ruby">&nbsp;
<span style="color:#008000; font-style:italic;"># config/environment.rb</span>
&nbsp;
<span style="color:#6666ff; font-weight:bold;">Rails::Initializer</span>.<span style="color:#9900CC;">run</span> <span style="color:#9966CC; font-weight:bold;">do</span> |config|
  <span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'yaml'</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># support yaml and heroku config vars, preferring ENV for heroku</span>
  CONFIG = <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">YAML</span>.<span style="color:#9900CC;">load_file</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'config/config.yml'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span>RAILS_ENV<span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">merge</span><span style="color:#006600; font-weight:bold;">&#40;</span>ENV<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  config.<span style="color:#9900CC;">action_controller</span>.<span style="color:#9900CC;">session</span> = <span style="color:#006600; font-weight:bold;">&#123;</span>
    <span style="color:#ff3333; font-weight:bold;">:key</span> =&gt; CONFIG<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'session_key'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
    <span style="color:#ff3333; font-weight:bold;">:secret</span> =&gt; CONFIG<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'session_secret'</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;</pre>
<p>Then, you create a rake task (<i>rake heroku:config</i>) that can be used to send all of the config vars for your production environment up to Heroku. This task can be invoked once to set things up, but can also be run again if you need to make any additions or changes. </p>
<pre class="ruby">&nbsp;
<span style="color:#008000; font-style:italic;"># lib/tasks/heroku.rake</span>
&nbsp;
namespace <span style="color:#ff3333; font-weight:bold;">:heroku</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  task <span style="color:#ff3333; font-weight:bold;">:config</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Reading config/config.yml and sending config vars to Heroku...&quot;</span>
    CONFIG = <span style="color:#CC00FF; font-weight:bold;">YAML</span>.<span style="color:#9900CC;">load_file</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'config/config.yml'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'production'</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
    command = <span style="color:#996600;">&quot;heroku config:add&quot;</span>
    CONFIG.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span>|key, val| command &lt;&lt; <span style="color:#996600;">&quot; #{key}=#{val} &quot;</span> <span style="color:#9966CC; font-weight:bold;">if</span> val <span style="color:#006600; font-weight:bold;">&#125;</span>
    <span style="color:#CC0066; font-weight:bold;">system</span> command
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;</pre>
<p>This way, you've got all of your config vars stored with the project (.gitignored, of course)...</p>
<pre class="bash">&nbsp;
<span style="color: #808080; font-style: italic;"># .gitignore</span>
&nbsp;
/tmp/**/*
/log/*
*.log
/tmp/restart.txt
/config/config.yml
/config/database.yml
/db/*.sqlite3
&nbsp;</pre>
<p>...and you can easily set what you need on Heroku, like so:</p>
<pre class="bash">&nbsp;
$ rake heroku:config
Reading config/config.yml and sending config vars to Heroku...
Adding config vars:
  session_key =&gt; example_production
  session_secret =&gt; 1WlkMkYYi5611vtF...0ZMS2G3Xl67s4lEIK4sj65
  domain =&gt; http://example.com
  mailer =&gt; noreply@example.com
Restarting app...<span style="color: #000000; font-weight: bold;">done</span>.
&nbsp;</pre>
<p>The result is a pretty nice, I think. </p>
<p>You can see the installation and deployment instructions for my open source project <a href="http://github.com/trevorturk/eldorado/tree/master">El Dorado</a> if you're curious about the overall flow. </p>
<p>I'd love to get some feedback on this approach, but I really like it so far :) </p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/06/25/config-vars-and-heroku/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Install Ruby Enterprise, Phusion Passenger and El Dorado on Debian Lenny</title>
		<link>http://almosteffortless.com/2009/06/24/install-ruby-enterprise-phusion-passenger-and-el-dorado-on-debian-lenny/</link>
		<comments>http://almosteffortless.com/2009/06/24/install-ruby-enterprise-phusion-passenger-and-el-dorado-on-debian-lenny/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 20:32:47 +0000</pubDate>
		<dc:creator>Timothy O'Connell</dc:creator>
				<category><![CDATA[El Dorado]]></category>
		<category><![CDATA[Ruby/Rails]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1461</guid>
		<description><![CDATA[These instructions require and assume the following:

You're running Debian Lenny and you've got root access
You've got a functioning apache2 installation
You know the basics of working on the command line (i.e. how to edit files, execute commands, etc.)

If the above is true of your situation, read on to learn how to install Ruby Enterprise, Phusion Passenger [...]]]></description>
			<content:encoded><![CDATA[<p>These instructions require and assume the following:
<ul>
<li>You're running Debian Lenny and you've got <em>root</em> access</li>
<li>You've got a functioning <em>apache2</em> installation</li>
<li>You know the basics of working on the command line (i.e. how to edit files, execute commands, etc.)</li>
</ul>
<p>If the above is true of your situation, read on to learn how to install <em>Ruby Enterprise</em>, <em>Phusion Passenger</em> and <em>El Dorado</em> from scratch in a sort of "one-off" setting where you've got one server and you want it to run one site.</p>
<p><strong>NB:</strong> These instructions don't use <em>git</em> or <em>capistrano</em>. The instructions contained in the <em>El Dorado</em> README describe how to install <em>El Dorado</em> using those tools. Using them makes for an easier and cleaner installation. It also makes for easier scalability, upgrading and patching: I highly recommend using those tools. </p>
<ol>
<li><strong>Resolve Dependencies</strong></li>
<p>The first thing you'll need to do, even before installing <em>RE</em> or <em>PP</em>, is make sure that you've got the development files for the databases that <em>RE</em> and <em>PP</em> applications use:
<pre>apt-get install libsqlite3-ruby postgresql-8.3-plruby libmysql-ruby libmysqlclient15-dev postgresql-server-dev-8.3 libsqlite3-dev</pre>
<p>If you don't resolve these dependencies now, you'll get a message during the <em>RE</em> installation that prompts you to install gems for mysql, postgres, etc. and then, when you go to install those gems, you'll get an error like this:
<pre>ERROR:  Error installing mysql:
	ERROR: Failed to build gem native extension.</pre>
<p>So just go ahead and resolve those dependencies in advance.</p>
<li><strong>Install <em>Ruby Enterprise</em></strong></li>
<p>The best practice for this, as far as I know, is to install the current stable release of <em>RE</em> in <em>/opt/</em>. First, download the release you plan to use:
<pre>lana:~# cd /opt
lana:/opt# wget http://rubyforge.org/frs/download.php/58677/ruby-enterprise-1.8.6-20090610.tar.gz</pre>
<p> Once that's down, untar it and execute the installer script:
<pre>lana:/opt# tar -zxvf ruby-enterprise-1.8.6-20090610.tar.gz
[...]
lana:/opt# cd ruby-enterprise-1.8.6-20090610/
lana:/opt/ruby-enterprise-1.8.6-20090610# ./installer</pre>
<p>That should run, after a few tappings of ye olde Enter key, to its error-free conclusion. If, during the installation, the installer finds that you're missing software packages, the installer will bail and you'll be given some commands that fill those holes. Resolve those dependencies and finish the installation.</p>
<p>At the end of the installation, you'll be given some syntax that will automatically install <em>PP</em>. You'll use that in the next step.</p>
<li><strong>Install <em>Phusion Passenger</em></strong></li>
<p>Use the automatically generated syntax:
<pre>lana:/opt/ruby-enterprise-1.8.6-20090610# /opt/ruby-enterprise-1.8.6-20090610/bin/passenger-install-apache2-module</pre>
<p>Again, the installer will bail and prompt you to resolve dependencies if you've got any:
<pre>Installation instructions for required software

 * To install Apache 2 development headers:
   Please run apt-get install apache2-prefork-dev as root.

 * To install Apache Portable Runtime (APR) development headers:
   Please run apt-get install libapr1-dev as root.

 * To install Apache Portable Runtime Utility (APU) development headers:
   Please run apt-get install libaprutil1-dev as root.</pre>
<p>Resolve dependencies and finish the installation. </p>
<p>Once it's finished, you'll be given some lines to add to your "Apache configuration file". The best file to add these lines to is <em>/etc/apache2/httpd.conf</em>.</p>
<p>Just don't forget that you added them there (as opposed to somewhere else), as you'll need to modify them if you upgrade <em>RE</em>. </p>
<p>You'll also probably want to go ahead and add the following lines while you've got the file open:
<pre>PassengerPoolIdleTime 14400
PassengerMaxInstancesPerApp 2</pre>
<p>Those lines do exactly what it looks like they do. They're also very sensible settings to start with, as they'll prevent <em>El Dorado</em> from hogging a bunch of system resources, etc. right off the bat. </p>
<p>You can find <a href="http://www.modrails.com/documentation/Users%20guide.html#_resource_control_and_optimization_options">more information here</a>.</p>
<p>Finally, your <em>/etc/apache2/httpd.conf</em> file should look something like this:
<pre>PassengerPoolIdleTime 14400
PassengerMaxInstancesPerApp 2

LoadModule passenger_module /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so
PassengerRoot /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/passenger-2.2.4
PassengerRuby /opt/ruby-enterprise-1.8.6-20090610/bin/ruby</pre>
<p>Once you've made those changes, you're ready to begin installing <em>El Dorado</em>.</p>
<p>When it exits, the <em>PP</em> installer will show you some sample syntax for how to write an apache configuration file for your first application. You can ignore that for now, as we're going to come back to it later.</p>
<li><strong>Install <em>El Dorado</em></strong></li>
<p>First, get the latest release of the software from Trevor's <em>github</em>: <a href="http://github.com/trevorturk/eldorado/tree/master">http://github.com/trevorturk/eldorado/tree/master</a></p>
<p>Once you've got the URL of the latest release, switch from <em>root</em> to a less privileged user, make a folder in your home dir for the site, download the latest release of <em>El Dorado</em> to that directory and untar it:
<pre>
toconnell@lana:~$ mkdir example.com
toconnell@lana:~$ cd example.com
toconnell@lana:~/example.com$ wget wget http://download.github.com/trevorturk-eldorado-a37d0c71e928f605d111d5f48b5786ff613bf676.tar.gz
tar -zxvf trevorturk-eldorado-a37d0c71e928f605d111d5f48b5786ff613bf676.tar.gz
</pre>
<p>Now, get all of those files out of that big, ugly directory and into the current working directory and ditch those old files:
<pre>toconnell@lana:~/example.com$ mv trevorturk-eldorado-a37d0c71e928f605d111d5f48b5786ff613bf676/* .
toconnell@lana:~/example.com$ rm -rf trevorturk-eldorado-a37d0c71e928f605d111d5f48b5786ff613bf676*</pre>
<p>Now, follow the instructions in the README and copy the example <em>yml</em> files to the places where the application will look for real, non-example files:
<pre>toconnell@lana:~/example.com$ cp config/database.example.yml config/database.yml
toconnell@lana:~/example.com$ cp config/config.example.yml config/config.yml</pre>
<p>Now, use your favorite editor to edit the last stanza in <em>config/config.yml</em> so that it matches the information of your site:
<pre>production:
  session_key: example_production
  session_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  # Replace these X's and make this string (at least) 32 random alpha-numerics for good site security
  domain: http://example.com
  mailer: noreply@example.com  </pre>
<p><strong>NB:</strong> There are "dev" and "test" entries in this default file. If you're not planning on doing anything development related with this installation, you can safely delete those entries.</p>
<p>Once you've edited that file, that's it, so far as the non-<em>git</em> installation is concerned. To get <em>El Dorado</em> up and running, you'll need to do some minor database tasks. Those are covered in the next section.</p>
<li><strong>Configure the Database</strong></li>
<p>Since MySQL is deprecated, I'll be using PostgreSQL for the remainder of these instructions.</p>
<p>If you look at <em>config/database.yml</em>, you'll notice that it's essentially a blank template:
<pre>development:
  adapter: sqlite3
  database: db/development.sqlite3
  timeout: 5000
  # adapter: mysql
  # database: eldorado_development
  # username:
  # password:
  # host: localhost

test:
  adapter: sqlite3
  database: db/test.sqlite3
  timeout: 5000

production:
  adapter:
  database:
  username:
  password:
  host:</pre>
<p>First, edit that file:
<pre>production:
  adapter: postgresql
  database: example
  username: example
  password: XXXXXXXXXXXXXXXXXXXX
  host: localhost</pre>
<p><strong>NB:</strong> Again: once you've added your "production" entries to this file, you can feel free to delete the "test" and "dev" lines, as they do nothing and could cause confusion down the line.</p>
<p>Now, create the database and the user:
<pre>toconnell@lana:~/example.com$ sudo su postgres -c "createuser example"
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
toconnell@lana:~/example.com$ sudo su postgres -c "createdb example"</pre>
<p>Next, start the postgres monitor as the postgres user and make the a few changes:
<pre>toconnell@lana:~/example.com$ sudo su postgres -c psql
Welcome to psql 8.3.7, the PostgreSQL interactive terminal.

postgres=# ALTER USER example PASSWORD 'XXXXXXXXXXXXXXXXXXXX';
ALTER ROLE
postgres=# ALTER DATABASE example OWNER TO example;
ALTER DATABASE</pre>
<p>Now, if you've got your Postgres database configured correctly and your new user can access your new postgres database, you're ready to rake the <em>El Dorado</em> production database:
<pre>toconnell@lana:~/example.com$ /opt/ruby-enterprise-1.8.6-20090610/bin/rake rake db:schema:load RAILS_ENV=production</pre>
<p>Once the database is successfully raked, all you've got to do to finish up is configure Apache. </p>
<li><strong>Apache Configuration</strong></li>
<p>The following assumes that you're doing apache the "Debian way".</p>
<p>If this is true, the first thing you'll do is create a symlink in <em>/var/www/</em> that points at your install directory:
<pre>lana:/var/www# ln -s /home/toconnell/example.com/</pre>
<p>Next, create a file in <em>/etc/apache2/sites-available</em> with the name of your site and then create a symlink to it in <em>/etc/apache2/sites-enabled</em>.</p>
<p>The file should look something like this:
<pre>#
# example.com
#
&nbsp;
&lt;VirtualHost *:80&gt;
  ServerName example.com
  ServerAlias www.example.com
  ServerAdmin youremail@example.com
  DocumentRoot /home/toconnell/example.com/public
&nbsp;
  &lt;Directory &quot;/var/www/example.com&quot;&gt;
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
  &lt;/Directory&gt;
&nbsp;
  RewriteEngine On
&nbsp;
  RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  RewriteRule ^(.*)$ http://example.com$1 [R=301,L]
&nbsp;
  RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
  RewriteCond %{SCRIPT_FILENAME} !maintenance.html
  RewriteRule ^.*$ /system/maintenance.html [L]
&nbsp;
  ErrorLog /var/log/apache2/example_error_log
  CustomLog /var/log/apache2/example_access_log combined
  RewriteLog /var/log/apache2/example_rewrite_log
  RewriteLogLevel 9
&nbsp;
&lt;/VirtualHost&gt;</pre>
<p>NB: I've added some <em>apache</em> custom logging. Logs are good.</p>
<p>Once you've got the file in <em>/etc/apache2/sites-available</em> and the symlink in <em>/etc/apache2/sites-enabled</em> that points at that file, you should be ready to restart apache and get rolling:
<pre>lana:/etc/logrotate.d# /etc/init.d/apache2 reload</pre>
</ol>
<p>And that, as they say, is that. Once you reload apache, provided that your DNS is set up correctly and you haven't got any system problems beyond the scope of this document, your single instance of <em>El Dorado</em> should be ready for prime time.</p>
<p>Navigate to your site in your browser and create an administrative account: the first user who attempts to login will be the administrator. Once you've got your admin created, you're ready to start tweaking your new <em>El Dorado</em> site's appearance and adding users.</p>
<p>A note on upgrades: if you find you need/want to upgrade an  instance of <em>El Dorado</em> that has been installed thus, consult the README. The basic gist is that you're going to want to download/copy the new source/program files over the old ones (while being careful not to erase your user-uploaded files) and then run <code>rake db:migrate RAILS_ENV=production</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/06/24/install-ruby-enterprise-phusion-passenger-and-el-dorado-on-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Weekly Digest, 6-22-09</title>
		<link>http://almosteffortless.com/2009/06/22/weekly-digest-6-22-09/</link>
		<comments>http://almosteffortless.com/2009/06/22/weekly-digest-6-22-09/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 02:21:44 +0000</pubDate>
		<dc:creator>Weekly Digest</dc:creator>
				<category><![CDATA[Weekly Digest]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1454</guid>
		<description><![CDATA[How to speed up gem installs 10x
Answer: Turn off ri and rdoc installation.
Perch
Perch is a really little content management system for when you (or your clients) need to edit content without the hassle of setting up a big CMS.
Installing Ruby on Rails and PostgreSQL on OS X, Third Edition
Over the past few years, I’ve helped [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://buddingrubyist.com/2009/02/14/how-to-speed-up-gem-installs-10x/">How to speed up gem installs 10x</a></p>
<blockquote><p>Answer: Turn off ri and rdoc installation.</p></blockquote>
<p><a href="http://grabaperch.com/">Perch</a></p>
<blockquote><p>Perch is a really little content management system for when you (or your clients) need to edit content without the hassle of setting up a big CMS.</p></blockquote>
<p><a href="http://www.robbyonrails.com/articles/2008/01/22/installing-ruby-on-rails-and-postgresql-on-os-x-third-edition">Installing Ruby on Rails and PostgreSQL on OS X, Third Edition</a></p>
<blockquote><p>Over the past few years, I’ve helped you walk through the process of getting Ruby on Rails up and running on Mac OS X. The last version has been getting a lot of comments related to issues with the new Apple Leopard, so I’m going this post will expand on previous installation guides with what’s working for me as of January 2008.</p></blockquote>
<p><a href="http://factoryjoe.com/blog/2009/06/16/thoughts-on-opera-unite/">Thoughts on Opera Unite</a></p>
<blockquote><p>Opera’s CEO Jon von Tetzchner claims that “Opera Unite now decentralizes and democratizes the cloud." I call bullshit. Opera Unite does indeed rely on a P2P-like network to function, but the big problem is that you must push all your traffic through Opera’s proxy service.</p></blockquote>
<p><a href="http://lesscss.org/">LESS - Leaner CSS</a></p>
<blockquote><p>Less is Leaner css. Less extends css by adding: variables, mixins, operations and nested rules. Less uses existing css syntax. This means you can migrate your current .css files to .less in seconds and there is virtually no learning curve.</p></blockquote>
<p><a href="http://news.ycombinator.com/item?id=660679">YC Company Hosting Stats</a></p>
<blockquote><p>[Interesting stats and discussion on hosting.]</p></blockquote>
<p><a href="http://jameswilding.net/2009/06/13/rip/">Rip: a RubyGems Replacement?</a></p>
<blockquote><p>This makes package management as simple as passing files between friends. Email me your latest library, and I can run rip install path/to/lib. That’s it — you don’t need spec files, and you don’t need to build anything before your send me your code.</p></blockquote>
<p><a href="http://en.wikipedia.org/wiki/BigTable">BigTable</a></p>
<blockquote><p>BigTable is a fast and extremely large-scale DBMS. However, it departs from the typical convention of a fixed number of columns, instead described by the authors as "a sparse, distributed multi-dimensional sorted map", sharing characteristics of both row-oriented and column-oriented databases. BigTable is designed to scale into the petabyte range across "hundreds or thousands of machines, and to make it easy to add more machines [to] the system and automatically start taking advantage of those resources without any reconfiguration".</p></blockquote>
<p><a href="http://news.ycombinator.com/item?id=659696">Opera Unite reinvents the Web: a Web server on the Web browser</a></p>
<blockquote><p>[Very interesting possibilities here. Making it easier for people to serve content on the web can only lead to good things.]</p></blockquote>
<p><a href="http://github.com/tenderlove/markup_validity/tree/master">tenderlove's markup_validity</a></p>
<blockquote><p>Test for valid markup with test/unit or rspec</p></blockquote>
<p><a href="http://hemlock-kills.com/">Hemlock</a></p>
<blockquote><p>Hemlock is an open-source framework that combines the richness of Flash with the scalability of XMPP, facilitating a new class of web applications where multiple users can interact in real time. Games, workspace collaboration, educational tools… The only limit is your imagination.</p></blockquote>
<p><a href="http://www.infoq.com/news/2009/06/rip">Rip: A New Package Management System for Ruby</a></p>
<blockquote><p>But why a completely new package manager? What's wrong with RubyGems? We asked one of Rip's developers, Chris Wanstrath...</p></blockquote>
<p><a href="http://martinfowler.com/articles/rubyAtThoughtWorks.html">Ruby at ThoughtWorks</a></p>
<blockquote><p>ThoughtWorks started using Ruby for production projects in 2006, from then till the end of 2008 we had done 41 ruby projects. In preparation for a talk at QCon I surveyed these projects to examine what lessons we can draw from the experience. I describe our thoughts so far on common questions about Ruby's productivity, speed and maintainability.</p></blockquote>
<p><a href="http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html">[git pull] drm-next</a></p>
<blockquote><p>See? All the rules really are pretty simple. There's that somewhat subtle<br />
interaction between "keep your own history clean" and "never try to clean<br />
up _other_ proples histories", but if you follow the rules for pulling,<br />
you'll never have that problem.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/06/22/weekly-digest-6-22-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GitHub Protip: Follow other users</title>
		<link>http://almosteffortless.com/2009/06/11/github-protip-follow-other-users/</link>
		<comments>http://almosteffortless.com/2009/06/11/github-protip-follow-other-users/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 03:38:29 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1424</guid>
		<description><![CDATA[Inspired by this post, I thought I'd share a tip that helps me get the most out of GitHub. 
Don't just follow the projects that you're interested in &#8212; follow other users. Here's a list of people that I'm following. They're constantly turning me on to new and interesting projects, because I get to see [...]]]></description>
			<content:encoded><![CDATA[<p>Inspired by <a href="http://themomorohoax.com/2009/04/12/how-to-keep-up-with-ruby-7-people-to-follow-on-github">this post</a>, I thought I'd share a tip that helps me get the most out of <a href="http://github.com">GitHub</a>. </p>
<p>Don't just follow the projects that you're interested in &mdash; <i>follow other users</i>. Here's a list of people that <a href="http://github.com/trevorturk">I'm following</a>. They're constantly turning me on to new and interesting projects, because I get to see everything they're working on, and everything they're following. </p>
<p>&nbsp;</p>
<div class="followers">
<ul>
<li>
      <a href="http://github.com/technoweenie" rel="contact" title="technoweenie"><img alt="" height="24" src="http://www.gravatar.com/avatar/821395fe70906c8290df7f18ac4ac6cf?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/mattpolito" rel="contact" title="mattpolito"><img alt="" height="24" src="http://www.gravatar.com/avatar/f9961873414a964cb8aa6d81aa2e2293?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/ryanb" rel="contact" title="ryanb"><img alt="" height="24" src="http://www.gravatar.com/avatar/8dbf316d36ff66aad4869a4fc3cfbd37?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/rails" rel="contact" title="rails"><img alt="" height="24" src="http://www.gravatar.com/avatar/30f39a09e233e8369dddf6feb4be0308?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/engineyard" rel="contact" title="engineyard"><img alt="" height="24" src="http://www.gravatar.com/avatar/0acd291e0507eb03e5e6e961eddfa6b3?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/courtenay" rel="contact" title="courtenay"><img alt="" height="24" src="http://www.gravatar.com/avatar/6962eeda5d20190857026da4621b9f9f?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/defunkt" rel="contact" title="defunkt"><img alt="" height="24" src="http://www.gravatar.com/avatar/b8dbb1987e8e5318584865f880036796?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/thoughtbot" rel="contact" title="thoughtbot"><img alt="" height="24" src="http://www.gravatar.com/avatar/def5902fe210ca1cb5152621f1effc89?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/lifesnapz" rel="contact" title="lifesnapz"><img alt="" height="24" src="http://www.gravatar.com/avatar/8bd63181ef9f7e7f682a82b6196bcc0a?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/bmizerany" rel="contact" title="bmizerany"><img alt="" height="24" src="http://www.gravatar.com/avatar/1a250566b475961b9b36abf359950c76?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/ezmobius" rel="contact" title="ezmobius"><img alt="" height="24" src="http://www.gravatar.com/avatar/64193462abf6bab535b4e0eb7a260558?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/svenfuchs" rel="contact" title="svenfuchs"><img alt="" height="24" src="http://www.gravatar.com/avatar/402602a60e500e85f2f5dc1ff3648ecb?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/marcel" rel="contact" title="marcel"><img alt="" height="24" src="http://www.gravatar.com/avatar/aefec48f6f83b6ead722c625c8edf78b?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/NZKoz" rel="contact" title="NZKoz"><img alt="" height="24" src="http://www.gravatar.com/avatar/efa76b164a7de4a5730e4fa397cc4425?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/gbuesing" rel="contact" title="gbuesing"><img alt="" height="24" src="http://www.gravatar.com/avatar/e3e98bfa99e82ac8b0cb63660dc23b14?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/wycats" rel="contact" title="wycats"><img alt="" height="24" src="http://www.gravatar.com/avatar/428167a3ec72235ba971162924492609?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/mojombo" rel="contact" title="mojombo"><img alt="" height="24" src="http://www.gravatar.com/avatar/25c7c18223fb42a4c6ae1c8db6f50f9b?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/drnic" rel="contact" title="drnic"><img alt="" height="24" src="http://www.gravatar.com/avatar/cb2b768a5e546b24052ea03334e43676?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/github" rel="contact" title="github"><img alt="" height="24" src="http://www.gravatar.com/avatar/f63f20f3843f43fae28d77233e5db5d4?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/37signals" rel="contact" title="37signals"><img alt="" height="24" src="http://www.gravatar.com/avatar/349210726e1ce6aa21840f665749fe0d?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/mbleigh" rel="contact" title="mbleigh"><img alt="" height="24" src="http://www.gravatar.com/avatar/795160eca476a92b560a724869d3d942?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/lifo" rel="contact" title="lifo"><img alt="" height="24" src="http://www.gravatar.com/avatar/a05834e9b5954947eb0ba3b570c47d5e?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/dhh" rel="contact" title="dhh"><img alt="" height="24" src="http://www.gravatar.com/avatar/ed9635566b34ade32274f510f0f9a6d2?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/why" rel="contact" title="why"><img alt="" height="24" src="http://www.gravatar.com/avatar/76edd1c1ba31a43789fd42c90733f8b7?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/josh" rel="contact" title="josh"><img alt="" height="24" src="http://www.gravatar.com/avatar/bbe5dc8dcf248706525ab76f46185520?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/joshsusser" rel="contact" title="joshsusser"><img alt="" height="24" src="http://www.gravatar.com/avatar/9f0f89bbd9e1ecfbaab6584e429b7a2f?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/schacon" rel="contact" title="schacon"><img alt="" height="24" src="http://www.gravatar.com/avatar/9375a9529679f1b42b567a640d775e7d?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/mattetti" rel="contact" title="mattetti"><img alt="" height="24" src="http://www.gravatar.com/avatar/c69521d6e22fc0bbd69337ec8b1698df?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/zdzolton" rel="contact" title="zdzolton"><img alt="" height="24" src="http://www.gravatar.com/avatar/946696209f50381fc280e4c0a85cceb8?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/scottymac" rel="contact" title="scottymac"><img alt="" height="24" src="http://www.gravatar.com/avatar/b1fca7961834295e14e61dd389989cc1?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/chneukirchen" rel="contact" title="chneukirchen"><img alt="" height="24" src="http://www.gravatar.com/avatar/7264fb16beeea92b89bb42023738259d?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/bumi" rel="contact" title="bumi"><img alt="" height="24" src="http://www.gravatar.com/avatar/fd9aebbd7d8fcd1e7aa3838b49815635?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/jnunemaker" rel="contact" title="jnunemaker"><img alt="" height="24" src="http://www.gravatar.com/avatar/e13c31390e0369fcd5972292ce0e7b92?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/NickCampbell" rel="contact" title="NickCampbell"><img alt="" height="24" src="http://www.gravatar.com/avatar/54c1d4d9c1fadb93f045616682f9706d?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/yfactorial" rel="contact" title="yfactorial"><img alt="" height="24" src="http://www.gravatar.com/avatar/abaf52cd995f15b141560c4d001a8495?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/tobi" rel="contact" title="tobi"><img alt="" height="24" src="http://www.gravatar.com/avatar/94eb1850ba7cf818144aec68cf8f20aa?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/jamis" rel="contact" title="jamis"><img alt="" height="24" src="http://www.gravatar.com/avatar/992fe8c19bbbc27f2b562a9f96efc03d?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/FooBarWidget" rel="contact" title="FooBarWidget"><img alt="" height="24" src="http://www.gravatar.com/avatar/204784d162fece694532d2ef5cdc5ca5?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/nakajima" rel="contact" title="nakajima"><img alt="" height="24" src="http://www.gravatar.com/avatar/3399cbfb9e5fec93c324789b29309911?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/notahat" rel="contact" title="notahat"><img alt="" height="24" src="http://www.gravatar.com/avatar/c9c7a65848f13e2b1a226bbe43bc3672?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/rtomayko" rel="contact" title="rtomayko"><img alt="" height="24" src="http://www.gravatar.com/avatar/abfc88b96ae18c85ba7aac3bded2ec5e?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/mislav" rel="contact" title="mislav"><img alt="" height="24" src="http://www.gravatar.com/avatar/8f93a872e399bc1353cc8d4e791d5401?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/jeremymcanally" rel="contact" title="jeremymcanally"><img alt="" height="24" src="http://www.gravatar.com/avatar/6d3c187a8b3ef53b08e3e7e8572c4fea?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/mattly" rel="contact" title="mattly"><img alt="" height="24" src="http://www.gravatar.com/avatar/de032f4237a3c33f1557fe668bed37aa?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/dchelimsky" rel="contact" title="dchelimsky"><img alt="" height="24" src="http://www.gravatar.com/avatar/5d38ab152e1e3e219512a9859fcd93af?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/topfunky" rel="contact" title="topfunky"><img alt="" height="24" src="http://www.gravatar.com/avatar/a9d024f5032b8de04d7c74528beb77ab?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/mischa" rel="contact" title="mischa"><img alt="" height="24" src="http://www.gravatar.com/avatar/ff937b6907db49432c980f2b6a5c7e71?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/jeremy" rel="contact" title="jeremy"><img alt="" height="24" src="http://www.gravatar.com/avatar/24d2f8804e6bb4b7ea6bd11e0a586470?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/entp" rel="contact" title="entp"><img alt="" height="24" src="http://www.gravatar.com/avatar/a99bd98f4ed85c0cb1be50e9f1a46eae?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/rack" rel="contact" title="rack"><img alt="" height="24" src="http://www.gravatar.com/avatar/5f4c764ffac5f39a327ff00942a01515?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/sinatra" rel="contact" title="sinatra"><img alt="" height="24" src="http://www.gravatar.com/avatar/049b3d4227187b11c5c5ae4df472fda7?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/toconnell" rel="contact" title="toconnell"><img alt="" height="24" src="http://www.gravatar.com/avatar/3a435b21a323d931cd9a1c566de8c38b?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/jchris" rel="contact" title="jchris"><img alt="" height="24" src="http://www.gravatar.com/avatar/f73048cc21035713618d5ffa690001f4?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/adamwiggins" rel="contact" title="adamwiggins"><img alt="" height="24" src="http://www.gravatar.com/avatar/fcafc7eab67d34d48b14f9d70bc05713?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/giraffesoft" rel="contact" title="giraffesoft"><img alt="" height="24" src="http://www.gravatar.com/avatar/aefacc79816f2a05349cb22868d16ce3?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/iamwilhelm" rel="contact" title="iamwilhelm"><img alt="" height="24" src="http://www.gravatar.com/avatar/887ce7326836f3941ea12d7585386ba0?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/joshbuddy" rel="contact" title="joshbuddy"><img alt="" height="24" src="http://www.gravatar.com/avatar/c7e2ce5b40f683dfb6c1bdf5e6af0c72?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/binarylogic" rel="contact" title="binarylogic"><img alt="" height="24" src="http://www.gravatar.com/avatar/328f0bb678423fcea01ebe3b0edc74e6?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/methodmissing" rel="contact" title="methodmissing"><img alt="" height="24" src="http://www.gravatar.com/avatar/28314d64ae18c43f6b5428dc00a48e6e?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/DrBold" rel="contact" title="DrBold"><img alt="" height="24" src="http://www.gravatar.com/avatar/900a334a70ad697b08f30adf28267231?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/brynary" rel="contact" title="brynary"><img alt="" height="24" src="http://www.gravatar.com/avatar/535d73db0b47b6f745e9981e80dabdb4?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/igrigorik" rel="contact" title="igrigorik"><img alt="" height="24" src="http://www.gravatar.com/avatar/a17f0025641b4be419a6cd3845e55dd2?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/ajordan" rel="contact" title="ajordan"><img alt="" height="24" src="http://www.gravatar.com/avatar/c00720d07e1123b054935d0dcb2428ca?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/dejan" rel="contact" title="dejan"><img alt="" height="24" src="http://www.gravatar.com/avatar/0970bae1e752f9bafbddf62c07db66ad?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/grosser" rel="contact" title="grosser"><img alt="" height="24" src="http://www.gravatar.com/avatar/59436ecd4fe6ad7c34f67654d839f05f?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/actionrails" rel="contact" title="actionrails"><img alt="" height="24" src="http://www.gravatar.com/avatar/c644c5f20b9004567404677d9840589e?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/qrush" rel="contact" title="qrush"><img alt="" height="24" src="http://www.gravatar.com/avatar/eb8975af8e49e19e3dd6b6b84a542e26?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/jeresig" rel="contact" title="jeresig"><img alt="" height="24" src="http://www.gravatar.com/avatar/b3e04a46e85ad3e165d66f5d927eb609?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/ddollar" rel="contact" title="ddollar"><img alt="" height="24" src="http://www.gravatar.com/avatar/d7210ed93db93fbfa3de0c2215d83b9a?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
<li>
      <a href="http://github.com/Shopify" rel="contact" title="Shopify"><img alt="" height="24" src="http://www.gravatar.com/avatar/c5c29e455b8c4f05112abbc01af58a29?s=24&amp;d=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-24.png" width="24" /></a>
      </li>
</ul>
</div>
<p>Dig around the users that I follow, check out what they're been up to, and try it out. If you find that your feed becomes a bit much to manage, try subscribing to your personal RSS feed. There's a link on the home page when you're logged in. </p>
<p>Thanks, GitHub. You're the best. </p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/06/11/github-protip-follow-other-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatically Rotate your Log Files in Development</title>
		<link>http://almosteffortless.com/2009/06/11/automatically-rotate-your-log-files-in-development/</link>
		<comments>http://almosteffortless.com/2009/06/11/automatically-rotate-your-log-files-in-development/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 02:51:40 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Ruby/Rails]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1395</guid>
		<description><![CDATA[I'm trying to save hard drive space, since I've got this super small (and fast?) SSD hard drive on the way. I noticed that I was using a TON of space to store totally worthless logs for my Rails apps. Now, I know I could set up proper log rotation, but I don't feel like [...]]]></description>
			<content:encoded><![CDATA[<p>I'm trying to save hard drive space, since I've got this super small (and fast?) SSD hard drive on the way. I noticed that I was using a TON of space to store totally worthless logs for my Rails apps. Now, I know I could set up proper log rotation, but I don't feel like going through the trouble for my local machine. </p>
<p>Here's a quick tip I picked up <a href="http://marklunds.com/articles/one/410">here</a> that will set your logs to automatically rotate in the test and development environments. Just add the following line to these files:</p>
<ul>
<li>config/development.rb</li>
<li>config/test.rb</li>
</ul>
<pre>config.logger = Logger.new(config.log_path, 2, 20.megabytes)</pre>
<p>Make sure you've got these in your .gitignore file as well:</p>
<pre>/log/*
*.log</pre>
<p>That will keep your log files under control, but with plenty of room for digging in if need be. </p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/06/11/automatically-rotate-your-log-files-in-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speed up your Apache/Passenger Rails app in 2min</title>
		<link>http://almosteffortless.com/2009/06/11/speed-up-your-apachepassenger-rails-app-in-2min/</link>
		<comments>http://almosteffortless.com/2009/06/11/speed-up-your-apachepassenger-rails-app-in-2min/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 02:39:44 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Ruby/Rails]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1402</guid>
		<description><![CDATA[Here's a quick tip for speeding up your Apache/Passenger powered Rails app. It'll take you about 2 minutes, and I guarantee you'll notice the speed-up. 

SSH onto your VPS
Run the following commands: "a2enmod expires" and "a2enmod deflate"

Now, open up your Apache vhost config for your Rails app. Add the following:

Then, restart Apache by running: "/etc/init.d/apache2 [...]]]></description>
			<content:encoded><![CDATA[<p>Here's a quick tip for speeding up your Apache/Passenger powered Rails app. It'll take you about 2 minutes, and I guarantee you'll notice the speed-up. </p>
<ul>
<li>SSH onto your VPS</li>
<li>Run the following commands: "a2enmod expires" and "a2enmod deflate"</li>
</ul>
<p>Now, open up your Apache vhost config for your Rails app. Add the following:</p>
<p><script src="http://gist.github.com/128392.js"></script></p>
<p>Then, restart Apache by running: "/etc/init.d/apache2 restart"</p>
<p>This will gzip your html, css, and javascript. It'll also add far future expires headers for the appropriate cacheable filetypes. There's no downside, and it only takes a second. Bang for buck. </p>
<p><b>Edit</b>: Check the comments for some possible downsides... ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/06/11/speed-up-your-apachepassenger-rails-app-in-2min/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Weekly Digest, 6-11-09</title>
		<link>http://almosteffortless.com/2009/06/11/weekly-digest-6-11-09/</link>
		<comments>http://almosteffortless.com/2009/06/11/weekly-digest-6-11-09/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 02:09:12 +0000</pubDate>
		<dc:creator>Weekly Digest</dc:creator>
				<category><![CDATA[Weekly Digest]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1398</guid>
		<description><![CDATA[In this edition, Timothy moves to Washington DC and Trevor trims down his "watch list" on GitHub and shares many interesting projects with you via his delicious feed. 
Trevor's Links
Email. Twice daily. No more, no less.
So, using some motivation from The Four Hour Workweek1, I opted to come back to the studio and change my [...]]]></description>
			<content:encoded><![CDATA[<p>In this edition, Timothy moves to Washington DC and Trevor trims down his "watch list" on <a href="http://github.com/trevorturk">GitHub<a> and shares many interesting projects with you via his <a href="http://delicious.com/trevorturk">delicious</a> feed. </p>
<h3>Trevor's Links</h3>
<p><a href="http://www.robbyonrails.com/articles/2009/06/10/email-twice-daily-no-more-no-less">Email. Twice daily. No more, no less.</a></p>
<blockquote><p>So, using some motivation from The Four Hour Workweek1, I opted to come back to the studio and change my behavior. That morning, I emailed my entire team and my clients to let them know that I would only be checking my email at 10am and 4pm each day.</p></blockquote>
<p><a href="http://blog.linkibol.com/post/How-to-Build-a-Popularity-Algorithm-You-can-be-Proud-of.aspx">How to Build a Popularity Algorithm You can be Proud of</a></p>
<blockquote><p>Many web sites allow users to casts vote on items. These visitors' votes are then often used to detect the items' "popularity" and hence rank the rated items accordingly. And when "rank" comes into play things gets tricky...</p></blockquote>
<p><a href="http://forum.nin.com/bb/read.php?9,731489">Online communities, etc.</a></p>
<blockquote><p>Anyway, I'm bored on a long bus drive and there's no real moral to the story here, just writing. I will be tuning out of the social networking sites because at the end of the day it's now doing more harm than good in the bigger picture and the experiment seems to have yielded a result. Idiots rule.</p></blockquote>
<p><a href="http://marklunds.com/articles/one/410">Really Simple Rails Log Rotatation</a></p>
<blockquote><p>I always used logrotate Linux tool to setup log rotation for my Rails apps which has worked fine although it required finding some external config file and understanding its config options and syntax. [Great tip for development/test environments. Might not be a good idea in production?]</p></blockquote>
<p><a href="http://justinblanton.com/2009/03/instapaper-bookmarklet">Instapaper bookmarklet, modified to close the current tab</a></p>
<blockquote><p>I modified the bookmarklet slightly so that the tab closes immediately, without disturbing the pop-up. This way, saving something for later is one simple action, instead of two.</p></blockquote>
<p><a href="http://delicioussafari.com/">DeliciousSafari</a></p>
<blockquote><p>Use and create Delicious bookmarks from the Safari web browser.</p></blockquote>
<p><a href="http://blog.leetsoft.com/2009/6/2/so-about-this-shopify-platform">So, about this Shopify Platform</a></p>
<blockquote><p>The Shopify platform allows any programmer to create applications that integrate natively with the administration interface or storefront. These applications can be written in any language and communicate with Shopify using our handcrafted REST API. We even provide some amazing rails generators to get started quickly.</p></blockquote>
<p><a href="http://jamesgolick.com/2009/6/4/introducing-trample-a-better-load-simulator.html">Introducing Trample: A Better Load Simulator</a></p>
<blockquote><p>Most load sim tools make requests to a static list of urls. They spawn n threads and make requests to the urls on the list in succession, in each thread. Unfortunately, though, if your applicaition makes use of any kind of caching (including your database's internal caching facilities), this kind of load simulation is unrealistic.</p></blockquote>
<p><a href="http://www.tosback.org/timeline.php">TOSBack | The Terms-Of-Service Tracker</a></p>
<blockquote><p>TOSBack keeps an eye on 44 website policies. Every time one of them changes, you'll see an update here.</p></blockquote>
<p><a href="http://blog.twitter.com/2009/06/not-playing-ball.html">Twitter Blog: Not Playing Ball</a></p>
<blockquote><p>We do recognize an opportunity to improve Twitter user experience and clear up confusion beyond simply removing impersonation accounts once alerted. We'll be experimenting with a beta preview of what we're calling Verified Accounts this summer.</p></blockquote>
<p><a href="http://code.google.com/p/cdto/">cdto</a></p>
<blockquote><p>Fast mini application that opens a Terminal.app window cd'd to the front most finder window. This app is designed (including it's icon) to placed in the finder window's toolbar.</p></blockquote>
<h3>Trevor's GitHub Links</h3>
<p><a href="http://github.com/quirkey/sammy/tree/master">quirkey's sammy</a></p>
<blockquote><p>Sammy is a tiny javascript framework built on top of jQuery inspired by Ruby's Sinatra.</p></blockquote>
<p><a href="http://github.com/kabuki/heresy/tree/master">kabuki's heresy</a></p>
<blockquote><p>Heresy is a schema free wrapper around your database, heavily inspired by both CouchDB and FriendFeed.</p></blockquote>
<p><a href="http://github.com/paulmars/seven_minute_abs/tree/master">paulmars's seven_minute_abs</a></p>
<blockquote><p>ab testing for rails</p></blockquote>
<p><a href="http://github.com/binarylogic/searchlogic/tree/v2">binarylogic's searchlogic at v2</a></p>
<blockquote><p>Searchlogic has been completely rewritten for v2. It is much simpler and has taken an entirely new approach. To give you an idea, v1 had ~2300 lines of code, v2 has ~350 lines of code.</p></blockquote>
<p><a href="http://github.com/semanticart/is_paranoid/tree/master">semanticart's is_paranoid</a></p>
<blockquote><p>ActiveRecord 2.3 compatible gem "allowing you to hide and restore records without actually deleting them." Yes, like acts_as_paranoid, only implemented differently...</p></blockquote>
<p><a href="http://github.com/brynary/webrat/tree/master">brynary's webrat</a></p>
<blockquote><p>Webrat - Ruby Acceptance Testing for Web applications.</p></blockquote>
<p><a href="http://github.com/mbleigh/twitter-auth/tree/master">mbleigh's twitter-auth</a></p>
<blockquote><p>Standard authentication stack for Rails using Twitter to log in.</p></blockquote>
<p><a href="http://github.com/courtenay/splam/tree/master">courtenay's splam</a></p>
<blockquote><p>Simple, pluggable, easily customizable score-based spam filter plugin for Ruby-based applications.</p></blockquote>
<p><a href="http://github.com/jeremy/ruby-prof/tree/master">jeremy's ruby-prof</a></p>
<blockquote><p>a fast code profiler for Ruby</p></blockquote>
<p><a href="http://github.com/nakajima/roleful/tree/master">nakajima's roleful</a></p>
<blockquote><p>Generic roles for you and your objects.</p></blockquote>
<p><a href="http://github.com/37signals/wysihat/tree/master">37signals's wysihat</a></p>
<blockquote><p>A WYSIWYG JavaScript framework</p></blockquote>
<p><a href="http://github.com/binarylogic/authlogic/tree/master">binarylogic's authlogic</a></p>
<blockquote><p>A clean, simple, and unobtrusive ruby authentication solution.</p></blockquote>
<p><a href="http://github.com/joshuaclayton/blueprint-css/tree/master">joshuaclayton's blueprint-css</a></p>
<blockquote><p>A CSS framework that aims to cut down on your CSS development time.</p></blockquote>
<p><a href="http://github.com/stephencelis/dots/tree/master">stephencelis's dots</a></p>
<blockquote><p>Free progress dots for your scripts. Test::Unit-style.</p></blockquote>
<p><a href="http://github.com/wycats/merb-extlib/tree/master">wycats's merb-extlib</a></p>
<blockquote><p>Ruby core extensions library extracted from Merb core.</p></blockquote>
<p><a href="http://github.com/jodosha/plugin_migrations/tree/master">jodosha's plugin_migrations</a></p>
<blockquote><p>Rake tasks for running plugin migrations.</p></blockquote>
<p><a href="http://github.com/tcocca/acts_as_follower/tree/master">tcocca's acts_as_follower</a></p>
<blockquote><p>A Plugin to add "Follow" functionality for models</p></blockquote>
<p><a href="http://github.com/mojodna/active_queue/tree/master">mojodna's active_queue</a></p>
<blockquote><p>A toolkit for queueing tasks and creating worker processes</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/06/11/weekly-digest-6-11-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weekly Digest, 5-31-09</title>
		<link>http://almosteffortless.com/2009/05/31/weekly-digest-5-31-09/</link>
		<comments>http://almosteffortless.com/2009/05/31/weekly-digest-5-31-09/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 02:42:04 +0000</pubDate>
		<dc:creator>Weekly Digest</dc:creator>
				<category><![CDATA[Weekly Digest]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1387</guid>
		<description><![CDATA["Weekly" ]]></description>
			<content:encoded><![CDATA[<p>"Weekly" <- in scare-quotes</p>
<h3>Trevor's Links</h3>
<p><a href="http://factoryjoe.com/blog/2009/05/26/stowe-boyd-launches-microsyntax-org/">Stowe Boyd launches Microsyntax.org</a></p>
<blockquote><p>Stowe Boyd launched Microsyntax.org... a number of ideas for making posts on Twitter contain more information than what is superficially presented, and this new effort should create a space in which ideas, research, proposals and experiments can be made and discussed.</p></blockquote>
<p><a href="https://payments.amazon.com/sdui/sdui/business?sn=paynow/subscription">Amazon Payments Account Management</a></p>
<blockquote><p>Amazon Simple Pay Subscriptions enables you to charge your customers on a recurring basis using a single authorization from the customer. It is for those who offer digital content subscriptions, collect membership dues on a periodic basis, or provide premium services on their website.</p></blockquote>
<p><a href="http://www.siliconvalleywatcher.com/mt/archives/2009/05/7_great_reasons.php">7 Great Reasons Not To Take VC Money</a></p>
<blockquote><p>Raising venture capital for early stage start-ups seems to be the prevailing path for most entrepreneurs; however, most would-be founders should reconsider.</p></blockquote>
<p><a href="http://jcs.biologists.org/cgi/content/full/121/11/1771">The importance of stupidity in scientific research</a></p>
<blockquote><p>The crucial lesson was that the scope of things I didn't know wasn't merely vast; it was, for all practical purposes, infinite. That realization, instead of being discouraging, was liberating. If our ignorance is infinite, the only possible course of action is to muddle through as best we can.</p></blockquote>
<p><a href="http://themomorohoax.com/2009/05/21/when-to-use-self-in-ruby-rails-models">When to use self in Rails models</a></p>
<blockquote><p>When I started with Rails, half the words in my models were self. This wasn’t necessary. Now, when I edit code by other people, I find myself constantly deleting “self” from their code.</p></blockquote>
<p><a href="http://themomorohoax.com/2009/05/21/ruby-code-should-be-as-clear-as-english-the-guy-on-the-street-test">The random person test</a></p>
<blockquote><p>Why not try to write code that future programmers will thank me for because it was so clear and obvious? Programmer skill should be measured not only in the complexity of the problems that they can solve, but in the clarity of their solutions.</p></blockquote>
<p><a href="http://www.contrast.ie/blog/patience-and-hard-work/">Patience and hard work</a></p>
<blockquote><p>There is a gaping chasm between a web app sitting on a server somewhere, and the ingredients of a business. Establishing a brand, getting the right kind of people to listen, and growing your own customer-base doesn’t happen as a by product of really sweet Javascript effects.</p></blockquote>
<p><a href="http://radar.oreilly.com/2009/05/google-wave-what-might-email-l.html">Google Wave: What Might Email Look Like If It Were Invented Today</a></p>
<blockquote><p>Google wants other providers to adopt Wave - the protocol allows federation between independent Wave clouds. The team hopes that Wave will become as ubiquitous and interoperable as email and instant messaging, not just a Google product.</p></blockquote>
<p><a href="http://news.ycombinator.com/item?id=629040">Ask HN: I'm Tired of Hacking. What Do I Do? Please Advise.</a></p>
<blockquote><p>I just can't do it anymore. I hate sitting on my ass all day writing some code. My neck has been hurting for two years for spending so many hours in front of the computer. I kind of have been hating my career for a couple of years now and I have no clue about what I should do.</p></blockquote>
<p><a href="http://merbist.com/2009/05/27/macruby-changing-the-ruby-ecosystem/">MacRuby, changing the Ruby ecosystem</a></p>
<blockquote><p>MacRuby is an Apple-sponsored, open source, full Ruby implementation on top of  Objective-C runtime. In other words, whatever code runs on Ruby 1.9, should/will run on MacRuby. Yes, you read correctly, MacRuby can/will be able to run all your Ruby code.</p></blockquote>
<p><a href="http://www.bitcetera.com/en/techblog/2009/05/27/mac-friendly-autotest/">Mac-friendly Autotest</a></p>
<blockquote><p>ZenTest’s autotest is great, but it has one drawback: In order to detect whether you have modified a file, it relies on filesystem polling. In other words it constantly traverses the filesystem and thus causes a lot of CPU and harddrive load.</p></blockquote>
<p><a href="http://railstips.org/2009/5/15/include-verse-extend-in-ruby">Include vs Extend in Ruby</a></p>
<blockquote><p>Now that we know the difference between an instance method and a class method, let’s cover the difference between include and extend in regards to modules. Include is for adding methods to an instance of a class and extend is for adding class methods. Let’s take a look at a small example.</p></blockquote>
<p><a href="http://railstips.org/2009/5/11/class-and-instance-methods-in-ruby">Class and Instance Methods in Ruby</a></p>
<blockquote><p>Class methods can only be called on classes and instance methods can only be called on an instance of a class. It’s simple when you understand it, but I remember being confused when I was learning Ruby. Hope this helps. If I was unclear or incorrect at any point above, let me know. [Nice, easy to follow overview.]</p></blockquote>
<p><a href="http://simonwillison.net/2009/May/19/djng/">djng—a Django powered microframework</a></p>
<blockquote><p>djng is my experiment to see what Django would like without settings.py and with a whole lot more turtles. It’s Yet Another Python Microframework.</p></blockquote>
<p><a href="http://www.holovaty.com/writing/django-two-phased-rendering/">Django tip: Caching and two-phased template rendering</a></p>
<blockquote><p>We've launched user accounts at EveryBlock and we faced the interesting problem of needing to cache entire pages except for "You're logged in as [username]" bit top page. The solution ended up using is two-phased template rendering.</p></blockquote>
<p><a href="http://www.scribd.com/doc/3188436/Assembling-Pages-Last-Edge-Caching-ESI-and-Rails">Assembling Pages Last: Edge Caching, ESI and Rails</a></p>
<blockquote><p>[Good overview of ESI pros/cons.]</p></blockquote>
<p><a href="http://factoryjoe.com/blog/2009/05/18/the-open-social-web/">The open, social web</a></p>
<blockquote><p>If I told you that the iPhone was the best example of the success of standards and open source, you’d probably laugh at me, but check it out...</p></blockquote>
<h3>Timothy's Links</h3>
<p><a href="http://hostingfu.com/article/server-monitoring-cacti-serverstats">Server Monitoring with Cacti + ServerStats | HostingFu</a></p>
<blockquote><p>This is kind of cool: if you've got a computer somewhere on your local network and you want the laity to have access to rough stats, all you've got to do is fire this package up, tweak xinetd a little bit, and voila--your boss can look over your shoulder from the comforts of his own office.</p></blockquote>
<p><a href="http://www.slicehost.com/articles/2009/5/19/slicehost-for-android">Slicehost for Android // Slicehost - VPS Hosting</a></p>
<blockquote><p>Trevor pointed me in the direction of this one. It's a neat little app--very minimalist and very Linux-y--that lets you check on your bandwidth, slice stats (e.g. mem/proc/distro name and version) and gives you the option to do a remote /sbin/poweroff or an /sbin/shutdown -h now. Very neat.</p></blockquote>
<p><a href="http://threatpost.com/blogs/research-password-secret-question-woefully-insecure">Research: Password 'secret question' woefully insecure</a></p>
<blockquote><p>Let's get a movement going here: if enough Internet types spread the word that no one in their right mind or who possesses any kind of meaningful credential endorses "secret questions" and that, in fact, the research shows that they make accounts _less_ secure, maybe we can kick up enough dust to get rid of them.</p></blockquote>
<p><a href="http://www.cmdln.org/2009/05/19/three-letters/">Three Letters</a></p>
<blockquote><p>This take on the classic joke has a sysadmin slant; guaranteed to be appreciated by everyone from Exchange rebooters in silk cravats to consolemen who live on the metal.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/05/31/weekly-digest-5-31-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Samba: change a Windows user’s hashed password. And then change it back.</title>
		<link>http://almosteffortless.com/2009/05/21/samba-change-a-windows-users-hashed-password-and-then-change-it-back/</link>
		<comments>http://almosteffortless.com/2009/05/21/samba-change-a-windows-users-hashed-password-and-then-change-it-back/#comments</comments>
		<pubDate>Thu, 21 May 2009 16:54:36 +0000</pubDate>
		<dc:creator>Timothy O'Connell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1379</guid>
		<description><![CDATA[File this one under "hacks". Cross-list it under "more basic administrative tasks you can't do on Windows".
Here's the situation: you're the admin of a Windows domain where the Domain Controller is a Linux box serving Samba. Your problem, other than the fact that you're surrounded by Windows users, is that you've got a user who's [...]]]></description>
			<content:encoded><![CDATA[<p>File this one under "hacks". Cross-list it under "more basic administrative tasks you can't do on Windows".</p>
<p>Here's the situation: you're the admin of a Windows domain where the Domain Controller is a Linux box serving Samba. Your problem, other than the fact that you're surrounded by Windows users, is that you've got a user who's password you don't know and, for whatever reason, you need to log onto your Windows domain <em>as</em> that user: a simple <em>RUNAS</em> won't cut it this time. </p>
<p>Normally, you'd just nuke his password, change it to "password" (or whatever), log on as him, do your dirty, sinful business, log off, expire his password and then send him an email telling him that his password has been changed to "password" and that he'll be prompted to change it at his next log on.</p>
<p>But what if that wasn't an option? What if you needed to log on to your domain as that user and it was important that he be none the wiser?</p>
<h2>Grab the Hashes</h2>
<p>First, use your favorite smbldap-type tool to get the current password info on the user you're fixin' to use:
<pre>frances:~# smbldap-usershow toconnell
<strong>dn: uid=toconnell,ou=Users,dc=domain,dc=com</strong>
objectClass: top,person,organizationalPerson,inetOrgPerson,posixAccount,shadowAccount,sambaSamAccount
cn: toconnell
sn: toconnell
givenName: toconnell
uid: toconnell
uidNumber: 1007
[...]
sambaPwdCanChange: 1202398556
sambaPwdMustChange: 9223372036854775807
<strong>sambaLMPassword: BE41CD009FF0812C718CCFD7D98A52AA
sambaNTPassword: 9454453CBC8A48DEF442F6B0A10B3EAA</strong>
sambaPwdLastSet: 1202398556
<strong>userPassword: {SSHA}baSDvXS6C6DSBNkJGyEYplprZ3wslAa/</strong></pre>
<p>Copy everything that's bolded and stick it somewhere safe. That <em>dn</em> information is going to be necessary later on, as it contains the ldap tags that you'll need to specify the record you want to modify; those hashes at the bottom are the user's original passwords and, when you want to cover your tracks later on, you'll need that info.</p>
<p>Now that you've got those hashes, you're free to nuke the user's password (again, using your favorite smbldap-type-tool or however else you like to reset passwords), log in as him, do whatever you have to do, and then log out:
<pre>frances:~# smbldap-passwd toconnell
Changing UNIX and samba passwords for toconnell
New password:
Retype new password:
</pre>
<p>Once you're out, you're going to want to set his password back to what it once was. This is where <em>ldapmodify</em> comes into play.</p>
<h2>Kerberos</h2>
<p>Before you can do that, however, you'll need to get a <em>kerberos</em> ticket. This is because you'll need to be <em>kerberos</em>-authenticated to make your ldap modifications stick. So, first things first, get yourself an admin <em>kerberos</em> ticket:
<pre>frances:~# kinit toconnell/admin
Password for toconnell/admin@DOMAIN.COM:
frances:~# </pre>
<h2>ldapmodify</h2>
<p>A quick glance at the man page for <em>ldapmodify</em> shows that the most convenient way to make changes to an ldap entry is to use the <em>-f</em> flag and an input file. The example in the man page for how to construct the input file is this:
<pre> dn: cn=Modify Me,dc=example,dc=com
           changetype: modify
           replace: mail
           mail: modme@example.com
           -
           add: title
           title: Grand Pooba</pre>
<p>So, using the data we got above, we're going to make a similar file containing the original hashes from our target user in order to change his password back to what it used to be:
<pre>dn: uid=toconnell,ou=Users,dc=domain,dc=com
changetype: modify
replace: sambaLMPassword
sambaLMPassword: BE41CD009FF0812C718CCFD7D98A52AA
-
replace: sambaNTPassword
sambaNTPassword: 9454453CBC8A48DEF442F6B0A10B3EAA</strong>
-
replace: userPassword
userPassword: {SSHA}abSDvXS6C6DSBNkJGyEYplprZ3wslAa/</pre>
<p>Remember to include those "-" characters and to give them their own line: if you fail to do that, you'll get mystery errors about unknown types, etc.</p>
<p>Once you've got your file, fire off your changes like this:
<pre>ldapmodify -f /path/to/file</pre>
<p>And that's all you've got to do. When the original user attempts to log in with his old password, everything will look perfectly normal to him: you never saw his password in plaintext and, as far as he's concerned, none of this ever happened.</p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/05/21/samba-change-a-windows-users-hashed-password-and-then-change-it-back/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Weekly Digest, 5-17-09</title>
		<link>http://almosteffortless.com/2009/05/17/weekly-digest-5-17-09/</link>
		<comments>http://almosteffortless.com/2009/05/17/weekly-digest-5-17-09/#comments</comments>
		<pubDate>Mon, 18 May 2009 02:55:44 +0000</pubDate>
		<dc:creator>Weekly Digest</dc:creator>
				<category><![CDATA[Weekly Digest]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1375</guid>
		<description><![CDATA[Trevor's Links
Interview with Ian Hickson, editor of the HTML 5 specification
You’ve heard it’s coming in 2012. Or maybe 2022. It’s certainly not ready yet, but some parts are already in browsers now so for the standards-savvy developers, the future is worth investigating today. Ian “Hixie” Hickson, editor of the HTML 5 specification, hopes that the [...]]]></description>
			<content:encoded><![CDATA[<h3>Trevor's Links</h3>
<p><a href="http://www.webstandards.org/2009/05/13/interview-with-ian-hickson-editor-of-the-html-5-specification/">Interview with Ian Hickson, editor of the HTML 5 specification</a></p>
<blockquote><p>You’ve heard it’s coming in 2012. Or maybe 2022. It’s certainly not ready yet, but some parts are already in browsers now so for the standards-savvy developers, the future is worth investigating today. Ian “Hixie” Hickson, editor of the HTML 5 specification, hopes that the spec will go to Last Call Working Draft in October this year.</p></blockquote>
<p><a href="http://www.rubyinside.com/the-mega-railsconf-2009-round-up-1757.html">The Mega RailsConf 2009 Round Up</a></p>
<blockquote><p>A week ago, RailsConf 2009 kicked off in Las Vegas. As usual, it didn't fall short on drama, interesting sessions, and inspiration for the 1000+ attendees. This post is an after-event summary and long-term source of links to the best RailsConf 2009 related content found so far.</p></blockquote>
<p><a href="http://www.37signals.com/svn/posts/1728-nuts-bolts-campfire-loves-erlang">Nuts & Bolts: Campfire loves Erlang</a></p>
<blockquote><p>Erlang definitely isn’t a replacement for Rails, but it is a fantastic addition to our collective toolbox for problems that Rails wasn’t designed to address. It’s always easier to work with the grain than against it, and adding more tools makes that more likely.</p></blockquote>
<p><a href="http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines">Tango Icon Theme Guidelines</a></p>
<blockquote><p>The Tango icon theme's goal is to make applications not seem alien on any desktop. A user running a multiplatform application should not have the impression that the look is unpolished and inconsistent with what he or she is used to. While this isn't about merging styles of all desktop systems, we do aim to not be drastically different on each platform.</p></blockquote>
<p><a href="http://lifehacker.com/5240827/rightzoom-makes-the-os-x-maximize-button-more-like-windows">RightZoom Makes the OS X Maximize Button More Like Windows</a></p>
<blockquote><p>Mac OS X only: System utility RightZoom runs in the background and modifies the OS X maximize behavior to fill the whole screen—perfect for readers that recently made the switch to Mac.</p></blockquote>
<p><a href="http://railscasts.com/episodes/158-factories-not-fixtures">Railscasts - Factories not Fixtures</a></p>
<blockquote><p>Fixtures are external dependencies which can make tests brittle and difficult to read. In this episode I show a better alternative using factories to generate the needed records. [I prefer Machinist to Factory Girl, but this is a particularly good episode all around.]</p></blockquote>
<p><a href="http://github.com/rails/rails/commit/4932f7b38f72104819022abca0c952ba6f9888cb">db/seeds.rb in Rails</a></p>
<blockquote><p>Added db/seeds.rb as a default file for storing seed data for the database. Can be loaded with rake db:seed (or created alongside the db with db:setup). (This is also known as the "Stop Putting Gawd Damn Seed Data In Your Migrations" feature) [DHH]</p></blockquote>
<h3>Timothy's Links</h3>
<p><a href="http://www.matasano.com/log/1674/the-security-implications-of-google-native-client/">The Security Implications Of Google Native Client</a></p>
<blockquote><p>This is a really cool from Matasano about how things like ActiveX and Java work from the perspective of someone trying to execute compiled code from a remote source without giving away the whole store, security-wise. Nice pictures, very informative.</p></blockquote>
<p><a href="http://www.debianadmin.com/how-to-add-date-and-time-to-your-bash-history-file.html">How to Add Date And Time To Your Bash History file -- Debian Admin</a></p>
<blockquote><p>This is a neat one-liner for your .bashrc that just might make your .bash_history a little more searchable. Add it to your custom .bashrc lines.</p></blockquote>
<p><a href="http://www.irbs.net/internet/postfix/0608/1651.html">Postfix main.cf analysis</a></p>
<blockquote><p>Here's the setup: the one dude pastes his postconf -n and the other dude does through it, telling him what's what. Kind of a cross between a postmortem and an x-ray. Useful to test your postfix knowledge/skills.</p></blockquote>
<p><a href="http://seerofsouls.com/wiki/How-Tos/SplitScreenVi">SoS Wiki - - Split Screen Vi</a></p>
<blockquote><p>If you use vi/vim and you don't do split screen, you are, in the immortal words of whatever Internet meme, doing it wrong. Study up!</p></blockquote>
<p><a href="http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/">Set Gmail as Default Mail Client in Ubuntu :: the How-To Geek</a></p>
<blockquote><p>This is a neat little trick for writing a line or two of bash that will allow you to use gmail (via firefox) as your default email client in a gnome environment. It wouldn't take much to adapt the instructions for other desktop environments. (Props to Artie for sending this my way)</p></blockquote>
<p><a href="http://www.securityfocus.com/brief/957">Reports: Thief holds Virginia medical data ransom</a></p>
<blockquote><p>I guess, technically, that since I'm on the side of the law by virtue of my professional situation, I ought to regard this as terrifying or reprehensible or something. But you gotta admit: something about the idea of a blackhat utterly pwning someone's network to the extent of the pwnage described here is really, really exciting.</p></blockquote>
<p><a href="http://www.cyberciti.biz/faq/postfix-backup-mx-server-anti-spam/">Postfix Backup MX eMail Server Anti-Spam Configuration</a></p>
<blockquote><p>The English is a little messy on this one, but the conf text is right on. This is a nice little list of basic (yet above and beyond "stock") config options for reducing shenanigans and closing commonly exploited gaps.</p></blockquote>
<p><a href="http://snippets.dzone.com/posts/show/4819">Restore a single table from a large MySQL backup</a></p>
<blockquote><p>I'm not sure that I understand the ruby syntax completely, but people are passing this link around, so this is my obligatory bump.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/05/17/weekly-digest-5-17-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stupid Linux Tricks: Basic Server Hardening (Debian Lenny)</title>
		<link>http://almosteffortless.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/</link>
		<comments>http://almosteffortless.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/#comments</comments>
		<pubDate>Fri, 15 May 2009 21:02:22 +0000</pubDate>
		<dc:creator>Timothy O'Connell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1353</guid>
		<description><![CDATA[Due to recent events involving some computers I administer, I've become very interested in security. Basically, I've dodged enough bullets thanks to little more than beginner's luck and I figure that it's about time to take responsibility for the safety and security of my computers. 
Since I was interested in hardening up two Debian boxes [...]]]></description>
			<content:encoded><![CDATA[<p>Due to recent events involving some computers I administer, I've become very interested in security. Basically, I've dodged enough bullets thanks to little more than beginner's luck and I figure that it's about time to take responsibility for the safety and security of my computers. </p>
<p>Since I was interested in hardening up two Debian boxes running Lenny, I started off by taking a look at the <a href="http://www.debian.org/doc/manuals/securing-debian-howto/securing-debian-howto.en.ps">Securing Debian Manual</a>, <a href="http://www.linuxquestions.org/questions/linux-security-4/security-references-45261/">this very helpful page on LQ</a> and the results of a <em>tiger</em> audit. </p>
<p>Do this to generate a tiger audit of your server:
<pre># aptitude install tiger
tiger -E</pre>
<p>The "-E" gets you what's called an "explanation report", which will be useful in helping you understand what can be some fairly cryptic output.</p>
<p>Additionally, the package version of <em>tiger</em> comes with some nice default settings for the main executable and for <em>tigercron</em>, which, as you might imagine, runs some minor scans on a pre-defined schedule. </p>
<p>At any rate, once I had my audit and had picked up a few bright ideas from the SDM, I made a number of changes to all of my web-facing production machines. What follows are some things that you might want to consider doing on your Debian Lenny servers:</p>
<h3><strong>Users and Permissions</strong></h3>
<ol>
<li><strong>Password Audit:</strong> first, I decided to get to know my user accounts a little better. This meant running <em>john</em> (formerly "john the ripper", a password cracker that reads hashed passwords and tries to decipher them) against my <em>/etc/shadow</em> to see who was using dictionary-based passwords and who was using other types of insecure passwords:
<pre># aptitude install john
# john /etc/shadow </pre>
<p>This took a while to run--a little over a day, but I had it <em>nice</em>d pretty high--but of the 10 user accounts it cracked, it was good to know which ones were using hilariously insecure passwords and which ones probably weren't going to cracked by your garden variety brute force password cracker. </li>
<p><strong>NB:</strong> if you run <em>john</em> against your <em>/etc/shadow</em> and realize that you've got a problem child on your hands, there's always <em>chroot</em>. Here is <a href="http://www.howtoforge.com/chroot_ssh_sftp_debian_etch">a really good how-to on chroot-jailing</a> a user.</p>
<li><strong>The Prunening:</strong> odds are, if you've been living on a system for more than a few months, you've accumulated some users (either from software that you've installed and then removed or by meeting user/developer needs, etc.) that aren't doing anything. One of the basic tenets of server security is having the smallest amount of users with the least amount of access to the smallest number of programs possible.
<p>In some environments, you've simply got to have a bunch of users in your <em>/etc/passwd</em>. In most situations, however, it makes good sense to just hit all the derelicts with a <em>userdel</em> and only having to worry about angry users not having enough access (rather than having to worry about unauthorized users having too much access).</li>
</ol>
<h3>Keeping Script Kiddies Under Control</h3>
<p>In my (admittedly limited) experience, the most trouble you're going to run into from script kiddies are anonymous, unfocused attacks that attempt to gain access to your machine via either a.) the <em>/tmp</em> directory, b.) DoS-based exploints or c.) application attacks like SQL injections, XSS or directory traversal attacks. </p>
<p>Since guarding against application attacks is something that programmers are supposed to be handling, I decided to focus on stopping <em>/tmp</em> abuse and trying to stymie DoS attacks.</p>
<ol>
<li><strong>Mounting <em>/tmp</em> with <em>noexec</em></strong>: in this age of VPSes and shared hosting, it's more often the case than not that you won't get to decide how your machine is partitioned. If, like me, you live on <a href="http://slicehost.com">Slicehost</a> and you're running Debian, your partition scheme looks like this:
<pre>lana:/# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              19G  9.0G  8.9G  51% /
tmpfs                 256M     0  256M   0% /lib/init/rw
udev                  256M   20K  256M   1% /dev</pre>
<p>What this means is that you've got your  <em>/tmp</em> directory on your <em>/</em> partition. Which partition is, by necessity, allows files to be executable.</p>
<p>And that, as I have learned (the hard way), is bad news. What this means is that, you've got a directory on your <em>/</em> partition--the partition where all your apps and data probably live--that is writable/readable by every Li, Ivan and Harry from Taipei to Yaktusk. And if one of the thousands of bots who knocks on your door every month knows how to write to <em>/tmp</em> and you don't catch him right away, it's pretty much game over for your TLD or your IP Address: one day, you'll wake up and find that your info is on every spam list on the Internet because your server has been under remote control via IRC for the last three weeks and now your full time job is trying to get your info <em>off</em> of those lists while planning a full OS re-install.</p>
<p>Ideally, you would be able <em>/tmp</em> its own partition and mount that partition with <i>noexec</i>. And while it would be optimal, it sometimes isn't an option if you're a part of the VPS set. </p>
<p>And if you can't control your installation or maybe you just can't take down a production server, what you can do is warn your users/developers that you're about to cause a little temporary chaos (get it? <em>temporary</em> chaos?), move your existing <em>/tmp</em> to some place else and create a small filesystem that you <em>can</em> mount <em>noexec</em> to use as <em>/tmp</em>. On Debian Lenny, that would look approximately like this:
<pre>gonzo:/# mv /tmp /old_tmp
# dd if=/dev/zero of=/.tmpfs bs=1024 count=1000000
1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB) copied, 29.1302 s, 35.2 MB/s
gonzo:/# mkfs.ext3 -j .tmpfs
[...]
gonzo:/# mount -o loop,noexec,nosuid,rw /.tmpfs /tmp/
gonzo:/# mv /old_tmp/* /tmp/.</pre>
<p><em>Et voila!</em> You've got a 1GB "drive" that's mounted <em>noexec</em> at <em>/tmp</em> that's ready to roll out. Any attempts to execute anything on that partition will result in a bad interpreter error. Check it:
<pre>gonzo:/# ls -l tmp/
total 20
-rwxr-xr-x 1 root root    37 2009-05-15 14:54 executeMe.py
drwx------ 2 root root 16384 2009-05-15 14:51 lost+found
gonzo:/# test/executeMe.py
bash: test/executeMe.py: /usr/bin/env: bad interpreter: Permission denied</pre>
<p>All you've got to do now is add that mount info to your <em>fstab</em> and you're ready to start sleeping at night again:
<pre>/.tmpfs           /tmp            ext3    loop,nosuid,noexec,rw  0      0</pre>
<p><strong>NB:</strong> don't forget that <em>/tmp</em> wants to have the sticky bit turned on (i.e. be chmoded to 1777). Also don't forget to make <em>/var/tmp</em> a symlink that points to <em>/tmp</em>.<br />
Also: props to <a href="http://blogs.techrepublic.com.com/opensource/?p=171">Vincent Danen's post on <em>/tmp</em></a> at TechRepublic for the idea.
</li>
<li><strong>mod_evasive to Prevent DoS</strong>: after a recent DoS experience, I decided to install Apache <em>mod_evasive</em> to reduce the risk of getting flat-lined/broad-sided by DoS/DDoS attacks:
<pre># aptitude install libapache2-mod-evasive</pre>
<p>The beauty of using packaged software is that that's really all you have to do: <em>apt</em> will copy the files, create the symbolic links and restart apache for you. Nice.</li>
<li><strong>sysctl real-time kernel Modifications:</strong> Additionally, you might also want to use a slightly obscure command called <em>sysctl</em> (which modifies kernel perameters while the kernel is running, so consider yourself warned) to take a precaution against a DoS tactic called "syn flooding":
<pre># sysctl -w net.ipv4.tcp_syncookies=1</pre>
<p>This is a sort of controversial measure--apparently it defies some RFC docs for TCP/IP--but setting <em>tcp_syncookies</em> to False has yet to have affected any of my computers.</p>
<p>There are a number of additional security features you can activate with this command; Google it and prepared to be awed by some of the features of your OS you can control in real-time with <em>sysctl</em>.</li>
</ol>
<h3>For the Tin-foil Hat Crowd</h3>
<p>What follows are non-specific countermeasures and settings that, while obscure and probably unlikely to save you from becoming an unwitting member of some Russian bot master's herd, might help you feel more secure in the knowledge that even if someone does get non-root shell access, he's probably not going to be able to do too much damage.</p>
<ol>
<li><strong>Add <code>/usr/bin/mesg n</code> to <em>root</em>'s <em>.bashrc</em> File:</strong><br />
executing <em>mesg n</em> on log in, prevents an admittedly rare exploit through which other users can execute arbitrary code as <em>root</em> by sending messages to his terminal.</li>
<li><strong>Modify <em>/etc/inittab</em> to Prevent Non-root Users from Rebooting the System with <em>ctrl+alt+del</em>.</strong> In the stock <em>/etc/inititab</em> on Debian Lenny, you've got this line:
<pre># What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now</pre>
<p>Which is hardly optimal: this lets pretty much anyone who figures out a way to execute programs in <em>/etc/sbin</em> reboot the system. I changed it to:
<pre>ca:12345:ctrlaltdel:/bin/false</pre>
</li>
<li><strong>SMTPD Settings</strong> If you run <em>postfix</em>, you should probably check up on your relay settings and update your external blacklist providers if you haven't done it in a while. Your mail server is the world's first line of defense against everything from phishing/spear-phishing to headline-making super worms:
<pre>smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks,
  reject_unauth_destination,
  reject_unauth_pipelining,
  reject_invalid_hostname,
  reject_rbl_client sbl-xbl.spamhaus.org,
  reject_rbl_client cbl.abuseat.org,
  reject_rbl_client bl.spamcop.net,
  reject_rbl_client zen.spamhaus.org
smtpd_helo_required = yes
disable_vrfy_command = yes

smtpd_data_restrictions =
            reject_unauth_pipelining,
            permit
</pre>
<p>That <code>smtpd_help_required</code> line might not seem like anything special, but I have a script that parses <em>/var/log/mail.log</em> output and, when you do get a spammer that responds to the <code>helo</code> request, a lot of times he'll come back with his actual domain. </p>
<p>It's fun for research/study/personal amusement reasons, basically.</li>
</ol>
<p>While some people might say that the above is overkill--that it's just not worth the time and effort to audit and harden at this level--but I'd say that this level of focus on security isn't so much "overkill" as it is "a pretty good start." </p>
<p>Because my thinking is that if you've got the root password, you're probably already the anxious type. And at the very least, being a little bit OCD about security on your all-important, mission-critical application servers might help you feel a little less anxious. Which is definitely worth the effort.</p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/05/15/stupid-linux-tricks-basic-server-hardening-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Do This: Spamassassin (Debian, Postfix)</title>
		<link>http://almosteffortless.com/2009/05/12/do-this-spamassassin-debian-postfix/</link>
		<comments>http://almosteffortless.com/2009/05/12/do-this-spamassassin-debian-postfix/#comments</comments>
		<pubDate>Tue, 12 May 2009 17:06:22 +0000</pubDate>
		<dc:creator>Timothy O'Connell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1348</guid>
		<description><![CDATA[There's a great episode of MASH in which the over-zealous paranoid-schizophrenic Colonel Flagg, in an attempt to coerce the impossibly calm and notoriously imperturbable Dr Stanley Freedman into collusion with one or another of his hare-brained schemes, asks the psychiatrist: "You wanna do your self a favor?"
"Why Not?" replies the doc. "Who deserves one more?"
If [...]]]></description>
			<content:encoded><![CDATA[<p>There's a great episode of MASH in which the over-zealous paranoid-schizophrenic Colonel Flagg, in an attempt to coerce the impossibly calm and notoriously imperturbable Dr Stanley Freedman into collusion with one or another of his hare-brained schemes, asks the psychiatrist: "You wanna do your self a favor?"</p>
<p>"Why Not?" replies the doc. "Who deserves one more?"</p>
<p>If you've got a Debian Lenny box out in the wild serving your email with <em>postfix</em> and you're <strong>not</strong> using spamassassin as a filter,  you really ought to consider doing yourself a favor and throwing that spamassassin piece into the mix: it only takes a second, it will increase security for your users-- hardening up your network little bit--and make the world a slightly better place for everyone.</p>
<ol>
<li>If you're OK with letting <em>aptitude</em> resolve your dependencies and manage your packages, all you need to do is install a single package:
<pre># aptitude install spamassassin</pre>
</li>
<li>Once that's done, crack open <em>/etc/default/spamassassin</em> with your favorite editor and enable it to run as a daemon and update itself automatically:
<pre># Change to one to enable spamd
#ENABLED=0
ENABLED=1

# Cronjob
# Set to anything but 0 to enable the cron job to automatically update
# spamassassin's rules on a nightly basis
#CRON=0
CRON=1</pre>
<p>(<em>spamd</em> is an old name for spamassassin: you'll notice a lot of the RHEL/CentOS/Fedora boxes out there running <em>spamd</em>.</li>
<li>Take a look at <em>/etc/spamassassin/local.cf</em>: there are some fun options that you can uncomment and enable in there. My personal favorite one is:
<pre>rewrite_header Subject *****SPAM*****</pre>
<p>This does what it sounds like it does and rewrites the headers of suspicious emails: you can then easily configure your email client to recognize these headers and filter accordingly. Pretty sweet.</li>
<li>Start spamassassin:
<pre># /etc/init.d/spamassassin start</pre>
</li>
<li>At this point, we're going to edit some <em>postfix</em> conf files, but we need to check on something first. Make sure <em>SA</em> is running, spawning children and listening on the right port:
<pre># netstat -anp |grep spam
tcp        0      0 127.0.0.1:783           0.0.0.0:*               LISTEN      11724/spamd.pid
unix  2      [ ACC ]     STREAM     LISTENING     9096119  1717/master         private/spamassassin
unix  3      [ ]         STREAM     CONNECTED     9757173  30093/spamd child
unix  3      [ ]         STREAM     CONNECTED     9757172  11724/spamd.pid  </pre>
</li>
<li>Noting that <em>SA</em> is listening on 783, tack the following on to the bottom of your <em>/etc/postfix/master.cf</em>:
<pre>spamassassin unix -     n       n       -       -       pipe
        user=nobody argv=/usr/bin/spamc -f -e
        /usr/sbin/sendmail -oi -f ${sender} ${recipient}</pre>
</li>
<li> Now find the SMTP/SMTPS lines in your <em>/etc/postfix/master.cf</em> and add the following option:
<pre>-o content_filter=spamassassin</pre>
<p> Assuming you're doing SMTP and SMTPS, you'll have something like this at the top of your <em>/etc/postfix/master.cf</em>:
<pre>smtp      inet  n       -       -       -       -       smtpd     -o content_filter=spamassassin
smtps     inet  n       -       -       -       -       smtpd     -o content_filter=spamassassin</pre>
</li>
<li> Reload Postfix:
<pre># postfix reload</pre>
</li>
</ol>
<p>And that's it: you're done.</p>
<p>If you can bear in mind that no spam-detection scheme is perfect, my guess is that you'll be pleased with your decision to set up <em>SA</em>: some spam will make it through, of course, but most of makes it through will come a.) as plaintext with escaped characters and b.) a lengthy disclaimer and an itemized spam "score":
<pre>Spam detection software, running on the system "molly", has
identified this incoming email as possible spam.  The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email.  If you have any questions, see
the administrator of that system for details.

Content preview:  Having trouble viewing this email? Click here! pharmacy medicine
   cabinet FSA home medical vitamins personal care diet & fitness men's SALE
   Get 80% Discount TODAY: This email was sent to you by drugstore.com. To ensure
   delivery to your inbox (not junk folders), please add drugstore@e.drugstore.com
   to your address book. [...] 

Content analysis details:   (13.5 points, 5.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 2.0 URIBL_BLACK            Contains an URL listed in the URIBL blacklist
                            [URIs: lewdozed.cn]
 0.5 FH_HELO_EQ_D_D_D_D     Helo is d-d-d-d</pre>
<p>...and so on.</p>
<p>So go ahead: do yourself a favor.</p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/05/12/do-this-spamassassin-debian-postfix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Weekly Digest, 5-3-09</title>
		<link>http://almosteffortless.com/2009/05/03/weekly-digest-5-3-09/</link>
		<comments>http://almosteffortless.com/2009/05/03/weekly-digest-5-3-09/#comments</comments>
		<pubDate>Sun, 03 May 2009 23:36:02 +0000</pubDate>
		<dc:creator>Weekly Digest</dc:creator>
				<category><![CDATA[Weekly Digest]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1332</guid>
		<description><![CDATA[Apologies for the 3 week gap in "weekly" posts. I was taking a vacation in Hawaii (pics!) and took a bit of time to enjoy life offline :)
Trevor's Links
Geocities: Lessons So Far
Geocities was once called Beverly Hills Internet. The company was founded in 1994 but it wasn’t until mid-1995 that they publically offered what people [...]]]></description>
			<content:encoded><![CDATA[<p>Apologies for the 3 week gap in "weekly" posts. I was taking a vacation in Hawaii (<a href="http://picasaweb.google.com/trevorturk/Hawaii#">pics!</a>) and took a bit of time to enjoy life offline :)</p>
<h3>Trevor's Links</h3>
<p><a href="http://ascii.textfiles.com/archives/1961">Geocities: Lessons So Far</a></p>
<blockquote><p>Geocities was once called Beverly Hills Internet. The company was founded in 1994 but it wasn’t until mid-1995 that they publically offered what people now think of as a Geocities trademark: free webpages, or “homesteads”. [An article about the Archive Team trying to save Geocities content before Yahoo takes it down.]</p></blockquote>
<p><a href="http://www.readwriteweb.com/archives/how_the_oauth_security_battle_was_won_open_web_sty.php">How the OAuth Security Battle Was Won, Open Web Style - ReadWriteWeb</a></p>
<blockquote><p>At some point in conversation Hammer-Lahav realized that the problem went far beyond the Twitter implementation. The OAuth protocol had an inherent vulnerability; big companies like Google, Netflix and Yahoo had implemented OAuth and scores of tiny startups had too... OAuth has support, but it doesn't have a centralized authority ready to deal with problems like this. Over the next week a story unfolded as the community moved to deal with the security issue. It's a dramatic story.</p></blockquote>
<p><a href="http://www.reddit.com/r/AskReddit/comments/8ft5j/tell_me_your_best_worst_joke_reddit/">Tell me your best worst joke, Reddit.</a></p>
<blockquote><p>[Includes such classics as: What's brown and sticky? A stick. --- Why does Snoop carry around an umbrella? Fo Drizzle. --- and, my personal favorite: Two snares and a cymbal fall off a cliff.]</p></blockquote>
<p><a href="http://bigbangtechnology.com/blog/post/welcome_to_the_anti-pitch">Welcome to the Anti-Pitch</a></p>
<blockquote><p>We're sick and tired of hack developers ripping off naive clients. And while I'm completely disgusted by some of the horror-stories I've heard lately, clients keep asking the wrong questions. As real developers, it's our responsibility to make the tough decision to speak the truth. This is an example of what we call the anti-pitch. [Excellent. I'm using this technique next time I'm dealing with potential clients.]</p></blockquote>
<p><a href="http://www.businessinsider.com/what-twitter-looks-like-for-twitter-employees-screenshots-2009-4">What Twitter Looks Like For Twitter Employees</a></p>
<blockquote><p>...hackers sent them screenshots from the site Twitter employees use to manage the microblogging service, admin.twitter.com... [It's amazing to see all of the back-end stuff necessary to run something so "simple" as Twitter.]</p></blockquote>
<p><a href="http://mad.ly/2009/05/01/honeypot-filter-as-a-rack-middleware/">Honeypot filter as a Rack middleware</a></p>
<blockquote><p>Our site’s suggestion box got hammered by a spambot recently, so I created this simple Rack middleware to protect our app from any requests that include a honeypot field.</p></blockquote>
<p><a href="http://github.com/rails/rails/commit/72160d9f89481ea60c8268ff026099f07b1e5ed6">Rails Edge: Implement FooController.action(:name)</a></p>
<blockquote><p>Rails actions are now Rack endpoints, and can be retrieved via FooController.action(name) and called with an env.</p></blockquote>
<p><a href="http://paulbuchheit.blogspot.com/2009/04/make-your-site-faster-and-cheaper-to.html">Make your site faster and cheaper to operate in one easy step</a></p>
<blockquote><p>Is your web server using using gzip encoding? Surprisingly, many are not. I just wrote a little script to fetch the 30 external links off news.yc and check if they are using gzip encoding. Only 18 were, which means that the other 12 sites are needlessly slow, and also wasting money on bandwidth.</p></blockquote>
<p><a href="http://www.contrast.ie/blog/passenger-command-line-done-right/">Passenger: Command line done right</a></p>
<blockquote><p>What’s really great about Passenger is that the attention to detail doesn’t end at the installer. The Linux process list is a list of programs that are currently running. Usually, programs are shown in this list by their command line name, often an indecipherable mix of letters and numbers. Passenger processes are easy to spot and easy to understand. Human readable names in a machine-centred interface.</p></blockquote>
<p><a href="http://www.subtraction.com/2009/04/30/muxtape-pushes-play-again">Muxtape Pushes Play Again</a></p>
<blockquote><p>Muxtape’s stock parts are highly regimented, allowing bands to express themselves with freedom, though not completely freely. Every component is 300 pixels square, and there is virtually zero layout flexibility; you can have whatever arrangement you like, so long as it comes in rows of three. What’s more, for now there are no ‘social’ components to draw upon; no commenting, no friending, no favoriting, etc. The new Muxtape platform is nothing if not regimented.</p></blockquote>
<p><a href="http://www.randsinrepose.com/archives/2009/04/30/an_aspirational_twitter.html">An Aspirational Twitter</a></p>
<blockquote><p>Tweetie is a desktop version of an application of the same name for the iPhone which, in my limited experience, is the first time an application has migrated from the phone to the desktop. As a friend mentioned, “Platform merge in progress!” and he’s right... When I use Tweetie, I’m reminded that a maniacal attention to detail not only makes you want to reach out and touch the digitally untouchable, it describes the familiar as the new, and, most importantly, it speaks of an aspirational future.</p></blockquote>
<p><a href="http://github.com/adamsanderson/open_gem/tree/master">adamsanderson's open_gem</a></p>
<blockquote><p>Gem Command to easily open a ruby gem with the editor of your choice. [Awesome. See the Issues tab for detail, but you need to set GEM_OPEN_EDITOR to 'mate' in your bash profile despite what the instructions might say.]</p></blockquote>
<p><a href="http://www.atebits.com/tweetie-mac/">Tweetie for Mac</a></p>
<blockquote><p>You can download the free version, which is ad-supported, and try it out for as long as you want. [The only Twitter client I've been able to use, aside from Tweetie on the iPhone.]</p></blockquote>
<p><a href="http://railspikes.com/2009/4/3/rails-test-benchmarks">Benchmarking your Rails tests</a></p>
<blockquote><p>The first step to faster tests is knowing what is slow. Fortunately, this is dead simple with the test_benchmark plugin by Tim Connor, and originally built by Geoffrey Groschenbach. Install the plugin, and when you run your tests via Rake, you’ll see handy output showing you the slowest tests, and the slowest test classes.</p></blockquote>
<p><a href="http://daringfireball.net/2009/04/twitter_clients_playground">Twitter Clients Are a UI Design Playground</a></p>
<blockquote><p>But perhaps the most important factor that has made Twitter such a rich category for client software is that there is so little friction to switch between apps. There’s nothing to import or export, and zero commitment.</p></blockquote>
<p><a href="http://www.techcrunch.com/2009/04/17/venture-capital-down-50-it’s-not-just-the-recession-folks/">Venture Capital Down 50%. It’s Not Just the Recession, Folks.</a></p>
<blockquote><p>There’s a huge difference between what venture capitalists say and what they do. [VC] fell off a cliff in 2001 and 2002 and it’s falling off a cliff now.</p></blockquote>
<p><a href="http://afreshcup.com/2009/04/28/a-painful-decision/">A Painful Decision</a></p>
<blockquote><p>I can’t reveal details without breaking confidences, but suffice it to say that a significant number of Rails core contributors - with leadership (if that’s the right word) from DHH - apparently feel that being unwelcoming and “edgy” is not just acceptable, but laudable. The difference between their opinions and mine is so severe that I cannot in good conscience remain a public spokesman for Rails. So, effective immediately, I’m resigning my position with the Rails Activists. [I haven't gotten up to speed with the controversy around this issue, but I can say for certain that Mike Gunderloy stepping back from his participation in the Rails community is a real serious bummer.]</p></blockquote>
<p><a href="http://blog.heroku.com/archives/2009/4/24/commercial_launch/">Heroku - Commercial Launch</a></p>
<blockquote><p>We have over 25,000 apps running on the platform today, and many of our users have been asking for pricing and paid services for some time now. So today we’re pleased to announce that we are officially out of beta and available for commercial use.</p></blockquote>
<p><a href="http://greyscalegorilla.com/blog/2009/04/16/shakeitphoto-launches/#comment-2253">ShakeItPhoto Launches</a></p>
<blockquote><p>It’s been 3 months in the making and 3 months of waiting for Apple approval, but wait no more… ShakeItPhoto is ready for download at the iTunes App store for the low price of 99 cents. Take a photo and shake it like a polaroid to make it develop!</p></blockquote>
<p><a href="http://github.com/blog/411-github-issue-tracker">GitHub Issue Tracker</a></p>
<blockquote><p>It gives us great pleasure to announce our integrated issue tracking system! On repository pages you’ll now see an “Issues” tab in the top menu.</p></blockquote>
<p><a href="http://blog.phusion.nl/2009/04/16/phusions-one-year-anniversary-gift-phusion-passenger-220/">Phusion Passenger 2.2.0 w/ Nginx support</a></p>
<blockquote><p>After spending weeks on further development and intensive testing, we’ve now come to the point wherein we have the distinct honor to announce Phusion Passenger for Nginx as an addition to the Phusion Passenger server line-up.. Our thanks goes out to Engine Yard for financially sponsoring this first release of Phusion Passenger for Nginx, as well as all the people who have in some way donated in the past for making this release possible in the first place.</p></blockquote>
<p><a href="http://www.codinghorror.com/blog/archives/001255.html">Is Open Source Experience Overrated?</a></p>
<blockquote><p>Just as commercial software can't possibly exist without customers, perhaps open source experience is only valid if you work on a project that attains some moderate level of critical mass and user base. Remember, shipping isn't enough. Open source or not, if you aren't building software that someone finds useful, if you aren't convincing at least a small audience of programmers that your project is worthwhile enough to join... then what are you really doing?</p></blockquote>
<p><a href="http://giantrobots.thoughtbot.com/2009/4/15/rails-2-3-2-upgrade-gotchas">Rails 2.3.2 upgrade gotchas</a></p>
<blockquote><p>With the latest stable release of rails out the door for about a month, we’ve had a chance to upgrade the bulk of the applications we maintain to 2.3.2.1. Here are some “gotchas”, aka issues, aka roadblocks to Strategic Enterprise Adoption that we discovered while upgrading some of them.</p></blockquote>
<p><a href="http://themomorohoax.com/2009/04/14/the-problem-with-project-management-tools">Draft: The problem with Project Management tools</a></p>
<blockquote><p>While I agree that it’s important to release code, I think pivotal and other similar tools lead to a mindset where releasing code is in itself the unit progress. But, as any successful team will tell you, completed tickets and releases released are horrible units of progress, since unless your customers love every single thing you do (they don’t), your unit of measurement becomes the amount of features and changes deployed.</p></blockquote>
<p><a href="http://blog.saush.com/2009/04/clone-tinyurl-in-40-lines-of-ruby-code/">Clone TinyURL in 40 lines of Ruby code</a></p>
<blockquote><p>I wrote Snip with Sinatra then deployed it up to Heroku so this is also a good excuse also to describe Heroku, a truly amazing service for the Ruby programming community. The total number of lines in Snip is actually 43, in a single file named snip.rb. including the view template and layout. [It's amazing what you can accomplish with Sinatra and Heroku.]</p></blockquote>
<p><a href="http://blog.evanweaver.com/articles/2009/04/09/ruby-gc-tuning/">ruby gc tuning</a></p>
<blockquote><p>In my experience, a typical production Rails app on Ruby 1.8 can recover 20% to 40% of user CPU by applying Stefan Kaes's Railsbench GC patch to the Ruby binary, and using the following environment variables...</p></blockquote>
<p><a href="http://themomorohoax.com/2009/04/12/customer-driven-iteration-vs-whiteboard-driven-iteration">Customer driven iteration vs Whiteboard driven iteration</a></p>
<blockquote><p>Customer driven iteration takes customer validation rather than released features as its core unit of progress. It assumes that you have not accomplished anything and therefore cannot feel good until your metrics tell you that your market will use and pay for your stuff.</p></blockquote>
<p><a href="http://www.techcrunch.com/2009/04/11/can-the-statusphere-save-journalism/">Can the Statusphere Save Journalism?</a></p>
<blockquote><p>...the discussion shifted to deep conversation about the future of journalism in the era of socialized media with one simple question, “are newspapers worth saving?” Walt thought for no more than two seconds and assertively replied, “It’s the wrong question to ask. The real question we should ask is if whether or not we can save good journalism.”</p></blockquote>
<p><a href="http://www.techcrunch.com/2009/03/10/are-blogs-losing-their-authority-to-the-statusphere/">Are Blogs Losing Their Authority To The Statusphere?</a></p>
<blockquote><p>Attention is engaged at the point of introduction, and for many of us, we’re presented with worthwhile content outside of our RSS readers or favorite bookmarks. Relevant and noteworthy updates are now curated by our peers and trusted or respected contacts in disparate communities that change based on our daily click paths... Retweets (RT) and favorites in Twitter, Likes and comments in FriendFeed and Facebook, posting shortened links that connect friends and followers back to the source post, have changed our behavior and empowered our role in defining the evolution of the connectivity and dissemination of information.</p></blockquote>
<p><a href="http://github.com/jamis/safe_mass_assignment/tree/master">jamis's safe_mass_assignment</a></p>
<blockquote><p>ActiveRecord plugin for allowing (careful) mass assignment of protected attributes, separate from values provided via users of your application.</p></blockquote>
<h3>Timothy's Links</h3>
<p><a href="http://www.wains.be/index.php/2009/04/24/howto-setting-up-dns2tcp/">Sébastien Wains » Howto : setting up dns2tcp</a></p>
<blockquote><p>For the "I can't browse from work" crowd or the "stuck behind the Great Firewall of China" set, there are any number of high-visibility, high-availability solutions: tor, your buddy's apache proxy, etc. For those who want to try an obscurity/security/proxy solution that's a little closer to the metal, there's dns2tcp via ssh which, predictably, sends your encrypted traffic from your computer out of your network as a dns request and returns it the same way: you're secure going out and you're not sending up big, "hey everybody: look at my port 80 requests!" red flags to the secret police or the sysadmin or whomever. Cool stuff.</p></blockquote>
<p><a href="http://www.ibm.com/developerworks/web/library/wa-secureweb/?ca=dgr-lnxw82Web-Secure&S_TACT=105AGX59&S_CMP=grsitelnxw82">Securing a Web server</a></p>
<blockquote><p>This is a pretty good read: it's got a little too much depth to be considered a crash course, but it's too abstract to be a tutorial or how-to. A nice, mid-level view of best security practices.</p></blockquote>
<p><a href="http://www.dailykos.com/story/2009/3/26/713407/-Twitter-+-StimulusConservative-Stupidity">Twitter + Stimulus = Conservative Stupidity</a></p>
<blockquote><p>Normally I wouldn't bookmark DailyKos--that would be kind of like bookmarking HuffPo or Reddit--but this is a neat little article about social engineering / industrial espionage that involves exploiting confirmation bias among partisans. Short read. Good read.</p></blockquote>
<p><a href="http://lifehacker.com/5219538/should-comic-sans-be-banned">Lifehacker - Should Comic Sans Be "Banned"? - Fonts</a></p>
<blockquote><p>This made me laugh out loud. It may make you laugh out loud as well.</p></blockquote>
<p><a href="http://www.cometdocs.com/">Convert files and data online</a></p>
<blockquote><p>Supposedly this is the best online format converter. Handy in a pinch (or if you're tired of your CLI converters screwing the pooch on higher ascii and spitting out comic book character swears in place of kanji).</p></blockquote>
<p><a href="http://www.cmdln.org/2009/04/16/testing-mail-servers-with-swaks/">Testing mail servers with swaks</a></p>
<blockquote><p>At first glance, this looks like a "for Dummies" tutorial for a piece of software that is, essentially, "telnet for Dummes". But swak lets you do something that you can't (easily) do with plain, old-fashioned telnet. You can, for instance, set a timeout time, specify authentication types, etc. with a commandline flag or two. Handy if you're troubleshooting that new mail server install or doing some eyeball/ball park benchmarking.</p></blockquote>
<p><a href="http://www.dcs.qmul.ac.uk/~norman/papers/qa_metrics_article/index_qa_met.htm">Introduction to Quality Assurance and Metrics</a></p>
<blockquote><p>If you're looking for a no-bullshit crash course in QA/QC that has decent depth, look no further.</p></blockquote>
<p><a href="http://www.akihabaranews.com/en/news_details.php?id=17969">Fujitsu Develops High-Speed Image-Capture Technology for Palm Vein Biometric Authentication : Akihabara News .com</a></p>
<blockquote><p>Palm vein biometric authentication? Seriously? I mean, I guess super-futuristic biometric auth devices that scan _inside_ the body for unique identifiers are kind of cool in an aesthetic sense, but they're certainly not very cool from a security sense: I thought we had agreed as a global society that physical objects, no matter how apparently unique they are, are unsuitable for secure auth because they are, at the end of the day, still just objects. And all objects can be replicated.</p></blockquote>
<p><a href="http://consumerist.com/5200818/reader-finds-card-skimmer-on-bank-atm">Skimmers: Reader Finds Card Skimmer On Bank ATM</a></p>
<blockquote><p>First reaction: "wow that's totally awesome--I can't believe someone came up with this." Two seconds later's reaction: "wow, my opinion of the human race just got ratcheted down a peg or two: I can't believe it took us this long to invent the ATM card data skimmer."</p></blockquote>
<p><a href="http://www.smirkingchimp.com/thread/21289">The peasant mentality lives on in America</a></p>
<blockquote><p>You know, three weeks ago, I had no idea who Matt Taibbi was. Then, courtesy of reddit, I got put on to his write-up of the Meltdown and I've been hooked. This guy hits hard, doesn't pull punches and walks the stylistic tightrope between the unnaturally polite tenor of expose journalism and the warbling catachresis of incendiary blogging.</p></blockquote>
<p><a href="http://www.slate.com/id/2216218/">What happens if I don't pay my taxes?</a></p>
<blockquote><p>This is a good article because a.) it's timely and b.) is written from a hacker perspective/mentality. It starts with the question, "what is the nature of the system?" and then wonders about different methods of potentially short-circuiting it or circumventing aspects of it. Kind of makes taxes fun. Almost.</p></blockquote>
<p><a href="http://www.debian-administration.org/article/What_to_do_when_the_root_partition_is_full">What to do when the root partition is full?</a></p>
<blockquote><p>This is a good list of comments to scroll through as it discusses Linux mounting tricks, how to use LVM and, basically, lists reasons why not to panic. And, I don' t know about you, but the fewer reasons I have to panic, the better.</p></blockquote>
<p><a href="http://www.akihabaranews.com/en/news_details.php?id=17938">Thanko's Latest 4GB Necktie Camera</a></p>
<blockquote><p>Yeah, it's basically just a flat camera and a necktie that's been cut open in the back, but the idea is still totally effinf awesome.</p></blockquote>
<p><a href="http://www.howtoforge.com/a-short-introduction-to-cron-jobs">A Short Introduction To Cron Jobs</a></p>
<blockquote><p>There are two reasons that introductory level, "how to" type documents for the basics of Linux administration are so ubiquitous: those reasons are that they're useful for experienced users to a.) write and b.) comment upon and they're useful for inexperienced users looking things up. This one is about cron and using crontab. And it's a great example of that.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/05/03/weekly-digest-5-3-09/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Audit my Server – A guide to performing a quick and thorough security audit on your web-facing server</title>
		<link>http://almosteffortless.com/2009/04/29/audit-my-server-a-guide-to-performing-a-quick-and-thorough-security-audit-on-your-web-facing-server/</link>
		<comments>http://almosteffortless.com/2009/04/29/audit-my-server-a-guide-to-performing-a-quick-and-thorough-security-audit-on-your-web-facing-server/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 20:26:01 +0000</pubDate>
		<dc:creator>Timothy O'Connell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1305</guid>
		<description><![CDATA[Security audits are a necessity.
Unfortunately, due to the constantly changing array of exploits and threats coming at your Internet-facing server from all over the world, there's no best practices manual for a security audit. This is because no one knows exactly what level of openness is appropriate/optimal on a given application server. 
But you gotta [...]]]></description>
			<content:encoded><![CDATA[<p>Security audits are a necessity.</p>
<p>Unfortunately, due to the constantly changing array of exploits and threats coming at your Internet-facing server from all over the world, there's no best practices manual for a security audit. This is because no one knows exactly what level of openness is appropriate/optimal on a given application server. </p>
<p>But you gotta start somewhere. Because if you're just blithely running an un-hardened *nix server with stock configurations for service apps like <em>Apache</em> and <em>ssh</em>, you're pretty much giving away the store.</p>
<p>What follows is a short how-to dealing with how to get started, security-auditing-wise. It is by no means comprehensive and is only intended to provide a "leg up" for those who feel like they ought to be auditing their servers but aren't sure where to start. I'll be using Debian systems running the current stable release (i.e. Lenny) to demonstrate the techniques, but I'll try to keep things as OS agnostic as possible: most of the packaged software I describe below can be found in your generic, mainstream <em>fedora</em> repo.</p>
<p>The methodology will be to start from the outside and work inward. I recently saw a <em>Linux Journal</em> article that described doing things the opposite way (or at least that's the impression with which I was left), and that doesn't make much sense to me. From where I'm standing, it seems that if you're conducting a security audit, you ought to start out by looking at your server the same way everyone else does.</p>
<p>Accordingly, we'll begin from the outside and from as basic a perspective as possible: scanning ports and checking for known vulnerabilities and obvious mis-configurations. Once we've got a little perspective on how our server looks to the script kiddies and botnets of the world, we'll do some web-server specific scanning to attempt to detect vulnerable plugins, apache mis-configurations and application-level security holes. After that, we'll finish by checking for rootkits and doing some internal auditing.</p>
<p><BR><BR><br />
<strong>OpenVAS: Port Probe and All-purpose scan</strong><br />
The first thing to do is to scan your ports. </p>
<p>The odds are good that if you've got a server out there on the Internet (in the DMZ of your intranet or in a hosting company's rack, for example) that it's got a bunch of open ports. You've probably got one or two listening for HTTP requests, one or two listening for SSH requests and so on. What you probably <em>haven't</em> got is a good idea of how those ports look to  the world.</p>
<p>So the first part of any security audit is the portscan. In olden times, you'd use a combination of <em>telnet</em> and <em>nmap</em> for this: <em>nmap</em> would handle the port scanning and tell you which ports were listening/open and then you'd use your expert knowledge of various network protocols to use a <em>telnet</em>-like program to check out those ports and see what sort of access and information they were offering to the world.</p>
<p>There are, fortunately, labor-saving apps that will do the scanning and auditing for you. A few months back, you would have been using <em>nessus</em>, as it was the big name in F/OSS auditing. <em>nessus</em>, however, has gone commercial (proprietary and closed) and a new, open project (GPL) called <em>OpenVAS</em> has taken its place.</p>
<p>For anything other than security auditing, using commercial software is probably OK. At the very least it's not <em>always</em> counter-productive to use non-F/OSS for non-security-related tasks. In the case of security-related apps, however, it just doesn't make any sense to take a chance on using software that isn't available for public scrutiny.</p>
<p>At any rate, if you're familiar with the way that <em>nessus</em> works, you'll be happy to know that the big ideas and the general methodology/procedure behind using <em>OpenVAS</em> are essentially the same. If you're unfamilar with programs like <em>nessus</em> and <em>OpenVAS</em>, here's how they work, from an administrator/auditor's perspective:
<ol>
<li>Set up a server</li>
<li>Use a client to tell the server to probe the target site</li>
<li>View the audit report on the client</li>
</ol>
<p>At present, if you're using the stock stable/unstable Debian repositories, you haven't got access to the packaged version of the OpenVAS server. That being the case, we're going to go ahead and get a little bit heroic here and do this the Cowboy Way (i.e. from source). </p>
<ol>
<li><strong>Dependencies and Source Files</strong></li>
<p>Make sure that you've got the following packages (some of which the openvas developers list as dependencies, some of which you'll need to compile anything from source) before proceeding:<br />
<code>molluska:/opt/# aptitude install libgnutls-dev libpcap-dev libgpgme11 libgpgme11-dev  libglib2.0 libglib2.0-dev build-essential bison</code></p>
<p>Now that that's handled, there are four "modules" that are required to run an OpenVAS server. The openvas developers say that you've got to install the modules in the following order:
<ol>
<li>openvas-libraries </li>
<li>openvas-libnasl </li>
<li>openvas-server </li>
<li>openvas-plugins</li>
</ol>
<p>So that's what wer're going to do. I like to do this sort of thing in<em>/opt</em>, but it really doesn't matter where this happens.</p>
<p>Get the files:<br />
<code>molluska:/opt/openvas# wget http://wald.intevation.org/frs/download.php/572/openvas-libraries-2.0.2.tar.gz<br />
molluska:/opt/openvas# wget http://wald.intevation.org/frs/download.php/561/openvas-libnasl-2.0.1.tar.gz<br />
molluska:/opt/openvas# wget http://wald.intevation.org/frs/download.php/562/openvas-server-2.0.1.tar.gz<br />
molluska:/opt/openvas# wget http://wald.intevation.org/frs/download.php/576/openvas-plugins-1.0.6.tar.gz</code><br />
<strong>NB:</strong> these URL's are for the version that was current when this was written--no guarantees that they'll be there two hours from now.</p>
<li><strong>./configure && make && make install</strong></li>
<p>Now, we start the compilation process which, thanks to our having resolved the dependencies enumerated above, should go off without a hitch:<br />
<code>molluska:/opt/openvas# tar -zxvf  openvas-libraries-2.0.2.tar.gz<br />
[...]<br />
molluska:/opt/openvas# cd openvas-libraries-2.0.2<br />
molluska:/opt/openvas/openvas-libraries-2.0.2# ./configure<br />
[...]<br />
molluska:/opt/openvas/openvas-libraries-2.0.2# make<br />
[...]<br />
molluska:/opt/openvas/openvas-libraries-2.0.2# make install</code></p>
<p>Once you've successfully installed the openvas libraries, you'll be prompted to modify <em>/etc/ld.so.conf</em> by adding the line "<code>/usr/local/lib</code>" to it and running <strong>ldconfig</strong> to update your linker. Do that, and then repeat the steps described above (untar, configure, make, make install) in the other three folders to finish installing the <em>OpenVAS</em> modules.</p>
<li><strong>Add a User and Generate an SSL Cert</strong></li>
<p>Once you've got everything installed, you'll need to create two things: an <em>OpenVAS</em> user and an SSL certificate. Fortunately, both of these tasks have been nearly fully automated and all you'll have do to get the job done is execute a couple of binaries (which should be on your path, now that you've installed everything according to the above instructions) and follow some on-screen prompts:
<pre>molluska:/opt/openvas# openvas-adduser
[...]
molluska:/opt/openvas# openvas-mkcert
[...]</pre>
<p>And that's it. Make a note of the paths that the <strong>openvas-mkcert</strong> program gives you at the end of the certificate creation (as you might need to specify them at some later time; you won't need them again to follow these instructions). </p>
<li><strong>Fire it up</strong></li>
<p>Once you've got all your modules installed, your certificate created and your user added, it's time to fire up the server/daemon. The smartest way to do this is to pseudo-daemonize it and tail its output while it loads plugins:<code>molluska:/# nohup openvasd &<br />
[1] 4508<br />
molluska:/# nohup: ignoring input and appending output to `nohup.out'<br />
molluska:/# tail -f nohup.out </code></p>
<p>Should get you something like this:<code>tail -f nohup.out<br />
Loading the plugins... 714 (out of 10558) </code></p>
<p>...and so on. Once the plugins are all the way loaded, fire off a quick <code>ps</code> to make sure that the server is running and maybe a quick <code>netstat</code> to make sure you know what port it's listening at, and that's it: you're done with the server side of things and ready to move on to the client and auditing part.
<pre>molluska:/opt/openvas# ps aux |grep openvas
root     26129  1.1  0.2  16296    76 ?        S    06:29   1:46 openvasd: waiting for incoming connections
molluska:/opt/openvas# netstat -anp |grep openvas
tcp        0      0 0.0.0.0:9390            0.0.0.0:*               LISTEN      26129/openvasd: wai
</pre>
</ol>
<p>Installing the <em>OpenVas</em> client is much easier. </p>
<p>While there is a packaged version of the <em>OpenVAS</em> client app, we're going to install one from source (mostly so our version of the server matches with our version of the client; this is mostly me being OCD, however, and you can probably get away with using the packaged version). To install the client, we'll follow the same steps as above, but on a different machine:
<pre>gonzo:/opt/openvas-client# wget http://wald.intevation.org/frs/download.php/575/openvas-client-2.0.3.tar.gz
[...]
gonzo:/opt/openvas-client# tar -zxvf openvas-client-2.0.3.tar.gz
[...]
gonzo:/opt/openvas-client# cd openvas-client-2.0.3
gonzo:/opt/openvas-client/openvas-client-2.0.3# ./configure
[...]
gonzo:/opt/openvas-client/openvas-client-2.0.3# make
[...]
gonzo:/opt/openvas-client/openvas-client-2.0.3# make install</pre>
<p><strong>NB:</strong> you may, depending on your client system, have to resolve some GTK dependencies and other build/compiler dependencies like the ones listed above: <code>libgtk2.0-dev</code> should solve most of your gtk problems, if you're running Debian Lenny.</p>
<p>Once the GUI client is installed, start it up:
<pre>toconnell@gonzo:~$ sudo aptitude install openvas-client
[...]
toconnell@gonzo:/opt/openvas-client/openvas-client-2.0.3/bin$ ./OpenVAS-Client &</pre>
<p><a href="http://s3.amazonaws.com/almosteffortless/openvastutorial1.png"><div id="attachment_1314" class="wp-caption alignright" style="width: 224px"><img src="http://s3.amazonaws.com/almosteffortless/openvastutorial1.png" alt="Connection Screen, OpenVAS GUI Client" title="openvastutorial1" width="214" class="size-full wp-image-1314" /><p class="wp-caption-text">Connection Screen, OpenVAS GUI Client</p></div></a><br />
Once the GUI client is up and running, click the connect icon at the top of the interface (looks like two gray tubes colliding) to open the window that allows you to specify your newly install server's location and settings. Fill in the blanks and connect:</p>
<p>Once your client is connected with your server, you're ready to fill in the blanks and start your first round of tests. This is fairly self-explanatory and, honestly, you wouldn't be reading this if you couldn't figure out simple GUI interfaces: specify your target (i.e. the server you're auditing), make sure that all the plugins are enabled and then click the life preserver to start the "Scan Assistant" and execute the scan. Follow the on-screen prompts: easy as apple pie.</p>
<p>The best thing to do, once your scan starts, is probably to go do something else and come back in a little bit: in my experience these scans can take anywhere from 15 to 45 minutes, depending on your server and your pipe: my server is an old Linksys NSLU2 and my pipe is a consumer-grade Speakeasy residential connection, so I'm used to waiting close to an hour for the scan to finish. Using corporate resources will result in less idle time.<br />
<a href="http://s3.amazonaws.com/almosteffortless/openvastutorial21.png"><div id="attachment_1323" class="wp-caption alignleft" style="width: 310px"><img src="http://s3.amazonaws.com/almosteffortless/openvastutorial21-300x158.png" alt="OpenVAS scan results report" title="openvastutorial21" width="300" height="158" class="size-medium wp-image-1323" /><p class="wp-caption-text">OpenVAS scan results report</p></div></a></p>
<p>Once the scan is done, you're treated to a report view. This is what we've been after all long. In it, you'll see a full run-down of what ports on your server are open and what open ports are listening for what. Additionally, you'll be treated to helpful recommendations about how to close security holes. And while closing those holes is beyond the scope of this article, I will say that almost every recommendation I've gotten from an OpenVAS report has been sane, been sensible and lead to a harder server.</p>
<p><BR><BR></p>
<p><strong><em>nikto</em>: Web-server Specific Auditing</strong><br />
The second thing to do, in order to perform a robust audit of your system, is to hit it with <em>nikto</em> (http://www.cirt.net/nikto2).</p>
<p><em>nikto</em>, unlike <em>OpenVAS</em> doesn't require a server/client hook-up: just install the client with <em>apt</em> and fire off some tests, writing the output from those tests to plaintext files:
<pre>molluska:/# aptitude install nikto
molluska:/# nikto -h newathens.org -p 80 -output nikto_na80 && nikto -h newathens.org -p 443 -output nikto_na443</pre>
<p>You'll get helpful output that points you towards an obvious solution like this:
<pre>+ mod_ssl/2.2.9 appears to be outdated (current is at least 2.8.30) (may depend on server version)</pre>
<p>And you'll also get put on notice if you've got paths/folders/files with names that automatic exploiters and scripts tend to look for:
<pre>+ OSVDB-3092: GET /login/ : This might be interesting...</pre>
<p>...to script kiddies and Chinese botnets. </p>
<p>You'll also get put on notice if you've got too much of your software's installation defaults hanging out in the open:
<pre>+ OSVDB-3233: GET /icons/README : Apache default file found.</pre>
<p><BR><BR></p>
<p><strong>Server-side Checks</strong></p>
<p><strong>chkrootkit</strong><br />
There are a few utilities that allow you to perform quick server-side audits of your security situation. Some of them, like <em>rkhunter</em> will run daily (like <em>logwatch</em> or <em>apticron</em>) and tell you if they've identified any new chinks in your armor. The first one to install and run is <em>chkrootkit</em>.
<pre>molly:/# aptitude install chkrootkit
[...]
molly:/# chkrootkit</pre>
<p>This is a great place to start your internal audit because it'll tell you if you've picked up any known bugs and whether anything weird, filesystem-wise, appears to be going on with your computer. </p>
<p>The best use for this app is to give you a very quick idea of what sort of shape you're in. If you've got a system littered with suspicious files, odd-looking binaries, etc., you know exactly where to start plugging holes.</p>
<p><strong>rkhunter</strong><br />
While we're on the subject of checking for root kits, let's do <em>rkhunter</em>:
<pre>molly:/# aptitude install rkhunter
[...]
molly:/# rkhunter --update
molly:/# rkhunter --check</pre>
<p>This gets you a quick check of all your important binaries (to make sure they look like they're supposed to look, i.e. that they haven't been replaced by scripted exploits or an intruder with something that opens a back door) and a quick scan for known exploits of the rootkit variety. You'll also be told whether you're running <em>inetd/xinetd</em> (which tends to open ports in a manner whose security can be less than "ironclad") and other fun facts about potential vulnerabilities. </p>
<p>The best thing to do with this report is think long and hard about what ports/resources/pathways you actually want to make available to the Internet and then start disabling services. Once you've spent some time with that, you're pretty well on your way to having an idea of exactly how hard your server is and how much work you've got to do to keep it safe.</p>
<p>If anyone has any ideas about other utilities or techniques for security auditing, please feel encouraged to share them in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/04/29/audit-my-server-a-guide-to-performing-a-quick-and-thorough-security-audit-on-your-web-facing-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>YUM for Weekend Warriors</title>
		<link>http://almosteffortless.com/2009/04/27/yum-for-weekend-warriors/</link>
		<comments>http://almosteffortless.com/2009/04/27/yum-for-weekend-warriors/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 16:38:48 +0000</pubDate>
		<dc:creator>Timothy O'Connell</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1293</guid>
		<description><![CDATA[Generally speaking, I'm a Debian guy. 
Sure, I'll mess around on the CentOS box under my desk on the production RHEL servers at work a little bit, but Red Hat is largely terra incognita for me and Debian is where I'm comfortable doing my admin thing and managing packages. I know apt. I am comfortable [...]]]></description>
			<content:encoded><![CDATA[<p>Generally speaking, I'm a Debian guy. </p>
<p>Sure, I'll mess around on the CentOS box under my desk on the production RHEL servers at work a little bit, but Red Hat is largely <em>terra incognita</em> for me and Debian is where I'm comfortable doing my admin thing and managing packages. I know <em>apt</em>. I am comfortable with <em>apt</em>. And while I wouldn't describe using <em>yum</em> as something that makes me <em>un</em>comfortable, when I do have to use it, I find myself spending more time Googling and forum-searching than I'd like. </p>
<p>I'm beginning to accept that this is no one's fault but my own. </p>
<p>And so the purpose of this article, therefore, is not a.) to point fingers, b.) to compare <em>apt</em> to <em>yum</em> or c.) to explain <em>yum</em> from the perspective of someone who is accustomed to doing things the Debian way. The Internet is <em>littered</em> with stuff like that like the intersection of Paradise and Tropicana are littered with advertisements for escorts. </p>
<p>In <em>this</em> post you'll find some novice-level trouble-shooting tips, reminders and pointers for the casual <em>yum</em> user that are intended to help reduce the occurrence of forehead-slaps and to decrease the amount of time spent tailing logs and Googling obscure error messages.</p>
<ol>
<li><strong>Preemptive Troubleshooting.</strong></li>
<p>It's not in the documentation, but I have noticed that a lot of dependency issues and version consistency problems are resolved by tossing off the following <em>yum</em> command and then trying again:
<pre> # yum clean packages</pre>
<p>It has become my general practice to do this before I do anything else. It's a nice preemptive step.</p>
<p>I've noticed that it's generally not the advice of performance-minded (read: impatient) admins to do the more scorched-Earth <code>yum clean all</code>, as this empties caches, dbcaches (i.e. sqlite files) and can causes longer <code>check-update</code> times.</p>
<li><strong>filelists.xml.gz Download Times out.</strong></li>
<p>Let's say you're doing a <code>yum update</code> or a <code>yum upgrade</code> and you get some output like this:</p>
<pre>filelists.xml.gz          100% |=========================| 1.4 MB    00:01
filelists.xml.gz          100% |=========================| 1.3 MB    01:48
http://apt.sw.be/redhat/el5/en/i386/dag/repodata/filelists.xml.gz: [Errno 4] Socket Error: timed out
Trying other mirror.</pre>
<p>There are good odds, especially if you're using non-standard repositories, that you copied/pasted some text into your <code>yum.conf</code> from somewhere out there on the Internets. If you did, there are even better odds that the text you copied includes something about using GPG to authenticate the repo. If you've got lines like that, you'll need the repository's key. </p>
<p>Generally speaking, you can navigate to a repository's http site and find the URL for their public key. Once you've got that, all it takes to import it is one of these:
<pre># rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt</pre>
<li><strong>Know your repositories</strong></li>
<p>You can save a lot of backtracking/head-scratching time if, before searching for a package on a machine you don't visit that often, you toss off a quick <code>yum repolist</code>. This handy feature will spit out the names and statuses of all of the repositories in all the files in your <code>/etc/yum.repos.d/</code> directory and prevent you from doing that thing where you don't realize that you've only got the default CentOS repositories enabled but can't seem to figure out why the eff your <em>yum</em> search for <code>htop</code> just turned up a big goose-egg.</p>
<li><strong>Automatic Notifications</strong></li>
<p>If, like me, you're coming at <em>yum</em> from a Debian perspective, one of the first things you'll do when you start administering an <em>RPM</em>-based system is to install the <em>apticron</em>-equivalent known as <em>yum-updatesd</em> (<code># yum install yum-updatesd.noarch</code>). Something you might forget, however, is that the default behavior of <em>yum-updatesd</em> is to <strong>not</strong> send emails.</p>
<p>Don't forget to edit <code>/etc/yum/yum-updatesd.conf</code> such that
<pre>mit_via = dbus</pre>
<p> looks like
<pre>mit_via = email</pre>
<p> or you won't get those all-important package update emails.
</ol>
<p>And that's about all that's coming to mind right now.</p>
<p>If anyone else can think of some things that you consistently forget--and then suddenly remember, 20 minutes later--to do when you're working with <em>yum</em>, feel free to leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/04/27/yum-for-weekend-warriors/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Administering Firefox: pushing browser preferences</title>
		<link>http://almosteffortless.com/2009/04/15/administering-firefox-pushing-browser-preferences/</link>
		<comments>http://almosteffortless.com/2009/04/15/administering-firefox-pushing-browser-preferences/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 19:47:18 +0000</pubDate>
		<dc:creator>Timothy O'Connell</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://almosteffortless.com/?p=1290</guid>
		<description><![CDATA[This blog is going to end with a question that I have been unable, after countless minutes of Googling, to answer satisfactorily. It will start, however, with some givens.
I already know that if you want to alter the default settings for all profiles that will be created by a given Firefox installation in the future, [...]]]></description>
			<content:encoded><![CDATA[<p>This blog is going to end with a question that I have been unable, after countless minutes of Googling, to answer satisfactorily. It will start, however, with some givens.</p>
<p>I already know that if you want to alter the default settings for all profiles that will be created by a given Firefox installation in the future, you add the line for the preference that you want to effect those profiles to the file <em>FIREFOX_ROOT/defaults/profile/prefs.js</em>. </p>
<p>Similarly, I already also know that if you want to push a preference to all currently existing users on the machine, you add the line for that preference to <em>FIREFOX_ROOT/deftauls/pref/firefox.js</em>.</p>
<p>The caveat there, of course, is that if the user of the profile have already changed a preference in his personal prefs.js (i.e. the one in <em>HOMEDIR/.mozilla/firefox/RANDOMALPHANUMERICS.USERNAME/prefs.js</em>) and it conflicts with your preference in the (global) firefox.js, then you (the admin) are SOL, because the program will defer to the user's personal prefs.js file.</p>
<p>Which brings us to the question: is there a way (short of writing a script to parse individual user's personal prefs.js files and modify them as needed) to push a preference to all users of a given Firefox installation?</p>
<p>Full disclosure: I'm posing this question for two reasons. The first reason is that I'm sort of passive-aggressive with Firefox: ours is a very love-hate relationship. The second reason is that I honestly don't think that what I'm describing--i.e. adding a preference to one, "master" preferences file that effects all users of a given installation, regardless of their personal prefs.js file--can be done.</p>
<p>Am I missing something? Maybe even something truly forehead-slap-worthy that's at the top of all the documentation? Or is this a real limitation of the program?</p>
]]></content:encoded>
			<wfw:commentRss>http://almosteffortless.com/2009/04/15/administering-firefox-pushing-browser-preferences/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
