This file contains 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
This file contains 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
// BEM mixins (Block, Element, Modifier) | |
// | |
// Just google if you're confused. | |
@mixin block($name) { | |
@at-root .#{$name} { | |
@content; | |
} | |
} |
This file contains 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 "Before cleanup:"; | |
git branch; | |
echo "----"; | |
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d; | |
echo "----"; | |
echo "After cleanup:"; | |
git branch; |
This file contains 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 | |
i=0; | |
git stash list | while read stash; do | |
git stash show -p --name-only "stash@{$i}" | grep "$1"; | |
status=$?; | |
if [ $status -eq 0 ]; then | |
echo " in $stash"; | |
fi | |
((i++)) | |
done; |
This file contains 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/php | |
<?php | |
function bad_usage($extra = null, $status = 1) { | |
if (! is_null($extra)) { | |
echo "Error: $extra\n\n"; | |
} | |
echo "Usage: sudo vhost \$directory \$domain\n"; | |
die($status); | |
} |
This file contains 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/php | |
<?php | |
/** | |
* Calibration: depending on your fonts and terminal colors, you may want to change these | |
*/ | |
global $PIXELS, $COLORS, $HSV_COLORS; | |
$YSCALE = 12; | |
$XSCALE = 5; |
This file contains 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
(function($) { | |
var TOUCH_START = 'touchstart'; | |
var TOUCH_MOVE = 'touchmove'; | |
var TOUCH_END = 'touchend'; | |
var num_touch_points = function(e) { | |
var o = e.originalEvent; | |
if (o.hasOwnProperty('touches')) { | |
return o.touches.length; |
This file contains 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
$.prototype.attrs = function(attr) { | |
var o = []; | |
$(this).each(function() { | |
var v = $(this).attr(attr); | |
if (v) { | |
o.push(v); | |
} | |
}); | |
return o; | |
} |
This file contains 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
<?php | |
class Accessible { | |
const inst_prefix = 'inst_'; | |
const stat_prefix = 'stat_'; | |
const trans_prefix = 'trans_'; | |
private $data = array(); |
This file contains 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
(function($) { | |
var default_prefs = { | |
"active_index" : 0, | |
"active_class" : 'active' | |
}; | |
var prefs = {}; | |
var methods = { | |
"init" : function(_prefs) { | |
var that = this; |
NewerOlder