art.through(code)

A while back, when Lion was in beta, @fyrabanks provided me with an updated IR_Black theme for Lion's Terminal (original IR_Black article). Because Terminal now lets you change the colors, SIMBL is no longer required.

...
Read entire article

Bashmarks is a simple set of bash functions that allows you to bookmark folders in the command-line.

Example

~ > 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 > 
...
Read entire article

...
Read entire article

On off switch image

acts_as_boolean is a Ruby on Rails plugin I wrote, that treats a column as a boolean, whether it’s a tinyint, integer, float, string, etc. No matter how true and false are stored in the database.

...
Read entire article

Vim Logo

Some people in the comments of this article and this article 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:

GitHub Repository

...
Read entire article

Vim Logo
Color Scheme

This color scheme is based off of my popular IR_Black theme for TextMate.

When thinking of vim or vi, 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 TextMate. It's due to the poor color schemes many people use.

...
Read entire article

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.

Why does this matter to you, a developer?

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.

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.

The main benefits of keeping a scrapbook are:

  • creating the habit of looking for, and identifying, content that you like, and
  • browsing the scrapbook at a later time to get your creative juices flowing
...
Read entire article

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 iTerm was quickly extinguished as I realized that the new Terminal.app has some glaring problems:

  • 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.
  • The other major problem is the horrible black themes that come with it (bad and worse). 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.

So I decided to make a new theme, based on a subset of my popular TextMate theme IR_Black. 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 blog, which uses the also great SIMBL.

...
Read entire article

To write a command-line application in Ruby is very simple, the following two-line application converts everything in the standard input to upper case and then outputs it:

#!/usr/bin/env ruby 
puts STDIN.read.upcase

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.

...
Read entire article

Meaningless graphic

If you've been learning the command-line and you have the basics down (you should be, as the most effective way to use a computer is a combination of a GUI and command-line), the next step is to customize your environment.

The ability to fully customize your shell 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.

There are many ways to customize your shell, but the first one you should learn is modifying your Bash startup files (assuming your shell is Bash, which is the default in OS X, Linux, and many other unices).

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.

...
Read entire article
TextMate theme
Download Theme (once downloaded, simply double click on the file to install) I created the IR_Black theme, and some people asked for a white version of it. So instead of doing it manually I thought a quick Ruby script to make all the colors darker would work well.inf ...
Read entire article

TextMate theme
Download Theme (once downloaded, simply double click on the file to install)

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.

...
Read entire article

Ruby OS X graphic

A fresh install of Mac OS X to Ruby on Rails, the right way, in a 28 minute screencast.

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.

I show you how to setup the following:

...
Read entire article