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
// edited code (origin from http://imei.sms.eu.sk/index.html) | |
// ach, I hate italic | |
luhn = {}; | |
luhn.calculate = function(originalStr){ | |
var sum=0, delta=[0,1,2,3,4,-4,-3,-2,-1,0], | |
deltaIndex, deltaValue; |
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
getRandom = function(){ | |
var date = new Date().getTime(); | |
var random = Math.floor((Math.random()*800)+100); | |
return(date+random).toString(36); | |
}; |
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
# pick all deleted files and remove them | |
svn status | grep '^\!' | sed 's/! *//' | xargs -I% svn rm % | |
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
window.onmousemove = logMouseMove; | |
function logMouseMove(event) { | |
e = e || window.event; | |
mousePos = { x: e.clientX, y: e.clientY }; | |
console.log(mousePos); | |
} |
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 () { | |
// Shortcuts | |
var C = CryptoJS; | |
var C_lib = C.lib; | |
var Hasher = C_lib.Hasher; | |
var C_x64 = C.x64; | |
var X64Word = C_x64.Word; | |
var X64WordArray = C_x64.WordArray; | |
var C_algo = C.algo; |
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
data:image/gif;base64,R0lGODlhAQABAAAAACw= |
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
--------------------------------------------------- | |
Sample of Structure | |
/express.js | |
/views/javascript/jquery.js | |
/views/javascript/mootools.js | |
/views/stylesheets/resets.css | |
/views/stylesheets/globals.css |
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
vsetkySubory = getFromApi('zoznamVsetkychSuborov'); | |
vsetkySubory.forEach(function(subor, index){ | |
vsetkySubory[index] = parseTemplate(getFromApi(subor)); | |
callback(); | |
}) | |
function callback(){ | |
if (i===vsetkySubory.length) { | |
downloadZip() } else { i++ } |
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
sequence = ['1st','2nd','3rd','4th','5th','6th']; | |
function displaySequence(round, callback, i){ | |
var i = i ? i : 0; | |
if (i===round) { callback(); return; } | |
console.log(sequence[i] + ' > add'); | |
setTimeout(function(){ | |
console.log(sequence[i] + ' > rmv'); |
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
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o | |
o o o o | |
o o o o | |
o o | |
o o o o o o o o o o o o | |
o o o o o o | |
o 4 o 5 o o 2 o 3 o | |
o o o o o o | |
o o o o o o o o o o o o o o o o o o | |
o o o o |