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
from __future__ import print_function | |
import time | |
import gevent | |
from gevent import hub, _threading | |
def ticker(): | |
while 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
package main | |
import ( | |
"flag" | |
"log" | |
"os" | |
"os/signal" | |
"strings" | |
"github.com/Shopify/sarama" |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<style type="text/css"> | |
body { | |
margin: 0; | |
padding: 0; | |
} | |
canvas { |
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; |
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
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
/** | |
* Spinning cube in Molehill. | |
* http://ltslashgt.com/2011/02/28/molehill-spinning-cube/ | |
*/ | |
package { | |
import com.adobe.utils.AGALMiniAssembler; | |
import flash.display.Sprite; | |
import flash.display.Stage3D; | |
import flash.display.StageAlign; | |
import flash.display.StageScaleMode; |
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
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
$ 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."; |