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 |
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 |
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() | |
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 |
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) |
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": {}, |
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' |
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", |
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
.GetPrometheusMetrics | jq -r .metrics | |
# HELP fog_test_client Counters for fog_test_client | |
# TYPE fog_test_client counter | |
fog_test_client{op="tx_success_count"} 124 | |
# HELP fog_test_client_gauge Gauges for fog_test_client | |
# TYPE fog_test_client_gauge gauge | |
fog_test_client_gauge{op="last_polling_successful"} 1 | |
# HELP fog_test_client_tx_build_time Time for source client to build a transaction, including fog interactions | |
# TYPE fog_test_client_tx_build_time histogram | |
fog_test_client_tx_build_time_bucket{le="0.2"} 0 |