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
### | |
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
<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
<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/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
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
$.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
(ns app.ui.views | |
(:require | |
[crate.core :as crate] | |
[crate.form :as form]) | |
(:use-macros | |
[crate.def-macros :only [defpartial]])) | |
(defpartial share-modal [content] | |
[:form#create-form.modal-body.form-horizontal | |
[:div.control-group |
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 app.ui.views | |
(:require [crate.form :as form]) | |
(:use-macros [dommy.macros :only [deftemplate]])) | |
(defpartial share-modal [content] | |
[:form#create-form.modal-body.form-horizontal | |
[:div.control-group | |
(form/label {:class "control-label"} "link" "download link") | |
[:div.controls | |
(form/text-field {:class "input-xlarge"} "link" (content :url))]]]) |
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 src='//spling.com/api/2/indexing/' defer async type='text/javascript'></script> |