Public Gists by kwatson

Gravatar
Thu Nov 19 14:42:47 -0800 2009
1
2
3
require 'rubygems'
require 'exceptional'
require 'sinatra'
Gravatar
Fri Oct 09 01:05:31 -0700 2009
1
2
3
# If the amount has more than two zeros, this will preserve the original precision
 
amount = sprintf('%.4f', amount).sub(/0{1,2}$/, '')
Gravatar
Fri Oct 09 01:04:14 -0700 2009
1
amount.to_s.reverse.scan(/(?:\d*\.)?\d{1,3}-?/).join(',').reverse
Gravatar
Sat Oct 03 15:15:33 -0700 2009
1
2
3
Edit your hosts file: /etc/hosts.
 
127.0.0.1 ipsl.mygopherapp.i
Gravatar
Sat Oct 03 14:53:16 -0700 2009
1
2
3
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
Gravatar
Thu Oct 01 21:51:32 -0700 2009

      
Gravatar
Mon Sep 21 14:25:36 -0700 2009
1
ifconfig
Gravatar
Mon Sep 21 13:54:18 -0700 2009
1
2
3
sudo aptitude install libmagick9-dev
 
sudo gem install rmagick
gist: 190137 How to tar a folder in unix
Gravatar
Mon Sep 21 01:29:16 -0700 2009
1
2
3
to compress: tar -zcvf packagename.tar.gz folder/
 
to uncompress: tar -xvzf scheduler.tar.gz
gist: 190056 export a git repo
Gravatar
Sun Sep 20 20:54:10 -0700 2009
1
2
3
Export without compression: git archive master | tar -x -C /somewhere/else
 
With Compression: git archive master | bzip2 >source-tree.tar.bz2