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
$.expr[':'].external = function(obj){ | |
return !obj.href.match(/^mailto\:/) | |
&& (obj.hostname != location.hostname); | |
}; | |
$('a:external').attr('target', '_blank'); |
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.time('expensive-function'); | |
setTimeout(function(){ | |
console.timeEnd('expensive-function'); | |
}, 2000); | |
>>> expensive-function: 2001.000ms |
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
<script type='text/javascript' id='spling-script'> | |
window.SPLING_URL = 'http://spling.com/widget-hero/user/ManVsWild/splingboards/most-watched'; | |
</script> | |
<script type="text/javascript" src="http://spling.com/s/g/widget.js"></script> | |
<script type='text/javascript' id='spling-script'> | |
window.SPLING_URL = 'http://spling.com/widget-hero/user/CashCab/splingboards/most-watched'; | |
</script> | |
<script type="text/javascript" src="http://spling.com/s/g/widget.js"></script> |
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
<script type='text/javascript' id='spling-script'> | |
window.SPLING_URL = 'http://spling.com/app/user/DanceMoms/splingboards-widget/dancemoms'; | |
</script> | |
<script type='text/javascript' src='//cdnjs.cloudflare.com/ajax/libs/jquery/1.7/jquery.min.js'></script> | |
<script type="text/javascript" src="http://spling.com/s/g/widget.js"></script> |
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
<script type='text/javascript' id='spling-script'> | |
window.SPLING_URL = 'http://spling.com/app/user/DanceMoms/splingboards-widget/dancemoms'; | |
</script> | |
<script type="text/javascript" src="http://spling.com/s/g/widget.js"></script> |
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
### | |
Walkers, used in the mixins walk, preWalk and postWalk | |
Note: against underscore argument convention due to | |
issues with _.partial | |
Shamelessly copied from bit.ly/X3tk8A | |
### | |
preWalk = (f, c)-> | |
_.walk f(c), _.partial(preWalk, f), _.identity |
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
# Extend underscore | |
_.mixin | |
lookupIterator: (v)-> | |
if _.isFunction(v) | |
return v | |
return (o)-> o[v] | |
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
<iframe id="dit-video-embed" width="640" height="360" src="http://static.discoverymedia.com/videos/components/dsc/effaa16e409c5d299de52b5877810aca2ee0aecf/snag-it-player.html?auto=yes" frameborder="0" scrolling="no" allowtransparency="true"></iframe> | |
<iframe id="dit-video-embed" width="100%" height="100%" src="http://static.discoverymedia.com/videos/components/dsc/effaa16e409c5d299de52b5877810aca2ee0aecf/snag-it-player.html?auto=yes" frameborder="0" scrolling="no" allowtransparency="true"></iframe> |
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
<html> | |
<head> | |
<title>The Grammy Awards Nominees</title> | |
<style type='text/css'> | |
body{ |
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
(ns async.macros | |
"Macros to avoid callback soup, act as defer/await " | |
(:use [taoensso.timbre :as timbre :only (trace debug info warn error fatal spy)])) | |
(defmacro let-async [bindings & body] |