View Electrodacus-1588544897786.json
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
View osx-for-hackers.sh
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
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
View gist:5205142
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
Request: | |
{"name":"TODO test","account_number":"9900000002","routing_number":"021000021","type":"savings","system_timezone":2,"user_agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22","language":"en-US"} | |
Response: | |
{ | |
"credits_uri": "/v1/bank_accounts/BA2nZoAiqx5UFsPrs7P6i5PO/credits", | |
"bank_name": "JPMORGAN CHASE BANK", | |
"bank_code": "021000021", | |
"account": null, | |
"meta": {}, |
View gist:3683438
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
... | |
import gc | |
print 'before collect' | |
gc.collect() | |
print 'after collect' | |
print 'done, calling lsof' | |
subprocess.call("lsof -p%d -a -iTCP" % (pid,), shell=True) |
View x.py
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
import traceback | |
import os | |
orig_close = os.close | |
def patched_close(*args, **kwargs): | |
print '----------------------------' | |
print 'os.close!',args,kwargs | |
traceback.print_stack() | |
return orig_close(*args, **kwargs) | |
os.close = patched_close |
View r.py
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
import socket,traceback | |
orig_socket = socket.socket | |
class wrap_socket(orig_socket): | |
def __init__(self, *args, **kwargs): | |
orig_socket.__init__(self, *args, **kwargs) | |
#traceback.print_stack() | |
print '--> new sock', self.fileno() | |
View strace.out
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
execve("/usr/bin/python", ["python", "./3318253/gistfile1.txt"], [/* 22 vars */]) = 0 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
open("/lib/x86_64-linux-gnu/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3 |
View gist:3313868
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
import requests | |
reqsess = requests.session() | |
try: | |
r = reqsess.get(r'http://www.mouser.com/Search/Refine.aspx?Keyword=test') | |
d = r.text | |
finally: | |
reqsess.close() | |
print 'done' | |
import time |