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
#!/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
# 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
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
{ | |
"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
{ | |
"postData": { | |
"title": "Post Title", | |
"date": "2014-05-01" | |
} | |
} |
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
rsync -crzi --delete ./_site/ ubuntu@webserver:~/site/ | |
# -c (checksum) - ensures that unchanged files are not pushed | |
# -r (recursive) - recursive sync | |
# -z (compress) - compression for speed and conservation of bandwidth | |
# -i (itemize) - itemized output | |
# --delete - deletes extraneous files from server | |
# ./_site/ - local directory to sync | |
# ubuntu - remote username | |
# @webserver - webserver location |
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
// red | |
@red: #ee3f35; | |
// orange | |
@orange: #f6921c; | |
// yellow | |
@yellow: #e9c800; | |
// green |
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
user www www; | |
worker_processes 2; | |
events { | |
worker_connections 2000; | |
} | |
http { | |
gzip on; | |
gzip_types |
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
# Credentials | |
set imap_user = '[email protected]' | |
set imap_pass = 'GMAIL_PASSWORD' | |
# Servers | |
set smtp_url = 'smtp://[email protected]:587' | |
set smtp_pass = 'GMAIL_PASSWORD' | |
# Meta | |
set from = '[email protected]' |