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

<channel>
	<title>Martin Ström &#187; rails</title>
	<atom:link href="http://my-domain.se/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://my-domain.se</link>
	<description></description>
	<lastBuildDate>Wed, 11 Jan 2012 11:04:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>ℂ◉℗⒴ ℘ⓐṨͲℰ Ⓒℌ◭ℝ◬ℂ⒯℮ℛ</title>
		<link>http://my-domain.se/new-copypastecharacter/</link>
		<comments>http://my-domain.se/new-copypastecharacter/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 07:22:28 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[cpc]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://my-domain.se/?p=531</guid>
		<description><![CDATA[A few weeks ago we (me &#38; Konst &#38; Teknik) finally released the long taking new version of CopyPasteCharacter.com — a website to help people find and copy symbols and characters that are not very easily accessible from the keyboard. The main new thing, featurewise, is that we included many more characters than the previous [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://my-domain.se/wordpress/wp-content/uploads/2011/11/Screen-Shot-2011-10-13-at-16.44.32.png" alt="" title="" width="726" height="574" class="aligncenter size-full wp-image-533" /></p>

<p>A few weeks ago we (<a href="http://kon.st/teknik/martin">me &amp; Konst &amp; Teknik</a>) finally released the long taking new version of CopyPasteCharacter.com — a website to help people find and copy symbols and characters that are not very easily accessible from the keyboard.</p>

<p>The main new thing, featurewise, is that we included many more characters than the previous version had. More characters has been the top #1 feature request the past three years the site has been online. To make the site easy to use with all new characters, we have divided everything into different sets/collections such as &#8220;Numerals&#8221;, &#8220;Symbols&#8221; and &#8220;Graphic shapes&#8221;.<br />
We also made it possible to create your own set with characters and some smaller things like sharing sets and decide what set that should be the start set on CopyPasteCharacter.com.</p>

<p><img src="http://my-domain.se/wordpress/wp-content/uploads/2011/11/Screen-Shot-2011-10-13-at-16.44.16.png" alt="" title="Screen Shot 2011-10-13 at 16.44.16" width="726" height="574" class="aligncenter size-full wp-image-532" /></p>

<p><a href="//www.copypastecharacter.com">www.copypastecharacter.com</a></p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Paperclip processor to turn images into grayscale</title>
		<link>http://my-domain.se/paperclip-grayscale-processor/</link>
		<comments>http://my-domain.se/paperclip-grayscale-processor/#comments</comments>
		<pubDate>Mon, 17 May 2010 06:10:37 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[paperclip]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://my-domain.se/?p=360</guid>
		<description><![CDATA[We wanted to automatically create a grayscale version of the uploaded images for a current project. Here&#8217;s the Paperclip processor we&#8217;re using:]]></description>
			<content:encoded><![CDATA[<p>We wanted to automatically create a grayscale version of the uploaded images for a current project. Here&#8217;s the <a href="http://github.com/thoughtbot/paperclip">Paperclip</a> processor we&#8217;re using:</p>

<script src="http://gist.github.com/397144.js"></script>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RailsTerm 0.3</title>
		<link>http://my-domain.se/railsterm-03/</link>
		<comments>http://my-domain.se/railsterm-03/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 10:36:59 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://burnfield.com/martin/?p=193</guid>
		<description><![CDATA[Just a quick note that RailsTerm, my AppleScript to automatically open the tabs (in OS X 10.5 Terminal) needed for Rails development), is bumped to version 0.3. Since I use Passenger (mod_rails) and Passenger.prefpane for my local development the script will now auto detect the virtual hosts available on your system (in /etc/apache2/passenger_pane_vhosts/*.vhost.conf). I use [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://my-domain.se/wordpress/wp-content/uploads/2009/03/console.jpg" alt="Terminal + RailsTerm" title="Terminal + RailsTerm" width="600" height="442" class="alignnone size-full wp-image-195" /></p>

<p>Just a quick note that RailsTerm, my AppleScript to automatically open the tabs (in OS X 10.5 Terminal) needed for Rails development), is bumped to version 0.3.</p>

<p>Since I use <a href="http://www.modrails.com/">Passenger</a> (mod_rails) and <a href="http://www.fngtps.com/passenger-preference-pane">Passenger.prefpane</a> for my local development the script will now auto detect the virtual hosts available on your system (in <code>/etc/apache2/passenger_pane_vhosts/*.vhost.conf</code>). I use the script daily and is a real time-saver for me.</p>

<p><a href='http://burnfield.com/martin/wordpress/wp-content/uploads/railsterm1.zip'>RailsTerm</a> or browse source is on <a href="http://github.com/haraldmartin/railsterm">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Terminal Setup for Rails Development</title>
		<link>http://my-domain.se/my-terminal-setup-for-rails-development/</link>
		<comments>http://my-domain.se/my-terminal-setup-for-rails-development/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 09:15:27 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://burnfield.com/martin/?p=117</guid>
		<description><![CDATA[I&#8217;m quite happy with my Terminal.app setup right now for the Rails projects I&#8217;m working on and wanted to share the bits and pieces I use. First, I found a SIMB plugin for Terminal that&#8217;ll show the tab&#8217;s title in the tab instead of the running process. I use the plugin with a simple title [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m quite happy with my Terminal.app setup right now for the Rails projects I&#8217;m working on and wanted to share the bits and pieces I use.</p>

<p>First, I found a <a href="http://flickr.com/photos/djgraphite/2280004671/">SIMB plugin for Terminal</a> that&#8217;ll show the tab&#8217;s title in the tab instead of the running process. I use the plugin with a simple <code>title</code> helper in my <code>.bash_profile</code> to set the title simply.</p>

<pre><code>function title () {
  unset PROMPT_COMMAND # more on this later
  echo___ -ne "\e]0;$1\a"
}

# Usage:
# title 'my title'
</code></pre>

<p>Second, I use a technique I saw on <a href="http://pseudogreen.org/blog/set_tab_names_in_leopard_terminal.html">how to automatically set the title to display the current working directory as title</a>, but since I use the plugin and helper function above, I could simplify the <code>PROMPT_COMMAND</code> a bit:</p>

<pre><code>function set_window_and_tab_title {
  local title="$1"
  [[ -z "$title" ]] &amp;&amp; title="root"
  echo___ -ne "\e]0;${title}\a"
}

PROMPT_COMMAND='set_window_and_tab_title "${PWD##*/}"'
</code></pre>

<p>That&#8217;s why I unset <code>PROMPT_COMMAND</code> in my <code>title</code> function, so it won&#8217;t auto update when I choose to set it manually using the <code>title</code> function.</p>

<p>The last piece is an updated version of my old <a href="http://burnfield.com/martin/2007/07/19/applescript-to-open-iterm-tabs-for-rails-development/">Rails Term-script for iTerm</a> which has been updated (and improved) for the Terminal in Mac OS X Leopard instead of iTerm.</p>

<p>It will open the tabs I usually use when doing Rails development and set the title of each tab using the above mentioned functions. You need to enter you projects root directory and the projects you want to have easy access to. I&#8217;ve added some comments to the AS code to help you out.</p>

<p><a href="http://burnfield.com/martin/wordpress/wp-content/uploads/RailsTerm.zip">Download a zipped version of the AppleScript</a>. Just drag the script to the Script Editor (/Applications/Utilities) to edit it.</p>

<p>All source code for these scripts can also be viewed on <a href="http://pastie.textmate.org/230228">Pastie</a>. Let me know if you have any improvements.</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>./script/server with automatic port finder</title>
		<link>http://my-domain.se/scriptserver-with-automatic-port-finder/</link>
		<comments>http://my-domain.se/scriptserver-with-automatic-port-finder/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 21:20:15 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://burnfield.com/martin/?p=116</guid>
		<description><![CDATA[This is the script I&#8217;m using when I start my local Rails development server. It will automatically detect the next available port starting at the default port 3000 so I can have multiple servers running without remembering what ports that are already busy. #!/usr/bin/env ruby DEFAULT_PORT = 3000 puts (`ps aux &#124; grep [r]uby &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>This is the script I&#8217;m using when I start my local Rails development server. It will automatically detect the next available port starting at the default port 3000 so I can have multiple servers running without remembering what ports that are already busy.</p>

<pre><code>#!/usr/bin/env ruby

DEFAULT_PORT = 3000

puts (`ps aux | grep [r]uby | grep script/server`.split("\n").map { |l|
  server = l.split(/\s+/)[11..-1]
  (port = server.index('-p')) ? server[port.next].to_i : DEFAULT_PORT
}.max || DEFAULT_PORT - 1).next
</code></pre>

<p>I aliased it to <code>ss</code> in <code>.bash_profile</code> like this:</p>

<pre><code>alias ss='./script/server -p `~/bin/available_rails_port`'
</code></pre>

<p>(Btw, Happy 2008! I haven&#8217;t updated this site for a while)</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Modernize Rails (or: get rid of Verdana)</title>
		<link>http://my-domain.se/modernize-rails-or-get-rid-of-verdana/</link>
		<comments>http://my-domain.se/modernize-rails-or-get-rid-of-verdana/#comments</comments>
		<pubDate>Sat, 29 Dec 2007 10:29:55 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[railsplugin]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://burnfield.com/martin/2007/12/29/modernize-rails-or-get-rid-of-verdana/</guid>
		<description><![CDATA[Tired of see the the soooo 1999-ish font &#8220;Verdana&#8221; every time you get a local error page in Rails? Now you don&#8217;t have to. With this plugin the error pages will use Arial or Helvetica instead—finally! To install: ./script/plugin install http://burnfield.com/svn/martin/rails/plugins/verdano or as svn:external: ./script/plugin install -x http://burnfield.com/svn/martin/rails/plugins/verdano I&#8217;ve moved to git so the new [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://my-domain.se/wordpress/wp-content/uploads/verdano.png' alt='Verdano'></p>

<p>Tired of see the the soooo 1999-ish font &#8220;Verdana&#8221; every time you get a local error page in Rails? <br />
Now you don&#8217;t have to. With this plugin the error pages will use Arial or Helvetica instead—finally!</p>

<div class="del" markdown="0">
<del>To install:
<pre><code>./script/plugin install http://burnfield.com/svn/martin/rails/plugins/verdano</code></pre>
<p>or as svn:external:</p>
<pre><code>./script/plugin install -x http://burnfield.com/svn/martin/rails/plugins/verdano</code></pre>
</del>
</div>

<div class="add">
  <p>I&#8217;ve moved to git so the new instructions are: </p>
  <pre><code>git clone git://github.com/haraldmartin/verdano.git</code></pre>
  <p>or just <a href="http://evil.che.lu/projects/braid">braid it</a></p>
</div>

<p>Happy new year!</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>AppleScript to open iTerm tabs for Rails development</title>
		<link>http://my-domain.se/applescript-to-open-iterm-tabs-for-rails-development/</link>
		<comments>http://my-domain.se/applescript-to-open-iterm-tabs-for-rails-development/#comments</comments>
		<pubDate>Thu, 19 Jul 2007 10:53:40 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[iterm]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://burnfield.com/martin/2007/07/19/applescript-to-open-iterm-tabs-for-rails-development/</guid>
		<description><![CDATA[Update: This script is ported (and improved) to work with OSX Leopards&#8217; Terminal.app. I never really liked iTerm because of slow redrawing, ugly text anti aliasing and not reflowing text when resizing the window. After reading some interviews on a Rails site today and saw that a lot of people are using iTerm i wanted [...]]]></description>
			<content:encoded><![CDATA[<p>Update: <a href="http://burnfield.com/martin/2008/07/12/my-terminal-setup-for-rails-development/">This script is ported (and improved) to work with OSX Leopards&#8217; Terminal.app.</a></p>

<p><a href="http://www.flickr.com/photos/haraldmartin/850313291/"><img src="http://farm2.static.flickr.com/1021/850313291_b0fc5a1a29.jpg?v=0" alt=""></a></p>

<p>I never really liked <a href="http://iterm.sourceforge.net">iTerm</a> because of slow redrawing, ugly text anti aliasing and not reflowing text when resizing the window.</p>

<p>After reading some interviews on a Rails site today and saw that a lot of people are using iTerm i wanted to give one more try (because I&#8217;d really like a tabbed terminal).</p>

<p>It has improved a lot the latest months and seems really usable now. To make Rails development easier, I hacked together a small AppleScript what will ask you for the path to the Rails directory you want to use and then open four new tabs with Server/Mongrel, Console, Autotest and the directory itself. I thought it could be useful for others as well so here you go:</p>

<p>Save as an .app and run from Quicksilver:</p>

<pre><code>
global rails_dir

tell application "iTerm"
    activate
    set rails_dir to the text returned of (display dialog ¬
        "Please Enter the Path to Your Rails Directory" default answer ¬
        "~/Projects/" as text)

    if (count of terminal) = 0 then make new terminal

    my open_tab("Server", "&#038;&#038; ./script/server")
    my open_tab("Console", "&#038;&#038; ./script/console")
    my open_tab("Autotest", "&#038;&#038; autotest")
    my open_tab("Rails Directory", "")
end tell

on open_tab(title, command)
    tell application "iTerm" to tell first terminal
        launch session "Default"
        tell last session
            write text "cd " &#038; rails_dir &#038; command
            set name to title
        end tell
    end tell
end run_command
</code></pre>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

