See https://gist.github.com/3449216
$ curl -O http://efele.net/maps/tz/world/tz_world.zip
$ wget http://efele.net/maps/tz/us/tz_us.zip
$ open tz_world.zip
from __future__ import with_statement | |
from kombu import BrokerConnection | |
from collections import defaultdict | |
import gevent | |
from gevent import monkey | |
monkey.patch_all() | |
class WorkerHub(): | |
""" | |
WorkerHub controls the local mailboxes that the @worker decorator assigns. |
var f = new Array(); | |
function S() { | |
var H; | |
if (H != 'j') { | |
H = '' | |
}; | |
var O; | |
if (O != 'Z') { | |
O = '' |
UserA at host1 -> UserB at host2: [UserA@host1 ~]ssh UserB@host2 | |
=> no password required | |
1. In host1 as UserA | |
UserA@host1:~> ssh-keygen -t rsa | |
Generating public/private rsa key pair. | |
Enter file in which to save the key (/home/UserA/.ssh/id_rsa): | |
Created directory '/home/UserA/.ssh'. | |
Enter passphrase (empty for no passphrase): | |
Enter same passphrase again: |
def run_seq(cmd): | |
"""Run `cmd` and yield its output lazily""" | |
p = subprocess.Popen( | |
cmd, shell=True, | |
stdin=subprocess.PIPE, | |
stdout=subprocess.PIPE, | |
stderr=subprocess.STDOUT) | |
# make STDIN and STDOUT non-blocking | |
fcntl.fcntl(p.stdin, fcntl.F_SETFL, os.O_NONBLOCK) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# author: mayli <mayli.he@gmail.com> | |
# | |
# Modified from Pinhole, and the original code is found here: | |
# {{{ http://code.activestate.com/recipes/114642/ (r1) | |
# | |
""" | |
usage: pinhole |
import java.io.*; | |
import org.apache.lucene.analysis.*; | |
import org.apache.lucene.util.Version; | |
public class MyAnalyzer extends Analyzer { | |
public TokenStream tokenStream(String fieldName, Reader reader) { | |
return | |
new StopFilter( | |
true, |
<?php | |
declare(ticks = 1); | |
function handleExit($signal) | |
{ | |
error_log("Caught a $signal signal, a worker process exiting\n", 3, './error-child-log'); | |
exit(1); | |
} | |
pcntl_signal(SIGTERM, 'handleExit'); |
See https://gist.github.com/3449216
$ curl -O http://efele.net/maps/tz/world/tz_world.zip
$ wget http://efele.net/maps/tz/us/tz_us.zip
$ open tz_world.zip
Prefix | Description | Notes | |
---|---|---|---|
sk_live_ | Live secret key | Secret key in a live environment. | |
pk_live_ | Live public key | Public key in a live environment. | |
pst_live_ | Live Connection token | Connection token in a live environment. | |
sk_test_ | Test secret key | Pecret key in a test environment. | |
pk_test_ | Test public key | Public key in a test environment. | |
pst_test_ | Test Connection token | Connection token in a test environment. | |
ac_ | Platform Client ID | Identifier for an auth code/client id. | |
acct_ | Account ID | Identifier for an Account object. | |
ch_ | Charge ID | Identifier for a Charge object. |