Skip to content

Instantly share code, notes, and snippets.

@raywu
raywu / gist:1475548
Created December 14, 2011 06:48
.gvimrc 12/2011
if has("gui_macvim")
" Fullscreen takes up entire screen
set fuoptions=maxhorz,maxvert
" Command-T for CommandT
macmenu &File.New\ Tab key=<D-T>
map <D-t> :CommandT<CR>
imap <D-t> <Esc>:CommandT<CR>
" Command-Return for fullscreen
@raywu
raywu / gist:1475545
Created December 14, 2011 06:47
.vimrc 12/2011
set nocompatible
set number
set ruler
syntax on
" Set encoding
set encoding=utf-8
" Whitespace stuff
@raywu
raywu / gist:1471008
Created December 13, 2011 07:10 — forked from igrabes/gist:1471001
HTML Scraper
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'sqlite3'
require 'active_record'
require 'active_support'
ActiveRecord::Base.establish_connection(
:adapter => "sqlite3",
@raywu
raywu / RubyNuby_HW_Class.rb
Created May 23, 2011 23:50
Snuggs's HW: new class
class Cigs
def initialize(brand = "Cigarettes")
@brand = brand
end
def light
puts "I'm lighting up a #{@brand}."
end
def smoke
puts "#{@brand} tastes great!"
end
@raywu
raywu / LearnRuby_Die.rb
Created May 22, 2011 20:48
Chris Pine's exercises
class Die
def initialize
roll
end
def roll
@numberShowing = 1 + rand(6)
end
def showing