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
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 |
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
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) + ':' |
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 | |
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 + ": ") |
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
// ==UserScript== | |
// @name helpers | |
// @namespace anfedorov | |
// @include * | |
// @author Andrey Fedorov | |
// @description | |
// ==/UserScript== | |
function load(library) { | |
var script = document.createElement("script"); |
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
// -- this -- | |
function topOffset(obj) { | |
return obj ? obj.offsetTop + topOffset(obj.offsetParent) : 0; | |
} | |
// --- or this -- | |
function topOffset(obj) { | |
var curtop = 0; |
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 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] |
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
macro let(Var v, Equals, Exp e, Block body) { | |
(function (<v>) { | |
<body> | |
})(<e>); | |
} | |
macro aif(Exp test, Block body) { | |
let it = <test> { | |
<body> | |
} |
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
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. |
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
class BinAccum(object): | |
def __init__(self): | |
self.number = 0 | |
self.place = 0 | |
def __neg__(self): | |
self.place += 1 | |
return self | |
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
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 |