$ brew install python --framework
$ mkdir ~/Library/Frameworks/
$ cd ~/Library/Frameworks/
$ ln -s /usr/local/Cellar/python/2.7.2/Frameworks/Python.framework .
$ brew install -vd ./vim.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
gem 'sequel', '= 3.0.0' | |
gem 'sinatra', '= 0.9.2' | |
require File.dirname(__FILE__) + '/lib/taps/config' | |
Taps::Config.database_url = ENV['DATABASE_URL'] # production db | |
Taps::Config.taps_database_url = ENV['TAPS_DATABASE_URL'] # db for taps | |
Taps::Config.login = 'myserverlogin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ psql | |
=# create table bigtable ( id bigserial, name text ); | |
NOTICE: CREATE TABLE will create implicit sequence "bigtable_id_seq" for serial column "bigtable.id" | |
CREATE TABLE | |
=# \d bigtable | |
Table "public.bigtable" | |
Column | Type | Modifiers | |
--------+--------+------------------------------------------------------- | |
id | bigint | not null default nextval('bigtable_id_seq'::regclass) | |
name | text | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 minutes ago | |
@natfriedman: Heroku looks amazing, but the pricing is awful. I wish I could get their deployment architecture on my own servers. | |
9 minutes ago | |
@natfriedman: Oh my god, I take it all back. Heroku is so wonderful I just started crying a little bit. This is worth the money. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
get '/' do | |
headers['Cached-Control'] = 'public, max-age=60' | |
Time.now.to_s | |
end | |
run Sinatra::Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
[alias] | |
st = status | |
ci = commit | |
co = checkout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function smart_pwd { | |
local pwdmaxlen=25 | |
local trunc_symbol=".." | |
local dir=${PWD##*/} | |
local tmp="" | |
pwdmaxlen=$(( ( pwdmaxlen < ${#dir} ) ? ${#dir} : pwdmaxlen )) | |
NEW_PWD=${PWD/#$HOME/\~} | |
local pwdoffset=$(( ${#NEW_PWD} - pwdmaxlen )) | |
if [ ${pwdoffset} -gt "0" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" comment an entire visual block at once | |
" highlight the area however you want (V, CTRL+V) then | |
" ,c will comment the block | |
" ,u will uncomment the block | |
let b:comment_leader = '# ' | |
au FileType haskell,vhdl,ada let b:comment_leader = '-- ' | |
au FileType vim let b:comment_leader = '" ' | |
au FileType c,cpp,java,php,js let b:comment_leader = '// ' | |
au FileType sh,make,perl,ruby,python let b:comment_leader = '# ' | |
au FileType tex let b:comment_leader = '% ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
domain = "*.example.com" | |
subjectAltDomains = [ domain, "example.com" ] | |
require 'openssl' | |
puts "Generating public and private keys..." | |
key = OpenSSL::PKey::RSA.new(2048) | |
subject = "/C=US/ST=California/L=Los Angeles/O=Example Inc./CN=#{domain}" | |
cert = OpenSSL::X509::Certificate.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://dealspl.us/souplantation-coupons/424752p |