This file contains hidden or 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
| """ | |
| Simple preforking echo server in Python. | |
| Python port of http://tomayko.com/writings/unicorn-is-unix. | |
| """ | |
| import os | |
| import sys | |
| import socket |
This file contains hidden or 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 | |
| SENTRY_KEY= | |
| SENTRY_SECRET= | |
| SENTRY_PROJECTID=1 | |
| SENTRY_HOST=sentry.example.com | |
| SCRIPT_ARGUMENTS=$@ | |
| capture_error() | |
| { |
This file contains hidden or 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
| # coding=utf-8 | |
| """ | |
| LICENSE http://www.apache.org/licenses/LICENSE-2.0 | |
| """ | |
| import datetime | |
| import sys | |
| import time | |
| import threading | |
| import traceback |
This file contains hidden or 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
| @4000000056d9342114814674 192.168.20.138:55734 - - [04/Mar/2016 15:07:03] "HTTP/1.1 GET /command/uptime" - 200 OK | |
| @4000000056d9342d008673ec 192.168.20.139:39386 - - [04/Mar/2016 15:07:15] "HTTP/1.1 GET /command/check_daemontools_service" - 200 OK | |
| @4000000056d9340739036bbc 192.168.32.14:36057 - - [04/Mar/2016 15:06:37] "HTTP/1.1 GET /command/uptime" - 200 OK | |
| @4000000056d93420084e6184 192.168.32.28:57917 - - [04/Mar/2016 15:07:02] "HTTP/1.1 GET /command/uptime" - 200 OK | |
| @4000000056d934980b43acb4 192.168.32.28:57937 - - [04/Mar/2016 15:09:02] "HTTP/1.1 GET /command/uptime" - 200 OK | |
| @4000000056d934991465179c 192.168.20.138:57595 - - [04/Mar/2016 15:09:03] "HTTP/1.1 GET /command/uptime" - 200 OK | |
| @4000000056d934321ee92b7c 192.168.32.14:37492 - - [04/Mar/2016 15:07:20] "HTTP/1.1 GET /command/check_ps" - 200 OK | |
| @4000000056d934bd189cc224 192.168.32.14:42102 - - [04/Mar/2016 15:09:39] "HTTP/1.1 GET /command/uptime" - 200 OK | |
| @4000000056d9345b2949446c 192.168.32.28:57927 - - [04/Mar/2016 15:08:01] "HTTP/1.1 GET /command/ |
This file contains hidden or 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
| # Steve Ivy <steveivy@gmail.com> | |
| # http://monkinetic.com | |
| from random import random | |
| from socket import socket, AF_INET, SOCK_DGRAM | |
| class StatsdClient(object): | |
| SC_TIMING = "ms" | |
| SC_COUNT = "c" | |
| SC_GAUGE = "g" |
This file contains hidden or 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
| [General] | |
| skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local | |
| bypass-tun = 0.0.0.0/8, 1.0.0.0/9, 1.160.0.0/11, 1.192.0.0/11, 10.0.0.0/8, 14.0.0.0/11, 14.96.0.0/11, 14.128.0.0/11, 14.192.0.0/11, 27.0.0.0/10, 27.96.0.0/11, 27.128.0.0/9, 36.0.0.0/10, 36.96.0.0/11, 36.128.0.0/9, 39.0.0.0/11, 39.64.0.0/10, 39.128.0.0/10, 42.0.0.0/8, 43.224.0.0/11, 45.64.0.0/10, 47.64.0.0/10, 49.0.0.0/9, 49.128.0.0/11, 49.192.0.0/10, 54.192.0.0/11, 58.0.0.0/9, 58.128.0.0/11, 58.192.0.0/10, 59.32.0.0/11, 59.64.0.0/10, 59.128.0.0/9, 60.0.0.0/10, 60.160.0.0/11, 60.192.0.0/10, 61.0.0.0/10, 61.64.0.0/11, 61.128.0.0/10, 61.224.0.0/11, 100.64.0.0/10, 101.0.0.0/9, 101.128.0.0/11, 101.192.0.0/10, 103.0.0.0/10, 103.192.0.0/10, 106.0.0.0/9, 106.224.0.0/11, 110.0.0.0/7, 112.0.0.0/9, 112.128.0.0/11, 112.192.0.0/10, 113.0.0.0/9, 113.128.0.0/11, 113.192.0.0/10, 114.0.0.0/9, 114.128.0.0/11, 114.192.0.0/10, 115.0.0.0/8, 116.0.0.0/8, 117.0.0.0/9, 117.128.0.0/10, 118.0.0.0/11, 118.64.0.0/10, 118.128.0.0/9, 119.0. |
This file contains hidden or 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/python | |
| # -*- coding: utf-8 -*- | |
| import tornado.httpserver | |
| import tornado.ioloop | |
| import tornado.iostream | |
| import socket | |
| class ProxyHandler(object): |
This file contains hidden or 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
| # Monitor HTTP requests being made from your machine with a one-liner.. | |
| # Replace "en1" below with your network interface's name (usually en0 or en1) | |
| sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*" | |
| # OR.. to be able to use as "httpdump" from anywhere, drop this into ~/.bash_profile: | |
| # (again replace "en1" with correct network interface name) | |
| alias httpdump='sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"' | |
| # All the above tested only on OS X. |
This file contains hidden or 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 httplib | |
| import ssl | |
| import socket | |
| import sys | |
| import urllib2 | |
| class HTTPSConnectionV3(httplib.HTTPSConnection): | |
| def __init__(self, *args, **kwargs): | |
| httplib.HTTPSConnection.__init__(self, *args, **kwargs) |