Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)
- Some utilities:
sudo apt-get install vim tmux git curl
- Copy/paste from the command line:
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
#!/usr/bin/ruby1.8 | |
# Script to watch a directory for any changes to a haml file | |
# and compile it. | |
# | |
# USAGE: ruby haml_watch.rb <directory_to_watch> | |
# | |
# Original by Blake Smith / http://blakesmith.github.com/2010/09/05/haml-directory-watcher.html | |
# Modifications by fin / http://fin.io | |
# |
# source: http://goo.gl/BaVkQ | |
$ git log --name-status | |
# To delete a remote branch | |
$ git push origin :<branch_name> | |
[core] | |
editor = /Users/olistik/bin/subl | |
[user] | |
name = Maurizio De Magnis | |
email = [email protected] | |
[alias] | |
co = checkout | |
ci = commit | |
rb = rebase | |
st = status |
#!/usr/bin/env ruby | |
# giftube – Generates an animated gif from a YouTube url. | |
# | |
# Usage: | |
# | |
# giftube [youtube url] [minute:second] [duration] | |
# | |
# ex. | |
# |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
diff --git a/Gemfile b/Gemfile | |
index fd83475..a4c0255 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -5,7 +5,7 @@ gem 'rails', '3.2.3' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
-gem 'sqlite3' | |
+# gem 'sqlite3' |
sudo apt-get install vim tmux git curl
# Usage: | |
# rails new <app_name> -d postgresql -m https://raw.github.com/gist/2915895/c13055a80c6747d4ad0ef5b650d04c5a99e31dfc/hera.rb | |
# cd <app_name> | |
# heroku open | |
git :init | |
git add: "." | |
git commit: "-a -m 'Genesis'" | |
insert_into_file 'Gemfile', "ruby '1.9.3'\n", after: "source 'https://rubygems.org'\n" |
require 'HTTP' | |
require 'UV' | |
module Sinachiku | |
@routes = { 'GET' => [], 'POST' => [] } | |
def self.route(method, path, opts, &block) | |
@routes[method] << [path, opts, block] | |
end | |
def self.do(r) | |
@routes[r.method].each {|path| |