OSX, RubyGems and cross-thread violations in rb_gc

I recently decided to migrate away from OSX’s default ruby install yesterday and noticed a few quirky hangups. Firstly, for some reason, and I’m not sure if it is just me or not, OSX’s default $PATH variable is putting /usr/local/bin AFTER /bin making your local installs not enabled by default. (Editing the /etc/paths didn’t do [...]

More



Subversion Info in Ruby / Rails

I was trying to tag a few of my internal apps with a subversion revision number just for personal reference. Since running the command svn info yields YAML-ish output the ruby YAML library can load it. Sweet. The next step was just wrapping it in a class and creating some instance variables and methods for [...]

More



History Meme

Took the idea from Dive Into Mark because I’m bored.
If you’re curious to see which commands you use the most just run:
$>history | awk ‘{a[$2]++}END{for(i in a){print a[i] ” ” i}}’ | sort -rn | head

# local server
133 l
70 cd
47 svn
38 ..
29 e
26 mv
20 ll
10 rm
10 cp
8 ror

# remote server
123 l
74 cd
35 [...]

More



Best Bash Prompt

Okay — so after that last post I decided it was time for a change. I’ve had the same bash prompt for years and was starting to get tired of it. Over the past 30 or so minutes I’ve been hating life learning way more than I wanted to about PS1, colors and embedded IF [...]

More



OSX Terminal Niceties for Remote Servers

I have absolutely no idea what to title this as — and frankly, its more for me than anyone else. I need a place to store this before I forget and go racking my brain 2 years from now on how to do this.
If you think you’re interested — this post is about the following:

How [...]

More



Prepend files in OS X using the Command Line

This is a neat little “trick” to prepend something simple to the beginning of a file. Linux is funny in the way that you can easily append to a file by using echo “append me to the file” >> FILE but theres no real simple way to prepend. Most snippets I’ve seen use a tmp [...]

More



Making find and tar play nicely

Because I’ll forget #1023
Problem
Use Linux’s “find” command to hunt recursively through the current directory tree and find all matching files. While this is simple enough, I’m an idiot and tend to delete important files when drinking working too much — which we all know sucks. It would be nice to have it take all found [...]

More



Custom Global Keybindings in Gnome / Ubuntu

Simple custom keybindings in Gnome/Ubuntu
Gnome’s default keybinding app sucks (maybe Linus was right and Gnome treats its users like idiots? sucks for me I guess). Here is a way to bind anything you’d like to any key you’d like, globally. I found this useful because I naturally use WIN-E for an explorer or WIN-R for [...]

More



How To Subdomain Localhost — Ubuntu / OSX

Using Gnome + Ubuntu (7.04 Feisty Fawn) + Apache 2
Step 1:
In gnome goto System -> Administration -> Network and click on the ‘Hosts’ tab
Step 2:
For your normal localhost (127.0.0.1) double-click or hit ‘properties’ to edit it. Add your list of subdomains under localhost.
*Ignore the text in this pic, I overlooked that you had to include [...]

More



Ubuntu Error: Hal failed to initialize & udev address already in use – Solution

This is more for me in case it ever happens again. My system froze up while doing some stupid stuff (namely pressing keys I shouldn’t be pressing) so i force-rebooted it (aka: kicked the surge protector). When I re-booted I got the “Hal failed to initialize” message which is apparently pretty common and was supposed [...]

More



 Page 1 of 2  1  2 »