<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>some problems, solutions, and other stuff  i’ve encountered as a web developer</description><title>Tim Medina's Software Development Blog</title><generator>Tumblr (3.0; @teem)</generator><link>http://www.timmedina.net/</link><item><title>Introducing redisco - Python Containers and Simple Models for Redis</title><description>&lt;p&gt;I recently started an open source Python project called &lt;a href="http://github.com/iamteem/redisco"&gt;redisco&lt;/a&gt;.
From its README:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Redisco allows you to store objects in &lt;a href="http://code.google.com/p/redis/"&gt;Redis&lt;/a&gt;.
  It is inspired by the Ruby library &lt;a href="http://ohm.keyvalue.org"&gt;Ohm&lt;/a&gt; and its design
  and code are loosely based on Ohm and the Django ORM. It is built on top of redis-py.
  It includes container classes that allow easier access to Redis sets, lists, and sorted sets.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;Why?&lt;/h2&gt;

&lt;p&gt;Short answer: I like Redis and I want to code in Python.&lt;/p&gt;

&lt;p&gt;A bit longer answer: I&amp;#8217;ve been hacking with Redis and Ohm since last month and
I found it &lt;em&gt;lighter&lt;/em&gt; than using SQL databases or Mongodb right from its installation
to actually using it.  It&amp;#8217;s data structure approach appeals to me. Sets,
lists, dicts, sorted set &amp;#8212; using them feels more natural as compared to tables
and joins. The Ruby gem Ohm provides a nice interface to Redis. I wanted to
have something similar in Python. I looked around, I saw
&lt;a href="http://packages.python.org/redish/index.html"&gt;Redish&lt;/a&gt;
which offers some nice abstractions, but after reading through its code
looking specifically for model abstraction, I decided it didn&amp;#8217;t have what I
wanted. And with so much time in my hands, I rolled out my own.
(Another reason for starting this project is that I wanted to learn more about
and code more in Python.)&lt;/p&gt;

&lt;h2&gt;Simple Models&lt;/h2&gt;

&lt;p&gt;Redisco allows you to code model classes like you would in Django
or AppEngine.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class Person(models.Model):
    name = models.Attribute(required=True)
    created_at = models.DateTimeField(auto_now_add=True)
    fave_colors = models.ListField(str)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Saving an object to Redis automatically creates indexes that are used when
querying.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; p = Person(name="Ippo", fave_colors=["Red", "White"])
&amp;gt;&amp;gt;&amp;gt; p.save()
True
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Objects can be queried via the Model.objects classmethod:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Person.objects.all()
Person.objects.filter(name='Ippo')
Person.objects.filter(name='Ippo').first()
Person.objects.all().order('name')
Person.objects.filter(fave_colors='Red')
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Redisco has a limited support for queries involving ranges - it can only filter
fields that are numeric, i.e. DateField, DateTimeField, IntegerField, and FloatField.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Person.objects.zfilter(created_at__lt=datetime(2010, 4, 20, 5, 2, 0))
Person.objects.zfilter(created_at__gte=datetime(2010, 4, 20, 5, 2, 0))
Person.objects.zfilter(created_at__in=(datetime(2010, 4, 20, 5, 2, 0), datetime(2010, 5, 1)))
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Other limitations&lt;/h3&gt;

&lt;p&gt;redisco.models does not offer customizable managers and inheritance.&lt;/p&gt;

&lt;h2&gt;Abstractions to Python data structures&lt;/h2&gt;

&lt;p&gt;Lists, sets, sorted sets, dicts - this sort of things are easily persisted in
Redis. But the main reason they are provided by redisco is that they are
dependencies of the Model class. Making them available as well seems
reasonable.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; from redisco.containers import List
&amp;gt;&amp;gt;&amp;gt; l = List('alpha')
&amp;gt;&amp;gt;&amp;gt; l.append('a')
&amp;gt;&amp;gt;&amp;gt; l.append('b')
&amp;gt;&amp;gt;&amp;gt; l.append('c')
&amp;gt;&amp;gt;&amp;gt; 'a' in l
True
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Installation&lt;/h2&gt;

&lt;p&gt;The package is published in PyPI, so you can&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;pip install redisco
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Or, you can clone the git repository:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git clone &lt;a href="http://github.com/iamteem/redisco.git"&gt;http://github.com/iamteem/redisco.git&lt;/a&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Prerequisites: Redis 2.0.0 RC1 and the latest version of redis-py on Github.&lt;/p&gt;

&lt;h2&gt;Credits&lt;/h2&gt;

&lt;p&gt;Much credit goes to the &lt;a href="http://github.com/soveran/ohm"&gt;Ohm team&lt;/a&gt;, whose work in
Ohm is the primary inspiration and basis of the project.&lt;/p&gt;

&lt;h2&gt;Notes&lt;/h2&gt;

&lt;p&gt;Because redisco is relatively new, consider it alpha software and not
production-ready. I&amp;#8217;m currently testing it in a simple web toy that stores
tweets from Twitter tracked using the &lt;a href="http://pypi.python.org/pypi/tweetstream/"&gt;tweetstream&lt;/a&gt;
and using Hashes to store statistics.&lt;/p&gt;

&lt;h2&gt;Invitation&lt;/h2&gt;

&lt;p&gt;The project is MIT-licensed so anyone can do anything with it.
Use it, fork it on Github, read the source code, and let me know
your opinions and reactions. Thanks.&lt;/p&gt;</description><link>http://www.timmedina.net/post/642641575</link><guid>http://www.timmedina.net/post/642641575</guid><pubDate>Sat, 29 May 2010 12:05:14 +0800</pubDate><category>python</category><category>redis</category><category>redisco</category><category>open source</category></item><item><title>What's new in my toolbox</title><description>&lt;p&gt;I thought I wanted to share some of the tools I use these days. In no particular order:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.tornadoweb.org/"&gt;&lt;strong&gt;Tornado&lt;/strong&gt;&lt;/a&gt;. &lt;em&gt;A fast Python non-blocking web server&lt;/em&gt;. I&amp;#8217;ve been hacking two small apps that will be rolled out in the next two weeks. Tornado is a good match for the two apps because the apps access external web services (i.e. Flickr API), and one app has &lt;a href="http://en.wikipedia.org/wiki/Comet_(programming)"&gt;Comet&lt;/a&gt; features via Ajax and long polling &amp;#8212; both of these features are easily &lt;a href="http://www.tornadoweb.org/documentation#non-blocking-asynchronous-requests"&gt;solved in Tornado&lt;/a&gt;. Since its code base is really small, I had no trouble looking around when I hit some roadblock.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.python.org/download/releases/2.6/"&gt;&lt;strong&gt;Python 2.6&lt;/strong&gt;&lt;/a&gt;. Recently, I updated my Python version to 2.6. Multiprocessing FTW.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://pip.openplans.org/"&gt;&lt;strong&gt;pip&lt;/strong&gt;&lt;/a&gt; and &lt;a href="http://pypi.python.org/pypi/virtualenv"&gt;&lt;strong&gt;virtualenv&lt;/strong&gt;&lt;/a&gt;. When experimenting with Python packages, this is THE way.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://github.com/mxcl/homebrew"&gt;&lt;strong&gt;Homebrew&lt;/strong&gt;&lt;/a&gt;. &lt;em&gt;A package manager for OSX&lt;/em&gt;. Recently, I updated the my Macports system and several of the packages in it. The update broke my other tools (Ruby gems and others) because their dependencies (dylibs etc) are no longer where they expected them to be. I was done with Macports. So after looking around, I found &lt;a href="http://mxcl.github.com/homebrew/"&gt;Homebrew&lt;/a&gt;. It&amp;#8217;s quite convenient and so far I have no issues with it. My impression is it&amp;#8217;s pragmatic. E.g. doing &lt;code&gt;brew install mercurial&lt;/code&gt; doesn&amp;#8217;t install the mercurial package but recommends that you do &lt;code&gt;brew install pip&lt;/code&gt; then &lt;code&gt;pip install mercurial&lt;/code&gt;. It makes sense. Also, &lt;code&gt;brew&lt;/code&gt; system is built in Ruby so I had no trouble looking at the package &lt;em&gt;formulae&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://code.google.com/p/redis/"&gt;&lt;strong&gt;Redis&lt;/strong&gt;&lt;/a&gt;. &lt;em&gt;A very fast key value store&lt;/em&gt;. Using redis is fun. It takes a much more (personally) enjoyable approach to storing data &amp;#8212; using constructs such as lists and sets instead of rows and sql. I say enjoyable because with redis, the way your data is stored is close to the way you actually model and code your data. I bookmarked &lt;a href="http://code.google.com/p/redis/wiki/CommandReference"&gt;its command reference&lt;/a&gt; for easy access.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://rvm.beginrescueend.com/"&gt;&lt;strong&gt;rvm&lt;/strong&gt;&lt;/a&gt;. &lt;em&gt;Ruby Version Manager&lt;/em&gt;. Playing around with multiple versions of Ruby without pain. Gemsets are really wonderful. My usual setup is one gemset per web project (be it Rails or sinatra).&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.ruby-lang.org/en/downloads/"&gt;&lt;strong&gt;Ruby 1.9&lt;/strong&gt;&lt;/a&gt;. Saying goodbye to Ruby 1.8 is not so hard anymore since &lt;code&gt;rvm&lt;/code&gt;. But I compiled Ruby 1.9 from source and it is now the default Ruby in my system.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.sinatrarb.com/"&gt;&lt;strong&gt;Sinatra&lt;/strong&gt;&lt;/a&gt;. Moving away from Rails is always an option. And could also a very liberating decision. With Sinatra, I write code my way (at least, I think that&amp;#8217;s how it is). There are frameworks built on Sinatra (e.g. &lt;a href="http://monkrb.com/"&gt;monk&lt;/a&gt;, &lt;a href="http://www.padrinorb.com"&gt;padrino&lt;/a&gt;) so if ever you don&amp;#8217;t want to use Rails for some reason, I&amp;#8217;d suggest Sinatra.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://monkrb.com/"&gt;&lt;strong&gt;Monk&lt;/strong&gt;&lt;/a&gt;. &lt;em&gt;A glue framework built on Sinatra&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://nodejs.org/"&gt;&lt;strong&gt;Nodejs&lt;/strong&gt;&lt;/a&gt;. Wohow. V8 JS not on the browser. I experimented on it a while back since I &amp;lt;3 programming javascript. I wish I can build some crazy service using node soon.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://mercurial.selenic.com/"&gt;&lt;strong&gt;Mercurial&lt;/strong&gt;&lt;/a&gt;. I use this when I&amp;#8217;m in Python mode.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.haskell.org/ghc/"&gt;&lt;strong&gt;GHC&lt;/strong&gt;&lt;/a&gt;. I&amp;#8217;ve been &lt;a href="http://book.realworldhaskell.org/read/"&gt;reading&lt;/a&gt; on Haskell in the past two weeks, and I find the experience fun, exciting, and mind bending.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.zeromq.org/"&gt;&lt;strong&gt;ZeroMQ&lt;/strong&gt;&lt;/a&gt;. &lt;em&gt;Fastest. Messaging. Ever.&lt;/em&gt; For pub/sub, I used ØMQ and its Python binding.&lt;/p&gt;</description><link>http://www.timmedina.net/post/499926170</link><guid>http://www.timmedina.net/post/499926170</guid><pubDate>Tue, 06 Apr 2010 13:07:00 +0800</pubDate><category>tools</category><category>toolbox</category></item><item><title>Note to self: /usr/local/bin in osx path</title><description>&lt;p&gt;After removing &lt;a href="http://guide.macports.org/chunked/installing.macports.uninstalling.html"&gt;macports&lt;/a&gt; and installing &lt;a href="http://github.com/mxcl/homebrew"&gt;homebrew&lt;/a&gt;, I encountered a problem when I installed &lt;code&gt;pycurl&lt;/code&gt; (a dependency of &lt;a href="http://tornadoweb.org/"&gt;tornado&lt;/a&gt;). &lt;code&gt;pycurl&lt;/code&gt; requires a newer version (v7.19) of &lt;code&gt;libcurl&lt;/code&gt; than what my system (osx 10.5.8) has (v7.16). So I grabbed the &lt;a href="http://www.opensource.apple.com/source/curl/curl-57/"&gt;curl source&lt;/a&gt; and installed it (&lt;code&gt;./configure --with-ca-bundle=/usr/share/curl/curl-ca-bundle.crt &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;/code&gt;). With the newer &lt;code&gt;curl&lt;/code&gt; installed in &lt;code&gt;/usr/local&lt;/code&gt;, I tried installing pycurl again, and it failed. Checking my $PATH, I found out that &lt;code&gt;/usr/local/bin&lt;/code&gt; is the last entry. I read the &lt;code&gt;/etc/profile&lt;/code&gt; and the &lt;code&gt;/usr/libexec/path_helper&lt;/code&gt; and attempted to reorganize the PATH but instead decided to remove &lt;code&gt;/usr/local/bin&lt;/code&gt; from &lt;code&gt;/etc/paths&lt;/code&gt; and manually add it in &lt;code&gt;/etc/profile&lt;/code&gt;.&lt;/p&gt;</description><link>http://www.timmedina.net/post/490340774</link><guid>http://www.timmedina.net/post/490340774</guid><pubDate>Fri, 02 Apr 2010 11:15:19 +0800</pubDate><category>installation</category><category>homebrew</category><category>macports</category><category>osx</category><category>note_to_self</category></item><item><title>Google's Python Class</title><description>&lt;a href="http://code.google.com/edu/languages/google-python-class/"&gt;Google's Python Class&lt;/a&gt;: &lt;p&gt;&lt;a href="http://videolearning.tumblr.com/post/449909911/google-python-class" class="tumblr_blog"&gt;videolearning&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;2 day class, 7 videos. Introduction to Python, that lets you work more quickly and integrate your systems more effectively.&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://www.timmedina.net/post/469087878</link><guid>http://www.timmedina.net/post/469087878</guid><pubDate>Wed, 24 Mar 2010 08:59:27 +0800</pubDate><category>python</category></item><item><title>Note to self: Add mysql bin dir to path</title><description>&lt;p&gt;When installing &lt;code&gt;mysql&lt;/code&gt; gem in Ruby 1.9.1 (using &lt;a href="http://rvm.beginrescueend.com"&gt;rvm&lt;/a&gt;), the process keeps on failing even when specifying &lt;code&gt;--with-mysql-dir=/usr/local/mysql&lt;/code&gt; etc. Apparently the solution is to add the &lt;code&gt;/usr/local/mysql&lt;/code&gt; to &lt;code&gt;$PATH&lt;/code&gt; before issuing the &lt;code&gt;gem install&lt;/code&gt; command.&lt;/p&gt;</description><link>http://www.timmedina.net/post/434935785</link><guid>http://www.timmedina.net/post/434935785</guid><pubDate>Tue, 09 Mar 2010 01:25:28 +0800</pubDate><category>solutions</category><category>ruby1.9.1</category><category>mysql</category><category>gems</category></item><item><title>"Fail fast, fail open."</title><description>“Fail fast, fail open.”</description><link>http://www.timmedina.net/post/365234493</link><guid>http://www.timmedina.net/post/365234493</guid><pubDate>Mon, 01 Feb 2010 23:46:21 +0800</pubDate></item><item><title>SWFUpload + Rails == Invalid Authenticity Token</title><description>&lt;p&gt;&lt;a href="http://github.com/lardawge/swfupload-rails-authentication"&gt;http://github.com/lardawge/swfupload-rails-authentication&lt;/a&gt;&lt;/p&gt;</description><link>http://www.timmedina.net/post/341220557</link><guid>http://www.timmedina.net/post/341220557</guid><pubDate>Tue, 19 Jan 2010 02:26:00 +0800</pubDate><category>rails</category><category>swfupload</category><category>jquery</category></item><item><title>openssl, eventmachine, and the ruby 1.8.7 (and ree, too) bus error</title><description>&lt;p&gt;Rails 3 is going to require at least Ruby 1.8.7 so I decided to install Ruby Enterprise Edition  on my Mac. I have OSX Leopard (10.5.8) and use macports. After installing &lt;a href="http://rvm.beginrescueend.com/"&gt;rvm&lt;/a&gt;, I encountered the same problem whenever I executed my web server in my Rails app:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/usr/local/rvm/ree-1.8.7-2009.10/lib/ruby/1.8/openssl/ssl.rb:31: [BUG] Bus Error
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.8.0], MBARI 0x8770, Ruby Enterprise Edition 2009.10
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The culprit is that I have two openssl installations and the eventmachine gem isn&amp;#8217;t compiled with the same openssl as the my REE install. This issue was reported &lt;a href="http://github.com/eventmachine/eventmachine/issues#issue/11"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So the solution is either to recompile REE to use Macport&amp;#8217;s openssl or recompile eventmachine to use the system&amp;#8217;s openssl lib. I chose to recompile REE.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo rvm install ree --configure --enable-shared=true,--with-openssl-dir=/opt/local --debug
&lt;/code&gt;&lt;/pre&gt;</description><link>http://www.timmedina.net/post/319568080</link><guid>http://www.timmedina.net/post/319568080</guid><pubDate>Wed, 06 Jan 2010 17:49:38 +0800</pubDate><category>ruby1.8.7</category><category>ruby</category><category>ree</category><category>openssl</category><category>bus error</category><category>osx</category><category>eventmachine</category><category>macports</category></item><item><title>Symbian development on Linux and OS X</title><description>&lt;a href="http://www.martin.st/symbian/"&gt;Symbian development on Linux and OS X&lt;/a&gt;</description><link>http://www.timmedina.net/post/204268136</link><guid>http://www.timmedina.net/post/204268136</guid><pubDate>Sun, 04 Oct 2009 23:58:41 +0800</pubDate><category>symbian</category><category>osx</category><category>mobile</category><category>tools</category></item><item><title>Adding Date And Time To Your Bash History</title><description>&lt;a href="http://www.howtoforge.com/adding-date-and-time-to-your-bash-history"&gt;Adding Date And Time To Your Bash History&lt;/a&gt;: &lt;p&gt;export HISTTIMEFORMAT=”%h/%d - %H:%M:%S “&lt;/p&gt;</description><link>http://www.timmedina.net/post/179337744</link><guid>http://www.timmedina.net/post/179337744</guid><pubDate>Fri, 04 Sep 2009 11:44:53 +0800</pubDate></item><item><title>RailsAPI Textmate Bundle</title><description>&lt;a href="http://github.com/gunn/railsapi-tmbundle/tree/master"&gt;RailsAPI Textmate Bundle&lt;/a&gt;: &lt;p&gt;Textmate bundle for viewing Rails documentation (using railsapi.com).&lt;/p&gt;</description><link>http://www.timmedina.net/post/159538694</link><guid>http://www.timmedina.net/post/159538694</guid><pubDate>Mon, 10 Aug 2009 11:43:23 +0800</pubDate><category>rails</category><category>textmate</category></item><item><title>Moved to Tumblr</title><description>&lt;p&gt;I migrated my stuff from &lt;a href="http://slicehost.com"&gt;Slicehost&lt;/a&gt; to &lt;a href="http://tumblr.com"&gt;tumblr&lt;/a&gt;. I started by backing up the contents of my slice to my laptop &lt;a href="http://articles.slicehost.com/2007/10/9/backing-up-your-files-with-rsync"&gt;using rsync&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rsync -e ssh -avl --delete --stats --progress user@timmedina.com:/home/user backup
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After everything was backed up, I deleted my slice, bought a .net domain, and configured my tumblr account to &lt;a href="http://www.tumblr.com/docs/custom_domains"&gt;use custom domain names&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m still thinking of a way to organize my website. I&amp;#8217;ll probably learn to &lt;a href="http://www.tumblr.com/docs/custom_domains"&gt;create custom themes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And I have to add commenting, too.&lt;/p&gt;</description><link>http://www.timmedina.net/post/159234863</link><guid>http://www.timmedina.net/post/159234863</guid><pubDate>Mon, 10 Aug 2009 01:43:59 +0800</pubDate><category>rsync</category><category>tumblr</category></item><item><title>Tumblenote!</title><description>&lt;a href="http://tumblenote.tumblr.com/"&gt;Tumblenote!&lt;/a&gt;</description><link>http://www.timmedina.net/post/155543683</link><guid>http://www.timmedina.net/post/155543683</guid><pubDate>Tue, 04 Aug 2009 17:34:03 +0800</pubDate></item><item><title>PL/Python cheatsheet with some tute links</title><description>&lt;a href="http://www.postgresonline.com/journal/index.php?/archives/106-PL-Python-Cheatsheet-Overview.html"&gt;PL/Python cheatsheet with some tute links&lt;/a&gt;</description><link>http://www.timmedina.net/post/104871733</link><guid>http://www.timmedina.net/post/104871733</guid><pubDate>Fri, 08 May 2009 11:42:00 +0800</pubDate><category>python</category></item><item><title>Postgresql Leopard Gotchas</title><description>&lt;a href="http://earthcode.com/blog/2008/01/postgresql_on_leopard_gotchas.html"&gt;Postgresql Leopard Gotchas&lt;/a&gt;: &lt;p&gt;After a fresh postgresql installation, &lt;code&gt;initdb&lt;/code&gt; didn’t work until I reset the &lt;code&gt;kern.sysv.shmall&lt;/code&gt; and &lt;code&gt;kern.sysv.shmmax&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo sysctl -w kern.sysv.shmmax=134217728
sudo sysctl -w kern.sysv.shmall=65536
&lt;/code&gt;&lt;/pre&gt;</description><link>http://www.timmedina.net/post/104404145</link><guid>http://www.timmedina.net/post/104404145</guid><pubDate>Thu, 07 May 2009 10:12:00 +0800</pubDate><category>osx</category><category>leopard</category><category>postgresql</category></item><item><title>A Better ri</title><description>&lt;a href="http://danielchoi.com/software/ri-enhanced.html"&gt;A Better ri&lt;/a&gt;</description><link>http://www.timmedina.net/post/99577867</link><guid>http://www.timmedina.net/post/99577867</guid><pubDate>Fri, 24 Apr 2009 14:54:00 +0800</pubDate><category>ruby</category></item><item><title>Debian Administration: Using GNU Screen </title><description>&lt;a href="http://www.debian-administration.org/articles/34"&gt;Debian Administration: Using GNU Screen &lt;/a&gt;: &lt;p&gt;&lt;ul&gt;&lt;li&gt;screen
&lt;ul&gt;&lt;li&gt;Run a new screen session&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;screen -R
&lt;ul&gt;&lt;li&gt;Reattach to a previously detatched session&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Ctrl-a c
&lt;ul&gt;&lt;li&gt;Create a new window.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Ctrl-a k
&lt;ul&gt;&lt;li&gt;Kill the current window - after confirmation&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Ctrl-a Ctrl-a
&lt;ul&gt;&lt;li&gt;Switch to the other window&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Ctrl-a S
&lt;ul&gt;&lt;li&gt;Split the current window in two.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Ctrl-a TAB
&lt;ul&gt;&lt;li&gt;Move between split sections of the screen.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Ctrl-a A
&lt;ul&gt;&lt;li&gt;Give the the current window a name.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Ctrl-a ”
&lt;ul&gt;&lt;li&gt;List all windows - move around to change the window with the arrow keys&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/p&gt;</description><link>http://www.timmedina.net/post/98832169</link><guid>http://www.timmedina.net/post/98832169</guid><pubDate>Wed, 22 Apr 2009 16:13:46 +0800</pubDate><category>screen</category></item><item><title>Using Debugger in a Phusion Passenger Dev setup</title><description>&lt;a href="http://duckpunching.com/passenger-mod_rails-for-development-now-with-debugger"&gt;Using Debugger in a Phusion Passenger Dev setup&lt;/a&gt;: &lt;p&gt;My setup: Rails 2.1.2, Passenger 2.2.1, ruby-debug 0.10.3&lt;/p&gt;</description><link>http://www.timmedina.net/post/98360152</link><guid>http://www.timmedina.net/post/98360152</guid><pubDate>Tue, 21 Apr 2009 10:16:36 +0800</pubDate><category>ruby on rails</category></item><item><title>app-engine-patch -- ignoring mediagenerator</title><description>&lt;p&gt;move the django admin media files from _generated_media/1/admin to some directory inside the PROJECT_DIR:&lt;/p&gt;
&lt;p&gt;1. move the admin dir to desired location, say PROJECT_DIR/admin_media&lt;/p&gt;
&lt;p&gt;2. modify app.yaml urls to point to that static_dir location, e.g. add&lt;/p&gt;
&lt;p&gt;- url: /admin_media&lt;/p&gt;
&lt;p&gt;static_dir: admin_media&lt;/p&gt;
&lt;p&gt;3. modify the MEDIA_URL and ADMIN_MEDIA_PREFIX in settings.py&lt;/p&gt;
&lt;p&gt;MEDIA_URL = &amp;#8220;/media/&amp;#8221;&lt;/p&gt;
&lt;p&gt;ADMIN_MEDIA_PREFIX = &amp;#8220;/admin_media/&amp;#8221;&lt;/p&gt;
We need to override MEDIA_URL so that when we access the media_url path from the templates, we don&amp;#8217;t get the altered media_url (settings_post.py alters this by appending the MEDIA_VERSION by interpolating the %s. ADMIN_MEDIA_PREFIX is also based on the MEDIA_URL, but we want it to use /admin_media.</description><link>http://www.timmedina.net/post/97855838</link><guid>http://www.timmedina.net/post/97855838</guid><pubDate>Mon, 20 Apr 2009 02:16:10 +0800</pubDate><category>django</category><category>appengine</category><category>app-engine-patch</category></item><item><title>Installed some stuff today</title><description>&lt;p&gt;wxpython from http://www.wxpython.org/download.php Unicode py2.5 build&lt;/p&gt;
&lt;p&gt;sqlalchemy 0.5.3 via easy_install&lt;/p&gt;
&lt;p&gt;phusion passenger 2.2 and nginx (installed via passenger)&lt;/p&gt;</description><link>http://www.timmedina.net/post/97852791</link><guid>http://www.timmedina.net/post/97852791</guid><pubDate>Mon, 20 Apr 2009 02:04:19 +0800</pubDate><category>python</category><category>eggs</category><category>ruby</category><category>ruby on rails</category></item></channel></rss>
