Oct 16 2010
- 04/10/2011 - Updated application.js and application.rb thanks to @rebo's comments
In this article, I will walk through some simple steps to get a [demo app][2] up and running with [Backbone.js][3] and [Sinatra][4] on [Heroku][5].
#!/bin/sh | |
set -e | |
if [ -z "$1" ]; then | |
ruby-build --definitions | |
exit 1 | |
fi | |
if [ -z "$2" ]; then | |
rev=1 |
As configured in my dotfiles.
start new:
tmux
start new with session name:
# put this at ~/.gitconfig | |
[alias] | |
# I'm lazy, so two letters will always trump the full command | |
co = checkout | |
ci = commit | |
cp = cherry-pick | |
st = status | |
br = branch |
This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.
# Ensure system is in ship-shape.
aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev
#!/bin/sh | |
# | |
# /etc/init.d/tomcat -- startup script for the Tomcat 7 servlet engine | |
# | |
# Modified init-Script from Ubuntu Tomcat init-script | |
# | |
# 2010 - Sebastian Mogilowski - http://www.mogilowski.net/2010/12/11/install-tomcat-7-on-debian-lenny-with-virtual-hosts-and-apache2-integration/ | |
# 2012 - Collin Peters - Added debug option | |
# | |
### BEGIN INIT INFO |
#!/bin/bash | |
usage() | |
{ | |
cat << EOF | |
usage: $0 options | |
This script set ownership for all table, sequence and views for a given database | |
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'watir-webdriver' | |
require 'watir-webdriver/wait' | |
def wait(sec) | |
sleep sec | |
if sec == 1 | |
puts "Wait for 1 second" |
# Chef resources describing how to set up package repository server, | |
# simplified fromactual cookbook (not open sourced yet). Sets up apt | |
# repository in /srv/apt directory, with system user "apt-repo". Packages | |
# are GPG-signed to prevent apt-get from complaining on every install. | |
# | |
# Directory /srv/apt should be reachable to clients via http or other | |
# means. This is left as an exercise for the reader. | |
# | |
# For extra explanations, see: | |
# http://joseph.ruscio.org/blog/2010/08/19/setting-up-an-apt-repository/ |
#!/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 | |
} |