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
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
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
[{"faceAnnotations":[{"landmarks":[{"type":"LEFT_EYE","position":{"x":267.9632568359375,"y":267.1448974609375,"z":-0.0016142273088917136}},{"type":"RIGHT_EYE","position":{"x":328.3736267089844,"y":267.34320068359375,"z":43.396759033203125}},{"type":"LEFT_OF_LEFT_EYEBROW","position":{"x":246.9328155517578,"y":250.86810302734375,"z":-11.135098457336426}},{"type":"RIGHT_OF_LEFT_EYEBROW","position":{"x":296.7423400878906,"y":255.49539184570312,"z":-2.360119104385376}},{"type":"LEFT_OF_RIGHT_EYEBROW","position":{"x":327.44207763671875,"y":254.90284729003906,"z":19.28240966796875}},{"type":"RIGHT_OF_RIGHT_EYEBROW","position":{"x":352.1405944824219,"y":250.13198852539062,"z":63.3874397277832}},{"type":"MIDPOINT_BETWEEN_EYES","position":{"x":311.80865478515625,"y":268.9999694824219,"z":10.090723037719727}},{"type":"NOSE_TIP","position":{"x":317.74432373046875,"y":319.380859375,"z":0.42038241028785706}},{"type":"UPPER_LIP","position":{"x":305.08697509765625,"y":344.5230407714844,"z":19.892587661743164}},{"type":"LOWER |
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
// console overwrite for IE8 | |
if (window.console === undefined) { | |
window.console = {}; | |
console.log = function() {}; | |
console.error = function() {}; | |
} |
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
// Tell terminal where FileMerge lives. | |
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
// Configure git to use FileMerge | |
git config --global merge.tool opendiff | |
// Run mergetool | |
git mergetool |
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
#!/bin/bash | |
# Use > 1 to consume two arguments per pass in the loop (e.g. each | |
# argument has a corresponding value to go with it). | |
# Use > 0 to consume one or more arguments per pass in the loop (e.g. | |
# some arguments don't have a corresponding value to go with it such | |
# as in the --default example). | |
# note: if this is set to > 0 the /etc/hosts part is not recognized ( may be a bug ) | |
while [[ $# > 1 ]] | |
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
#!/bin/bash | |
echo 'Pulling initializr' | |
curl -o initializr.zip "http://www.initializr.com/builder?boot-hero&jquerymin&h5bp-favicon&h5bp-appletouchicons&modernizrrespond&simplehtmltag&izr-emptyscript&boot-css&boot-scripts" | |
echo 'Unzipping initializr' | |
unzip initializr.zip | |
echo 'Removing initializr' | |
rm initializr.zip | |
echo 'Copy to current directory' | |
cp -a initializr/. ./ | |
echo 'Remove initializr copy' |
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
window.addEventListener('orientationchange', checkPage); | |
function checkPage(){ | |
switch(window.orientation){ | |
case 90: | |
currentState = 'landscape'; | |
break; | |
case 0: | |
currentState = 'portrait'; | |
break; |