I hereby claim:
- I am bsmithyman on github.
- I am bsmithyman (https://keybase.io/bsmithyman) on keybase.
- I have a public key ASBOa1GAD4sXYNqt3C8cl8KaXBx0A4erRUGsaYDCE_3j0Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import json | |
| import os | |
| from oauth2client.service_account import ServiceAccountCredentials | |
| import httplib2 | |
| GCP_CREDENTIALS_FILE = os.getenv('GCP_CREDENTIALS_FILE', 'client-secret.json') | |
| GCS_UPLOAD_URL_PATTERN = 'https://www.googleapis.com/upload/storage'+ \ | |
| '/v1/b/{bucket}/o?uploadType=resumable' | |
| def get_upload_url(bucket, filename, content_length, content_type='application/octet-stream'): |
| import contextlib | |
| import os.path | |
| from pycallgraph import PyCallGraph | |
| from pycallgraph.output import GraphvizOutput | |
| @contextlib.contextmanager | |
| def graph_stack(filename): | |
| 'Generate a call graph for the enclosed context' | |
| go = GraphvizOutput(output_file=filename) | |
| go.output_type = os.path.splitext(filename)[-1][1:] |
| body | |
| { | |
| background-color: #3f3f3f; | |
| margin: 8px; | |
| padding: 0; | |
| } | |
| #content | |
| { | |
| width: 898px; |
| class Blorgle(object): | |
| @property | |
| def incompatible(self): | |
| import inspect | |
| frame = inspect.currentframe() | |
| print('Current') | |
| print(frame.f_locals.get('self', None)) | |
| print('Previous') | |
| print(frame.f_back.f_locals.get('self', None)) | |
| print('2Prev') |
| # | |
| # Automatically generated file; DO NOT EDIT. | |
| # Linux/arm 4.2.0 Kernel Configuration | |
| # | |
| CONFIG_ARM=y | |
| CONFIG_ARM_HAS_SG_CHAIN=y | |
| CONFIG_MIGHT_HAVE_PCI=y | |
| CONFIG_SYS_SUPPORTS_APM_EMULATION=y | |
| CONFIG_HAVE_PROC_CPU=y | |
| CONFIG_STACKTRACE_SUPPORT=y |
| def GB(tag = None): | |
| import sys | |
| if not hasattr(GB, 'badgercount'): | |
| GB.badgercount = 0 | |
| sys.stdout.write('Guard badger: %03d is named %s'%(GB.badgercount, 'Stanley' if not tag else tag)) | |
| sys.stdout.flush() | |
| GB.badgercount += 1 |
| 0 7 1 * * (vnstati -m -i eth1 -o /tmp/vnstati.png && uuencode /tmp/vnstati.png /tmp/vnstati.png && vnstati -d -i eth1 -o /tmp/vnstati.png && uuencode /tmp/vnstati.png /tmp/vnstati.png) | mailx -s "Network Usage" [email protected] |
| #!/bin/bash | |
| cat << END | |
| <html> | |
| <body> | |
| <pre style="font-family: consolas,monospace;font-size:8pt"> | |
| END | |
| cat - |
| Licensed under GNU Lesser General Public License | |
| Originally part of 'pygeo' (also by Brendan Smithyman). | |
| https://www.gnu.org/licenses/lgpl.html |