art.through(code) http://blog.toddwerth.com art.through(code) en-us 9 10 11 12 13 14 15 120 IR_Black for OS X Lion http://blog.toddwerth.com/entries/13 <p><img src="/entry_files/13/lion_logo.jpg" alt="" /></p> <p> A while back, when Lion was in beta, <a href="http://twitter.com/#!/fyrabanks">@fyrabanks</a> provided me with an updated IR_Black theme for Lion's Terminal (<a href="/entries/6">original IR_Black article</a>). Because Terminal now lets you change the colors, SIMBL is no longer required. </p> <br/>...<p> <a href="http://blog.toddwerth.com/entries/13">Read article</a> </p> Thu, 21 Jul 2011 00:00:00 +0000 http://blog.toddwerth.com/entries/13 Bashmarks - Bookmarking for the command-line http://blog.toddwerth.com/entries/12 <p><img src="http://www.infinitered.com/blog_extras/common_fx/command_prompt.jpg" alt="" /></p> <p> Bashmarks is a simple set of bash functions that allows you to bookmark folders in the command-line. </p> <h2>Example</h2> <pre class="textmate-source"> ~ > cd dropbox ~/dropbox > bookmark db Bookmark 'db' saved ~/dropbox > cd Pictures ~/Pictures > bookmark pictures Bookmark 'pictures' saved ~/Pictures > go db ~/dropbox > bookmarksshow /Users/joebloe/dropbox db /Users/joebloe/Pictures pictures ~/dropbox > </pre> <br/>...<p> <a href="http://blog.toddwerth.com/entries/12">Read article</a> </p> Wed, 18 May 2011 00:00:00 +0000 http://blog.toddwerth.com/entries/12 Codemen, Redefining Style http://blog.toddwerth.com/entries/11 <p><img src="/entry_files/11/codemen_icon.png" alt="" /></p> <br/>...<p> <a href="http://blog.toddwerth.com/entries/11">Read article</a> </p> Wed, 11 May 2011 00:00:00 +0000 http://blog.toddwerth.com/entries/11 acts_as_boolean Ruby on Rails plugin http://blog.toddwerth.com/entries/10 <p><img src="/entry_files/on_off_button.png" alt="On off switch image" /></p> <p><strong><a href="http://github.com/twerth/acts_as_boolean" title="twerth's acts_as_boolean at master &mdash; GitHub">acts_as_boolean</a></strong> is a <strong><a href="http://www.rubyonrails.org/" title="Ruby on Rails">Ruby on Rails</a></strong> plugin I wrote, that treats a column as a boolean, whether it&#8217;s a tinyint, integer, float, string, etc. No matter how true and false are stored in the database.</p> <br/>...<p> <a href="http://blog.toddwerth.com/entries/10">Read article</a> </p> Tue, 18 Nov 2008 09:00:00 +0000 http://blog.toddwerth.com/entries/10 My Vim configuration files http://blog.toddwerth.com/entries/9 <p><img src="/entry_files/vim_logo.png" alt="Vim Logo" /></p> <p> Some people in the comments of this <a href="/entries/8" title="The last Vim color scheme you'll ever need">article</a> and this <a href="/entries/6" title="A black OS X Leopard Terminal theme that is actually readable">article</a> requested my vimrc file. Rather than just providing it, I think it is better to check it into a source repository so people can get the latest version. You can get all my Vim files here: </p> <p><a href="http://github.com/twerth/dotfiles/tree/master" title="GitHub/twerth/dotfiles">GitHub Repository</a></p> <br/>...<p> <a href="http://blog.toddwerth.com/entries/9">Read article</a> </p> Tue, 07 Oct 2008 00:00:00 +0000 http://blog.toddwerth.com/entries/9 The last Vim color scheme you'll ever need http://blog.toddwerth.com/entries/8 <p><a href="/entry_files/8/ir_black.vim"><img src="/entry_files/8/vim_logo.png" alt="Vim Logo" /></a><br/> <a href="/entry_files/8/ir_black.vim">Color Scheme</a></p> <p>This color scheme is based off of my popular <a href="/entries/show/2" title="IR Black theme article">IR_Black theme</a> for TextMate. </p> <p>When thinking of <a href="http://www.vim.org/" title="vim main site">vim</a> or <a href="http://en.wikipedia.org/wiki/Vi" title="vi Wikipedia site">vi</a>, visually appealing UI doesn't normally enter your mind. But that isn't due to a lack of features, because its support for syntax coloring is one the best I've seen; the only thing slightly better is <a href="http://macromates.com/" title="TextMate home page">TextMate</a>. It's due to the poor color schemes many people use.</p> <br/>...<p> <a href="http://blog.toddwerth.com/entries/8">Read article</a> </p> Wed, 30 Apr 2008 09:36:00 +0000 http://blog.toddwerth.com/entries/8 Artists keep scrapbooks of art and designs they like. You, developer, should do the same http://blog.toddwerth.com/entries/7 <p><img src="/entry_files/7/a.png" alt=" "/></p> <p> It's common for artists, such as graphic designers, to keep scrapbooks of designs that catch their eye. This could be a logo, typeface, color scheme, page layout, or whatever else they deem of high quality. They use these scrapbooks (which traditionally were books with scraps of paper in them) to get inspiration, to help them develop their own style (by identifying likes and dislikes), or simply to browse. </p> <h2>Why does this matter to you, a developer?</h2> <p> That's a good question, and at first when I started to keep a scrapbook, I did it mainly for visual designs like web-pages. But once I started I realized it would work really well for diagrams, code, clever UI elements, or really any content that I think is exceptional. </p> <p> If I'm working on a task, and feel bogged down and un-creative, I'll browse my scrapbook, getting inspiration. I look for little things that make the scraps great. I ask myself, why is this particularly good? This works just as well for a sort routine in code, as it does for logo design. </p> <p> The main benefits of keeping a scrapbook are: </p> <ul> <li>creating the habit of looking for, and identifying, content that you like, and</li> <li>browsing the scrapbook at a later time to get your creative juices flowing</li> </ul> <br/>...<p> <a href="http://blog.toddwerth.com/entries/7">Read article</a> </p> Mon, 21 Apr 2008 09:12:00 +0000 http://blog.toddwerth.com/entries/7 A black OS X Leopard Terminal theme that is actually readable http://blog.toddwerth.com/entries/6 <p><img src="http://www.infinitered.com/blog_extras/common_fx/command_prompt.jpg" alt="" /></p> <p>OS X Leopard was released with an updated Terminal application, which now has tabs, window groups, and many other new features. My excitement to replace the often slow <a href="http://iterm.sourceforge.net/" title="iTerm on Sourceforge">iTerm</a> was quickly extinguished as I realized that the new Terminal.app has some glaring problems:</p> <ul> <li>The first is the inability to set the title of the tab as you do in iTerm, gnome-terminal, etc. That one I can live with, as there are work-arounds.</li> <li>The other major problem is the horrible black themes that come with it (<a href="http://www.infinitered.com/blog_extras/ir_black_terminal/irb_term_example_bad_2.png" title="Bad theme example image">bad</a> and <a href="http://www.infinitered.com/blog_extras/ir_black_terminal/irb_term_example_bad_1.png" title="Worse theme example image">worse</a>). Apple is one of those companies who pay very close attention to visual details such as these, so it's surprising that they gave us such horrible choices.</li> </ul> <p>So I decided to make a new theme, based on a subset of my popular <a href="http://macromates.com/" title="TextMate — The Missing Editor for Mac OS X">TextMate</a> theme <a href="/entries/2" title="IR_Black blog entry Infinitered">IR_Black</a>. The problem is the new Terminal app provides no way to set the ANSI colors; even though you can create your own themes (Settings), you can't change the colors. Ciarán Walsh provides a great solution to this on his <a href="http://ciaranwal.sh/2007/11/01/customising-colours-in-leopard-terminal" title="Ciarán Walsh blog entry on terminal colors">blog</a>, which uses the also great <a href="http://www.culater.net/software/SIMBL/SIMBL.php" title="SIMBL">SIMBL</a>. </p> <br/>...<p> <a href="http://blog.toddwerth.com/entries/6">Read article</a> </p> Fri, 25 Jan 2008 00:00:00 +0000 http://blog.toddwerth.com/entries/6 A simple Ruby command-line application skeleton http://blog.toddwerth.com/entries/5 <p><img src="http://www.infinitered.com/blog_extras/common_fx/ruby_cl.jpg" alt="" /></p> <p>To write a <a href="http://en.wikipedia.org/wiki/Command_line_interface" title="Wikipedia Entry: Command line interface">command-line</a> application in Ruby is very simple, the following two-line application converts everything in the <a href="http://en.wikipedia.org/wiki/Standard_streams" title="Wikipedia Entry: Standard streams">standard input</a> to upper case and then outputs it: </p> <pre class="textmate-source"><span class="source source_ruby"><span class="comment comment_line "><span class="punctuation ">#</span>!/usr/bin/env ruby </span>puts <span class="support support_class support_class_ruby">STDIN</span><span class="punctuation ">.</span>read<span class="punctuation ">.</span>upcase</span></pre> <p>Although complete, this is hardly a proper application, which should include options, arguments, help, input error trapping, etc. I've created a skeleton for such a command-line application.</p> <br/>...<p> <a href="http://blog.toddwerth.com/entries/5">Read article</a> </p> Tue, 11 Dec 2007 10:55:00 +0000 http://blog.toddwerth.com/entries/5 Fun and profit by modifying your Bash startup files in OS X, Linux, and other fine unices http://blog.toddwerth.com/entries/4 <p><img src="http://www.infinitered.com/blog_extras/command_line_fx/kb_control_wide_short_bw2.jpg" alt="Meaningless graphic" /></p> <p>If you've been learning the <a href="http://en.wikipedia.org/wiki/Command_line_interface" title="Wikipedia Entry: Command line interface">command-line</a> and you have the basics down <em>(you should be, as the most effective way to use a computer is a combination of a GUI and command-line)</em>, the next step is to customize your environment.</p> <p>The ability to fully customize your <a href="http://en.wikipedia.org/wiki/Unix_shell" title="Wikipedia Entry: Unix Shell (computing)">shell</a> is one of the most powerful things about the command-line. It's a dry subject, and mastering it won't get you favors from the opposite sex (although it should), but it can be very useful.</p> <p>There are many ways to customize your shell, but the first one you should learn is modifying your <a href="http://en.wikipedia.org/wiki/bash" title="Wikipedia Entry: bash">Bash</a> startup files (assuming your shell is Bash, which is the default in OS X, Linux, and many other unices). </p> <p>When I first learned how to customize bash, I found an overwhelming amount of information and opinion, which made it difficult. This article is intended to give you the fundamental concepts so that you can create your own startup files, and understand how they work. To give you an example, I go through a subset of my own files, section by section. </p> <br/>...<p> <a href="http://blog.toddwerth.com/entries/4">Read article</a> </p> Wed, 03 Oct 2007 05:53:00 +0000 http://blog.toddwerth.com/entries/4 Converting a black TextMate theme to white using a simple Ruby application http://blog.toddwerth.com/entries/3 <a href="http://www.infinitered.com/settings/IR_White.tmTheme.zip"><img src="http://www.infinitered.com/blog_extras/textmate_theme_extras/theme_icon_bw2.jpg" alt="TextMate theme" /></a><br/> <a href="http://www.infinitered.com/settings/IR_White.tmTheme.zip">Download Theme</a> (once downloaded, simply double click on the file to install) I created the <a href="/entries/2">IR_Black</a> theme, and some people asked for a white version of it. So instead of doing it manually I thought a quick <a href="http://www.ruby-lang.org">Ruby</a> script to make all the colors darker would work well.inf <br/>...<p> <a href="http://blog.toddwerth.com/entries/3">Read article</a> </p> Thu, 26 Apr 2007 00:00:00 +0000 http://blog.toddwerth.com/entries/3 The last TextMate theme you'll ever need http://blog.toddwerth.com/entries/2 <p><a href="http://www.infinitered.com/settings/IR_Black.tmTheme.zip"><img src="http://www.infinitered.com/blog_extras/textmate_theme_extras/theme_icon_bw2.jpg" alt="TextMate theme" /></a><br/> <a href="http://www.infinitered.com/settings/IR_Black.tmTheme.zip">Download Theme</a> (once downloaded, simply double click on the file to install)</p> <p>This theme is based off of the Succulent and Brilliance Dull themes. I wanted a black theme that had different colors for a wide variety of items, with coordinated colors between like items.</p> <br/>...<p> <a href="http://blog.toddwerth.com/entries/2">Read article</a> </p> Thu, 29 Mar 2007 00:00:00 +0000 http://blog.toddwerth.com/entries/2 Installing Ruby and Ruby On Rails from scratch on OS X using DarwinPorts / MacPorts http://blog.toddwerth.com/entries/1 <p><img src="http://www.infinitered.com/blog_extras/ruby_osx_screencast/apple_ruby_bw2.jpg" alt="Ruby OS X graphic" /></p> <p>A fresh install of Mac OS X to Ruby on Rails, the right way, in a 28 minute screencast. </p> <p>Many tutorials skip the little steps, causing people to get stuck. This screen-cast starts with a fresh install of Mac OS X Tiger (10.4.8), then goes step by step through the process of setting up a complete development environment for Ruby and Ruby on Rails. </p> <p>I show you how to setup the following: </p> <ul> <li><a title="XCode" href="http://developer.apple.com/tools/download/">XCode</a></li> <li><a title="TextMate" href="http://macromates.com/">TextMate</a></li> <li><a title="iTerm" href="http://iterm.sourceforge.net/">iTerm</a></li> <li><a title="DarwinPorts/MacPorts" href="http://www.macports.org/">DarwinPorts/MacPorts</a> <em>Note: the screencast mentiones DarwinPorts, but it is now MacPorts. This link has been updated</em></li> <li><a title="Ruby" href="http://www.ruby-lang.org">Ruby</a></li> <li><a title="Ruby Gems" href="http://rubygems.org/read/chapter/1">Ruby Gems</a></li> <li><a title="Ruby on Rails" href="http://www.rubyonrails.org/">Ruby on Rails</a></li> </ul> <br/>...<p> <a href="http://blog.toddwerth.com/entries/1">Read article</a> </p> Wed, 31 Jan 2007 14:45:00 +0000 http://blog.toddwerth.com/entries/1