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
// BSD-16 | |
// From: en.wikipedia.org/wiki/BSD_checksum | |
function bsd16(data) { | |
for(var i = 0, c = 0; i < data.length; i++) { | |
c = (c>>1) + ((c&1) << 15); | |
c += data[i]; | |
c &= 0xffff; | |
} | |
return c; | |
} |
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
// The shortest JavaScript hex color generator. | |
// Jannis R <mail@jannisr.de> | |
// https://gist.github.com/derhuerst/9142b15c78f3bfdbddfe | |
function randomHexColor(){ | |
var n = 6, s = '#'; | |
while(n--){ | |
s += (Math.random() * 16 | 0).toString(16); // random char from 0 to f |
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/sh | |
# | |
#################################### | |
# iTunes Command Line Control v1.0 | |
# written by David Schlosnagle | |
# created 2001.11.08 | |
# @edited Mateusz Gachowski | |
#################################### | |
showHelp () { |