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
$(document).ready(function(){ | |
$('.threesixty').threeSixty({ | |
dragDirection: 'horizontal' | |
}); | |
}); |
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
<div class="threesixty" data-path="assets/img/src/gem{index}.JPG" data-count="61"></div> |
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
var myModule = { | |
awesome: 'not really' | |
}; | |
if (typeof define === 'function' && define.amd) { | |
define('myModule', [], function() { | |
return myModule; | |
}); | |
} |
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
isRetina = ((window.devicePixelRatio===undefined?1:window.devicePixelRatio)>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
var orig = 'My sample body text', | |
split = orig.split(' '), | |
lastTwo = split.splice(split.length - 2); | |
lastTwo = lastTwo.join(' '); | |
split = split.join(' ') + ' ' + lastTwo; | |
orig = split; | |
// orig = 'My sample body text' |
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
cat ~/.ssh/id_rsa.pub | ssh user@server 'mkdir -p ~/.ssh; cat >> .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
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards | |
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2)" scp sftp ssh |
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
import math | |
import struct | |
import wave | |
import sys | |
w = wave.open(sys.argv[1], 'rb') | |
# We assume 44.1k @ 16-bit, can test with getframerate() and getsampwidth(). | |
sum = 0 | |
value = 0; | |
delta = 0; |
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
@import "compass/css3/transform"; | |
@import "compass/css3/transition"; | |
@mixin animation($animate...) { | |
$max: length($animate); | |
$animations: ''; | |
@for $i from 1 through $max { | |
$animations: #{$animations + nth($animate, $i)}; |
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
// updates the position of a bubble element | |
updatePosition: function($elem, x, y){ | |
var value = 'translate3d(' + x + 'px, ' + y + 'px, 0.1px)'; | |
// use Modernizr to get all the vendor prefixes | |
value = Modernizr._prefixes.join('transform' + ':' + value + '; '); | |
value = value.split(';'); | |
var props = {}; | |
// create an object to apply the vendor prefixed CSS properties | |
for(var i = 0; i < value.length; i++){ | |
var thisVal = value[i].split(':'); |
OlderNewer