Skip to content

Instantly share code, notes, and snippets.

Traceback (most recent call last):
File "/usr/local/bin/remote_api_shell.py", line 173, in <module>
run_file(__file__, globals())
File "/usr/local/bin/remote_api_shell.py", line 169, in run_file
execfile(script_path, globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/remote_api_shell.py", line 169, in <module>
main(sys.argv)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/remote_api_shell.py", line 165, in main
appengine_rpc.HttpRpcServer)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/remote_api_shell.py", line 81, in remote_api_shell
var ElectrumAddressGenerator = function () {
var curve = getSECCurveByName("secp256k1"),
G = curve.getG();
function big_int_hash(n, forChange, pubKey) {
return BigInteger.fromByteArrayUnsigned(
Crypto.SHA256(
Crypto.SHA256(
Crypto.charenc.UTF8.stringToBytes(
n + ':' + Number(forChange) + ':'
#!/usr/bin/env python
import base64, hashlib, hmac, json, sys, getpass
from Crypto.Cipher import AES
from Crypto.Hash import RIPEMD, SHA256
base58_chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
def prompt(p):
return getpass.getpass(p + ": ")
@anfedorov
anfedorov / jQueryForChromeExample.user.js
Created July 22, 2011 20:51 — forked from erikvold/jQueryForChromeExample.user.js
This userscript is meant to be an example on how to use jQuery in a userscript on Google Chrome.
// ==UserScript==
// @name helpers
// @namespace anfedorov
// @include *
// @author Andrey Fedorov
// @description
// ==/UserScript==
function load(library) {
var script = document.createElement("script");
// -- this --
function topOffset(obj) {
return obj ? obj.offsetTop + topOffset(obj.offsetParent) : 0;
}
// --- or this --
function topOffset(obj) {
var curtop = 0;
from collections import defaultdict
def new_trie():
t = defaultdict()
t.default_factory = lambda: [new_trie(), 0]
return t
def insert(t, s):
for c in s:
t = t[c][0]
macro let(Var v, Equals, Exp e, Block body) {
(function (<v>) {
<body>
})(<e>);
}
macro aif(Exp test, Block body) {
let it = <test> {
<body>
}
IF YOU ARE RECEIVING THIS MESSAGE, PLEASE SHARE IT IMMEDIATELY
(VERBALLY OR ON PAPER) WITH ANY COLLEAGUES WHOSE COMPUTERS MAY HAVE
SHUT DOWN.
At 11 a.m. today, 4/21, McAfee, released an update to its customers
that improperly identified a critical component of Windows as having
a virus.
The majority of McAfee's customers worldwide, automatically
propagates these virus definitions to their client PCs.
class BinAccum(object):
def __init__(self):
self.number = 0
self.place = 0
def __neg__(self):
self.place += 1
return self
18:14 <Yhg1s> fedorov: there's easy_install and pip, both of which
install packages for you. There's distutils,
setuptools and distribute, which are modules for
installing packages. setuptools and distribute are
continuations of distutils. distutils is a library