Skip to content

Instantly share code, notes, and snippets.

View libbyschuknight's full-sized avatar
🏡
Working remotely

Libby Schumacher-Knight libbyschuknight

🏡
Working remotely
View GitHub Profile
@libbyschuknight
libbyschuknight / git_stuff
Last active December 21, 2015 19:20
Git stuff
git clone
git fetch origin branch - to get branch other than master
git checkout branch
IF HAVE PUSHED TO MASTER AND DIDN'T MEAN TO
git checkout -b libby
git stash save "Working on DOM"
git stash list
git checkout master
@libbyschuknight
libbyschuknight / testing_steps
Last active August 29, 2015 14:25
Testing Steps when creating a new Rails app
Magic Tricks of Testing (RailsConf) by Sandi Metz
https://speakerdeck.com/skmetz/magic-tricks-of-testing-railsconf
https://www.youtube.com/watch?v=URSWYvyc42M
Once created first model/resource - and have spec files
(Need to have run first migration and seeded some data)
Break down what you want each model/controller etc to do - e.g. what do I want to get out of the Ingredient model?
$ rails new "app_name" --database=postgresql --skip-test-unit
$cd "app_name"
$ git init
$ git add -A
$ git commit -m "first commit message"
@libbyschuknight
libbyschuknight / 0_reuse_code.js
Last active August 29, 2015 14:24
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
class Queue
def initialize
@store = []
end
def push(x)
@store.unshift(x)
end
def pop