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
newmtl cube | |
Ns 10.0000 | |
Ni 1.5000 | |
d 1.0000 | |
Tr 0.0000 | |
Tf 1.0000 1.0000 1.0000 | |
illum 2 | |
Ka 0.0000 0.0000 0.0000 | |
Kd 0.5880 0.5880 0.5880 | |
Ks 0.0000 0.0000 0.0000 |
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
/** | |
* Apple property list parser. | |
* | |
* For example, the following property list XML: | |
* | |
* <?xml version="1.0" encoding="UTF-8"?> | |
* <plist version="1.0"> | |
* <dict> | |
* <key>foo</key> | |
* <integer>1</key> |
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
$ mongo | |
MongoDB shell version: 2.0.0 | |
connecting to: test | |
> quit | |
function () { | |
return nativeHelper.apply(quit_, arguments); | |
} | |
> quit.toString = function() { return 'Type quit() to quit.'; } | |
function () { | |
return "Type quit() to quit."; |
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
# Rake Quick Reference | |
# by Greg Houston | |
# http://ghouston.blogspot.com/2008/07/rake-quick-reference.html | |
# ----------------------------------------------------------------------------- | |
# Running Rake | |
# ----------------------------------------------------------------------------- | |
# running rake from the command-line: | |
# rake --help |
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
powerSet = (set) -> | |
p = [[]] | |
for val in set | |
for i in [0...p.length] | |
p[p.length] = p[i].concat([val]) | |
p |
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
FILES=$(echo "man1/mailq.1 | |
man1/newaliases.1 | |
man1/postalias.1.gz | |
man1/postcat.1.gz | |
man1/postconf.1.gz | |
man1/postdrop.1.gz | |
man1/postfix.1.gz | |
man1/postkick.1.gz | |
man1/postlock.1.gz | |
man1/postlog.1.gz |
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.sha1 = (function() { | |
/* | |
* A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined | |
* in FIPS 180-1 | |
* Version 2.2 Copyright Paul Johnston 2000 - 2009. | |
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet | |
* Distributed under the BSD License | |
* See http://pajhome.org.uk/crypt/md5 for details. | |
*/ |
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
m = 4294967296 | |
a = 69069 | |
c = 1 | |
seed = 6 | |
for i in range(4): | |
seed = (a * seed + c) % m | |
print "%i" % (seed % 36) |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import argparse | |
import os | |
import requests | |
import sys | |
import zlib | |
from pythonopensubtitles import opensubtitles, utils |
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
// really slow: ~50s | |
try { | |
return ret.concat.apply([], ret); | |
} catch (e) { | |
if (e instanceof RangeError && ret.reduce) { | |
return ret.reduce(function(a, b) { | |
return a.concat(b); | |
}, []) | |
} else { | |
throw e; |