##Set by students
No phones, no chat with classmates during class/lessons Patience, understanding with each other Don't be distracted by social media/video games Keep the classroom tidy Collaborate with each other
| url = "http://www.google.com" | |
| params_hash = {:param_1=>"value_1", :param_2=>"value_2"} | |
| parameterized = params_hash.map{ |k,v| "#{k}=#{v}" }.join("&") | |
| [url, "?", parameterized].join #=> http://www.google.com?param_1=value_1¶m_2=value_2 |
| When /^I send (.*) (GET|POST|PUT|DELETE) request to (.* path)(?: with:)?$/ do |format, method, path, *body| | |
| headers = case format | |
| when /xml/i | |
| { 'CONTENT_TYPE' => 'text/xml' } | |
| when /json/i | |
| { 'CONTENT_TYPE' => 'application/json' } | |
| else | |
| {} | |
| end |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| #the command below will look at ALL objects in history and show you the biggest ones | |
| git rev-list --all --objects | | |
| sed -n $(git rev-list --objects --all | cut -f1 -d' ' | git cat-file --batch-check | grep blob | sort -n -k 3 | tail -n40 | while read hash type size; do echo -n "-e s/$hash/$size/p "; done) | sort -n -k1 | |
| #the command below will remove all reference for a given file | |
| git filter-branch --force --index-filter 'git rm --cached -r --ignore-unmatch REPLACE_WITH_PATH' --prune-empty --tag-name-filter cat -- --all | |
| # remove old referenes | |
| rm -rf .git/refs/original/ | |
| # remove old referenes | |
| git reflog expire --expire=now --all | |
| # recreate referenes |