Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
#!/bin/bash | |
# Constants | |
# Variables | |
folder= | |
herokuapp= | |
init= | |
commit=`git rev-parse --short HEAD` |
class Utilities | |
{ | |
/** | |
* Normalize the data point between 0 - 1. The data is weighted to prop up | |
* smaller numbers to provide a more interesting spread. | |
* @param The normalized data point value. | |
* @return The weighted value. | |
*/ | |
public static Float normalize(float point, int max, int min) | |
{ |
[ | |
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }, | |
{ "keys": ["super+0"], "command": "reset_font_size" }, | |
{ "keys": ["super+k","super+w"], "command": "destroy_pane", "args": {"direction": "self"}}, | |
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} }, | |
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} }, | |
] |
{ | |
"caret_extra_width": 1, | |
"color_scheme": "Packages/Twilight+/Twilight+.tmTheme", | |
"file_exclude_patterns": | |
[ | |
"*.log" | |
], | |
"folder_exclude_patterns": | |
[ | |
".svn", |
git config --global alias.lol "log --graph --pretty=format:'%C(bold blue)%h%Creset %C(bold green)<%an>%Creset%Cgreen (%cr)%Creset%C(yellow)%d%Creset %s' --abbrev-commit --date=relative" | |
git config --global alias.lolme "log --graph --pretty=format:'%C(bold blue)%h%Creset %C(bold green)<%an>%Creset%Cgreen (%cr)%Creset%C(yellow)%d%Creset %s' --abbrev-commit --date=relative --author=$(git config user.email)" | |
git config --global alias.me "whatchanged --graph --pretty=format:'%C(bold blue)%h%Creset %C(bold green)<%an>%Creset%Cgreen (%cr)%Creset%C(yellow)%d%Creset %s' --abbrev-commit --date=relative --author=$(git config user.email)" |
.round { | |
-moz-border-radius: 10px; | |
-webkit-border-radius: 10px; | |
border-radius: 10px; | |
} |
rails generate rspec:install | |
# rails generate migration add_email_uniqueness_index | |
class AddEmailUniquenessIndex < ActiveRecord::Migration | |
def self.up | |
# add_index to :users. to :email, add a unique constriction. | |
add_index :users, :email, :unique => true | |
end | |
def self.down | |
remove_index :users, :email |
# -- Look at the name "add password to the table Users" with a encrypted_password column | |
# rails generate migration add_password_to_users encrypted_password:string | |
class AddPasswordToUsers < ActiveRecord::Migration | |
def self.up | |
add_column :users, :encrypted_password, :string | |
end | |
def self.down |