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 (window) { | |
'use strict'; | |
var namespace = (function () { | |
// Private members | |
var core = { | |
// Public members | |
}; |
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
Install base tools: | |
yum groupinstall "Development Tools" | |
Now install openssl-devel: | |
yum install openssl-devel | |
Esta instalado en sudo su - | |
Install+update NODE: | |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.basic |
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
var countDown = function (finalDate) { | |
var final = new Date(finalDate), | |
today = new Date(), | |
diff = final.getTime() - today.getTime(), | |
days = Math.floor(diff / (1000 * 60 * 60 * 24)), | |
segs = Math.floor(diff / 1000); | |
return days; | |
}; |
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
$(window).on("scroll", function () { | |
if(window.scrollY + window.innerHeight == document.body.scrollHeight) { | |
console.log("bottom!"); | |
} | |
}); |
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
Show hidden characters
{ | |
"color_scheme": "Packages/Babel/Monokai Phoenix.tmTheme", | |
"font_face": "Monaco", | |
"font_size": 14, | |
"highlight_line": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"open_files_in_new_window": false, |
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
var http = require('http'), | |
httpProxy = require('http-proxy'); | |
httpProxy.createServer({ | |
hostnameOnly: true, | |
router: { | |
'test.me': '127.0.0.1:8080', | |
'test.com': '127.0.0.1:8081' | |
} | |
}).listen(80); |
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
/** | |
* Helpers | |
*/ | |
function clone(obj) { | |
var copy = {}, | |
prop; | |
for (prop in obj) { | |
if (hasOwn(obj, prop)) { | |
copy[prop] = obj[prop]; |
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
<script src="http://code.jquery.com/jquery-1.7.2.js"></script> | |
<script> | |
if (jQuery === undefined) { | |
var script = document.createElement('script'); | |
script.src = '/local/jquery.min.js'; | |
document.getElementsByTagName('head')[0].appendChild(script); | |
} | |
</script> |
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
// @see http://addyosmani.com/writing-modular-js/ | |
// library was previously defined | |
// AMD suppport | |
if (typeof window.define === 'function' && window.define.amd !== undefined) { | |
window.define('library', [], function () { | |
return library; | |
}); | |
// CommonJS suppport | |
} else if (typeof module !== 'undefined' && module.exports !== undefined) { |
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
document.addEventListener('click', function (event) { | |
event = event || window.event; | |
var target = event.target || event.srcElement; | |
console.log(target); | |
}); |
OlderNewer