Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

"""This is an Aspen hook for supporting PJAX.
Install it in your project's configure-aspen.py like so:
website.hooks.outbound += [aspen_pjax.outbound]
"""
from pyquery import PyQuery as pq # http://pythonhosted.org/pyquery/
[12:28am] elliottcable: To describe what I'm doing: To anonymize my identity away from my private “savings” address, from which I'm drawing funds,
[12:28am] elliottcable: I'm preforming a “shared send.” This uses a third-party anonymizing service that forwards the money through hundreds of transactions, that “mix” the money with other peoples', making it virtually impossible to trace the transaction back through the public block-chain.
[12:28am] elliottcable: (Basically, it's socially-acceptable money laundering. Standard practice.)
[12:29am] elliottcable: This is going to trickle money out onto a new address of my own I've generated for this purpose; once it's full, I'll be generating two transactions. One to the address you just signed for me, a private transaction to yourself. You will then be able to draw on that money (publically), or launder it back to your own anonymous savings account, as you please.
[12:30am] elliottcable: The second will go to a public gittip.com address, which I'll help you generat
@chadwhitacre
chadwhitacre / repair-marketplace.py
Created March 20, 2013 11:04
This is a script I used to repair our marketplace after corrupting it with multiple valid cards/bank accounts per account. See https://github.com/gittip/www.gittip.com/issues/773.
#!/usr/bin/env python
import sys
sys.path.insert(0, 'env/lib/python2.7/site-packages') # kludge for running
# under foreman
import balanced
import gittip
from gittip import wireup
wireup.db()
main_loop = true;
^L
stuff = "blah";
finished();
^L
{{ stuff }}
var q = require('q'),
vm = require('vm'),
ctx = vm.createContext(),
script = vm.createScript("now = 1;");
script.runInContext(ctx);
console.log(ctx.now);
var q = require('q'),
vm = require('vm'),
ctx = vm.createContext({setTimeout: setTimeout, console: console, end: q.defer()}),
script = vm.createScript("now = 1; setTimeout(function() { now = 2; console.log('Inside the VM: ' + now); end.resolve() }, 1000);");
script.runInContext(ctx);
ctx.end.promise.then(function () {
console.log("Now process template with " + ctx.now);
}, 500);
[
{
"id": "GitTip.com/UserL33T/PubFund1",
"link": { "rel": "self", "type": "application/atom+xml", "href": "http://gittip.com/UserL33T/PubFund1" },
"updated": "20120930T180453Z",
"author": {"name": "UserL33T"},
"title": "UserL33T's First Published Fund",
"description": "UserL33T's First Published Fund is a Project",
"units_type": "USD",
"entries": [
#!/usr/bin/env python -u
import commands
import os
import random
import sys
import time
restart = '-s' in sys.argv
if restart:
SETUP_NEW_TIPS_TO = """
INSERT INTO tips (ctime, tipper, tippee, amount)
SELECT DISTINCT ON (tipper)
min(ctime), tipper, %s AS tippee, sum(amount)
FROM tips
WHERE tippee=%s OR tippee=%s
GROUP BY tipper, mtime
ORDER BY t
set showtabline=2
nmap <C-S-tab> :tabprevious<cr>
nmap <C-tab> :tabnext<cr>
nmap <C-t> :tabnew<cr>
nmap <C-w> :tabclose<cr>