start new:
tmux
start new with session name:
tmux new -s myname
# This is a guide for how I installed rails 3.2.2 on Mac OS X 10.7.3 Lion upgrade. | |
# There is no Warranty expressed, and I am not responsible for any issues that may arise from following this guide. | |
# - inspired by tuscanidream | |
# Install RVM | |
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
# Add the following line to your .bash_profile to load RVM into your new shells | |
[[ -s "/Users/my_user_name/.rvm/scripts/rvm" ]] && source "/Users/my_user_name/.rvm/scripts/rvm" # This loads RVM into a shell session. |
#!/usr/bin/env bash | |
uninstall() { | |
list=`gem list --no-versions` | |
for gem in $list; do | |
gem uninstall $gem -aIx | |
done | |
gem list | |
gem install bundler | |
} |
description "Discourse Application" | |
# automatically start | |
start on (local-filesystems and net-device-up IFACE!=lo) | |
chdir /home/discourse/discourse | |
env RAILS_ENV=production | |
pre-start exec mkdir -p logs |
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.
# based on http://stackoverflow.com/questions/549186/change-background-of-terminal-app-from-the-commandline | |
function darkback { | |
osascript -e "tell application \"Terminal\" to set background color of window 1 to {0,0,0}" | |
} | |
function lightback { | |
osascript -e "tell application \"Terminal\" to set background color of window 1 to {65535,65535,65535}" | |
} |
#!/usr/bin/env python | |
# saved to ~/bin/batcharge.py and from | |
# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity | |
#!/usr/bin/env python | |
# coding=UTF-8 | |
import math, subprocess | |
p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE) | |
output = p.communicate()[0] |
#!/bin/sh | |
figlist | awk '/fonts/ {f=1;next} /control/ {f=0} f {print}' | while read font; do | |
echo "=== $font ===" | |
echo $font | figlet -f $font | |
done | less |
vendor/ | |
.bundle/ | |
node_modules/ | |
Gemfile.lock |
#!/bin/bash | |
# Set the ROOM_ID & AUTH_TOKEN variables below. | |
# Further instructions at https://www.hipchat.com/docs/apiv2/auth | |
ROOM_ID=XXX | |
AUTH_TOKEN=XXX | |
MESSAGE="Hello world!" | |
curl -H "Content-Type: application/json" \ |