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(w,d){ | |
var rAF = w.requestAnimationFrame | |
|| w.mozRequestAnimationFrame | |
|| w.webkitRequestAnimationFrame | |
|| w.msRequestAnimationFrame | |
|| function(f){ f() } | |
var callbacks = [] | |
var pending = 0 | |
var hasOnload = 'onload' in d.createElement('link') |
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(){ | |
// Function to have a list of functions to load on fbAsyncInit | |
var toLoad = [] | |
window.fbReady = function(func){ | |
window.FB ? func.call(window) : toLoad.push(func) | |
} | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId: "#{FACEBOOK_API}", | |
status: true, |
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
/** | |
jQuery.Event.stop extension | |
=========================== | |
Simple shortcut to do: | |
$(document).on('click', 'a', function(e){ | |
return e.stop() | |
}) |
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
/* | |
* jQuery openSelect | |
* | |
* Matías Lescano | @touteo | |
* Licensed under the MIT license | |
*/ | |
;(function($){ | |
$.fn.openSelect = function(options){ | |
return this.each(function(){ |
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
<img src="sarasa.svg" onerror="this.onerror=null;this.src=this.src.replace(/.svg$/, '.png')"> |
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(w, d){ | |
var rAF = w.requestAnimationFrame | |
|| w.mozRequestAnimationFrame | |
|| w.webkitRequestAnimationFrame | |
|| w.msRequestAnimationFrame | |
|| function(f){ setTimeout(f, 0) } | |
var s = window.localStorage | |
var available = null |
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
@mixin css-guide { | |
content: ''; | |
position: absolute; | |
opacity: 0.3; | |
background-color: cyan; | |
} | |
@mixin css-guide-h { | |
@include css-guide; | |
left: 0; |
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
/** | |
* waitFor.js | |
* | |
* Silly lib that executes a given callback when a variable is defined on window. | |
* | |
* Matías Lescano | @mjlescano | |
* Licensed under the MIT license | |
*/ | |
;if( !window.waitFor ) (function(w){ |
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 | |
# Usage: | |
# retry <commands...> | |
# retry <retry times> <commands...> | |
# retry <retry times> <retry wait> <commands...> | |
if [[ $2 =~ ^-?[0-9]+$ ]]; then | |
cmd="${@:3}" | |
retry_times=$1 |
OlderNewer