Skip to content

Instantly share code, notes, and snippets.

View lzcabrera's full-sized avatar
:octocat:

Laura Cabrera lzcabrera

:octocat:
  • Victoria, BC
  • 18:47 (UTC -07:00)
View GitHub Profile
@lzcabrera
lzcabrera / create_github_repo.txt
Created December 2, 2013 03:41
Create a new Github repo via CLI
curl -u 'USER' https://api.github.com/user/repos -d '{"name":"REPO"}'
# Remember replace USER with your username and REPO with your repository||application name!
git remote add origin [email protected]:USER/REPO.git
git push origin master
@lzcabrera
lzcabrera / gist:7867292
Created December 9, 2013 04:13
.aliases
#Chrome
alias chrome="open -a Google\ Chrome\ Canary"
@lzcabrera
lzcabrera / git-commands
Last active August 29, 2015 14:03
useful git commands I tend to forget
# Git command to update remote origin
git remote set-url origin [[*.git]]
git push origin --delete [branch-name]
# If you are working in a branch that is/will become a pull-request against master, you can rebase against your master branch. Make sure it is up to date
(my-branch)$ git rebase -i master
@lzcabrera
lzcabrera / rbenv
Last active August 29, 2015 14:05
rbenv commands
# list all available versions:
$ rbenv install -l
# install a Ruby version:
$ rbenv install 2.0.0-p247
# set/unset local
$ rbenv local 1.9.3-p327
$ rbenv local --unset
@lzcabrera
lzcabrera / gist:71dbb08d66719be1de38
Last active August 29, 2015 14:05
rake db commands
rails g migration Add[*]And[#]To[TableName] *:string #:boolean
rails g migration Remove[*]From[TableName] *:integer
rake db:migrate
rake db:rollback
rake db:schema:dump
rake db:setup
# Migration commands
add_column
@lzcabrera
lzcabrera / callbacks
Created August 11, 2014 04:55
callbacks inside an active record model
before_validation
after_validation
before_save
after_save
before_create
after_create
before_update
@lzcabrera
lzcabrera / 0_reuse_code.js
Created August 14, 2014 23:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@lzcabrera
lzcabrera / rebase-commands
Created September 18, 2014 21:45
rebase belong to us
]$ git checkout feature-branch
]$ git rebase develop
]$ git checkout develop
]$ git merge feature-branch
@lzcabrera
lzcabrera / steps
Last active August 29, 2015 14:06
woff2 font-compression
*Download the reference codebase*
$ git clone https://code.google.com/p/font-compression-reference/
*Build the project*
cd font-compression-reference/woff2
make clean all
*Run the tool over a given font*
$ ./woff2_compress telusdings.ttf