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
(function() { | |
// lib | |
// Private | |
function canHandleError(err, block) { | |
return !block.errorClasses || block.errorClasses.some(function(errorClass) { | |
return err instanceof errorClass; | |
}); | |
} |
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
// Requires bufferWithMap custom operator (below). | |
function KeyEventManager (delay) { | |
this.shortcutsBySeqId = {}; | |
this.partialSequenceCounts = {}; | |
this.delay = delay; | |
} | |
KeyEventManager.prototype.connectObservable = function(observable) { | |
this.setupObservable(observable); |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
.foo { | |
color: black; | |
} | |
.bar { |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
body p .foo { | |
color: red; | |
} | |
.bar { |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
.example-block { | |
color: blue; | |
} | |
.example__actions { |
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 style = document.createElement('style'); | |
style.innerHTML = [ | |
'@-moz-keyframes spin {', | |
'from { -moz-transform: rotate(0deg); }', | |
'to { -moz-transform: rotate(360deg); }', | |
'}', | |
'@-webkit-keyframes spin {', | |
'from { -webkit-transform: rotate(0deg); }', | |
'to { -webkit-transform: rotate(360deg); }', | |
'}', |
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
throwAnError = function () { | |
throw new Error('Erroring!'); | |
} | |
window.windowMappedError = throwAnError; | |
try { | |
throwAnError(); | |
} catch(e) { | |
alert('Caught the global error'); |
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 ruby | |
abort "Need path to .zip!" if ARGV[0].nil? | |
abort "Need path to font directory!" if ARGV[1].nil? | |
full_path = ARGV[0] | |
target_path = ARGV[1] | |
filename = full_path.split('/').last.split('.').first | |
filename_no_num = filename.gsub(/\d+$/, '') | |
tmp_dir = File.directory?('tmp') ? 'tmp/' : '/tmp/' |
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/sh | |
T="$(date +%s)" | |
"$@" | |
T="$(($(date +%s)-T))" | |
#TIME=$(printf "Pretty format: %02d:%02d:%02d:%02d\n" "$((T/86400))" "$((T/3600%24))" "$((T/60%60))" "$((T%60))") | |
TIME=$(printf "%02dh%02dm%02ds\n" "$((T/3600%24))" "$((T/60%60))" "$((T%60))") | |
notify-send "Process Finished" "\"$1\" completed in $TIME." -i $HOME/Dropbox/Icons/emblem-important.svg |
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
(function() { | |
var defineProperty = Object.defineProperty || function(obj, name, desc) { | |
obj[name] = desc.value; | |
}; | |
var getOwnPropertyNames = Object.getOwnPropertyNames || function(obj) { | |
var names = []; | |
for(var key in obj) { | |
if(!obj.hasOwnProperty(key)) continue; |
NewerOlder