Is this the real life? Is this just fantasy? Caught in a landslide No escape from reality Open your eyes Look up to the skies and see I'm just a poor boy, I need no sympathy Because I'm easy come, easy go A little high, little low Anyway the wind blows, doesn't really matter to me, to me
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"postData": { | |
"title": "JSON for Your Thoughts", | |
"date": "2014-05-01" | |
}, | |
"outline": { | |
"why": "why you should use this", | |
"what": "what JSON is", | |
"how": "how to write it", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.navigator.userAgent.indexOf("IE") >= 0) { | |
console.log("This guy is running IE. Get us out of here!!!"); | |
window.alert("Get a better browser."); | |
window.location("http://chrome.google.com"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file: rest-server.rb | |
require 'sinatra' | |
# all status codes given are based on W3C standards | |
get '/' do | |
'Here is some data.' | |
end | |
post '/' do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git remote add upstream $1 | |
git pull origin HEAD # make sure it's recent | |
git fetch upstream HEAD # fetch origin's fork changes | |
git merge upstream/HEAD &>/dev/null || git rebase upstream/master # apply changes | |
git rebase HEAD # keep HEAD at the top | |
git push origin HEAD # push changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch | |
git rebase origin/master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
which $command &>/dev/null && echo true || echo false |
Domain | Kingdom | Examples |
---|---|---|
Bacteria | Eubacteria | E. coli |
Archaea | Archaebacter | Halophiles |
Eukarya | Protista | fungus-like: slime mold, plant-like: algae, animal-like amoeba |
Eukarya | Fungi | Mushroom |
Eukarya | Plantae | Sunflower |
Eukarya | Animalia | Wolf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chmod 700 ~/.ssh | |
chmod 600 ~/.ssh/authorized_keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download RBEnv | |
git clone git://github.com/sstephenson/rbenv.git $HOME/.rbenv | |
# Find out which shell init file exists. | |
if [ -f $HOME/.zshrc ] | |
then | |
SHELL_INIT="$HOME/.zshrc" | |
elif [ -f $HOME/.bashrc ] | |
then | |
SHELL_INIT="~/.bashrc" |