Skip to content

Instantly share code, notes, and snippets.

View veganstraightedge's full-sized avatar
🐢
Computers were a mistake.

Shane Becker veganstraightedge

🐢
Computers were a mistake.
View GitHub Profile
@veganstraightedge
veganstraightedge / gist:1063033
Created July 4, 2011 08:05
blacklist of usernames
about
account
add
admin
api
app
apps
archive
archives
auth
@veganstraightedge
veganstraightedge / install pygments + fancy
Created August 3, 2011 22:32
steps to install pigments and the fancy lexer that are used on the rubinius site and blog
sudo easy_install Pygments
git clone https://github.com/fancy-lang/fancy-pygments
sudo python setup.py install
@veganstraightedge
veganstraightedge / gist:1138430
Created August 10, 2011 22:18 — forked from evanphx/gist:1138429
Rubinius HTML Profile
$ rbx -Xprofile -Xprofiler.json=glob.json scratch/big_glob.rb
$ rbx render_profile glob.json glob.html
or
$ RBXOPT="-Xprofile -Xprofiler.json=glob.json" rails s
$ rbx render_profile glob.json glob.html
[] ~: rails -h
Usage:
rails new APP_PATH [options]
Options:
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
-O, [--skip-active-record] # Skip Active Record files
[--skip-bundle] # Don't run bundle install
@veganstraightedge
veganstraightedge / caveatPatchor.js
Created October 27, 2011 20:47 — forked from protocool/caveatPatchor.js
Sample caveatPatchor.js file for use in Propane 1.1.2 and above
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@veganstraightedge
veganstraightedge / gist:1617363
Created January 15, 2012 21:15
Output from keyboard cleaning
///////////////////////////////////////''''''''''';........................................................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,m ,lllllllllllllllllll,klkl;klkkkkkkkkkkkkkkkkkkkkll.,l;.l;.;l;p;;;;;;;;;;''''''''''''''''
';
;;/';'[;[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ppp[p[][p-p;['pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppo;ppp]]]]]]]][]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]
\]['
\[
'']=[pol;'>?0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000
class Country < ActiveRecord::Base
class << self
def options_for_select
countries = []
usa = Country.where(:name => "United States").first
canadia = Country.where(:name => "Canada").first
countries << [usa.name, usa.id]
countries << [canadia.name, canadia.id]
countries + Country.order("name asc").all.map{ |c| [c.name, c.id] }
@veganstraightedge
veganstraightedge / 1_create_apples.rb
Created January 24, 2012 08:41
habtm in Rails 3.2
class CreateApples < ActiveRecord::Migration
def change
create_table :apples do |t|
t.string :name
end
end
end
@veganstraightedge
veganstraightedge / 1_create_apples.rb
Created January 24, 2012 08:48
habtm in rails 3.1
class CreateApples < ActiveRecord::Migration
def change
create_table :apples do |t|
t.string :name
end
end
end
@veganstraightedge
veganstraightedge / gist:2255302
Created March 30, 2012 21:34 — forked from ehoch/gist:1960548
Puma / DJ Procefile on Heroku
web: bundle exec puma -p $PORT
worker: bundle exec rake jobs:work