Skip to content

Instantly share code, notes, and snippets.

View paxswill's full-sized avatar

Will Ross paxswill

View GitHub Profile
diff -r 70274d53c1dd -r 56ac083c60dc Doc/library/debug.rst
--- a/Doc/library/debug.rst Mon Apr 09 19:04:04 2012 -0400
+++ b/Doc/library/debug.rst Tue Jul 03 03:19:10 2012 +0200
@@ -14,4 +14,5 @@
profile.rst
hotshot.rst
timeit.rst
- trace.rst
\ No newline at end of file
+ trace.rst
diff --git a/src/configure b/src/configure
index 26f1b4e..03c0e3c 100755
--- a/src/configure
+++ b/src/configure
@@ -5472,7 +5472,7 @@ $as_echo "no" >&6; }
if test -n "$MACSDK"; then
PYTHON_CFLAGS=
- PYTHON_LIBS=-framework Python
+ PYTHON_LIBS=-F"$HOMEBREW_PREFIX/opt/python/Frameworks" -framework Python
--- src/configure 2013-05-02 18:03:49.000000000 -0400
+++ src/configure 2013-05-02 18:49:20.000000000 -0400
@@ -773,6 +793,7 @@
with_plthome
enable_perlinterp
enable_pythoninterp
+with_python
with_python_config_dir
enable_python3interp
with_python3_config_dir
--- src/configure 2013-05-02 18:03:49.000000000 -0400
+++ src/configure 2013-05-02 18:12:00.000000000 -0400
@@ -775,6 +795,7 @@
enable_pythoninterp
with_python_config_dir
enable_python3interp
+with_python3
with_python3_config_dir
enable_tclinterp
with_tclsh
@paxswill
paxswill / ecdsa_keys.py
Last active August 29, 2015 14:00
Generating Core keypairs
from binascii import hexlify
from ecdsa import SigningKey, NIST256p
# Generate the private key and the corresponding public key
sk = SigningKey.generate(curve=NIST256p)
vk = sk.get_verifying_key()
# Write the keys to disk in hex format
with open('signing_key.txt', 'wb') as f:
f.write(hexlify(sk.to_string()))
from brave.core.key.model import EVECredential
def delete(delete=False):
""" Deletes every key from before the leak from the database."""
query = EveCredential.objects(key__lt=3283828)
count = query.count()
keys = query.scalar('key')
keys = '\n'.join(keys)
@paxswill
paxswill / core.py
Created June 27, 2014 20:17
Core API Walkthrough
#!/usr/bin/env python
from binascii import unhexlify
from brave.api.client import API
from ecdsa import SigningKey, VerifyingKey, NIST256p
from flask import Flask, redirect, request, url_for
from hashlib import sha256
app = Flask(__name__)
from evesrp.killmail import CRESTMail
class SubmittedCRESTZKillmail(CRESTMail):
"""Accepts and validates CREST killmail links, but submits them to
ZKillboard and substitutes the zKB link in as the canonical link
"""
def __init__(self, url, **kwargs):
# Let CRESTMail validate the CREST link
from evesrp.killmail import ZKillmail
import gdata.spreadsheets.client
from decimal import Decimal
# patch the spreadsheet's client to use the public feeds
gdata.spreadsheets.client.PRIVATE_WORKSHEETS_URL = \
gdata.spreadsheets.client.WORKSHEETS_URL
gdata.spreadsheets.client.WORKSHEETS_URL = ('https://spreadsheets.google.com/'
'feeds/worksheets/%s/public/full')
import datetime
import ssl
import sys
import warnings
from requests.adapters import HTTPAdapter
from requests.packages import urllib3
from requests.packages.urllib3.util import ssl_
from requests.packages.urllib3.exceptions import (