Skip to content

Instantly share code, notes, and snippets.

Greg Nilchee gnilchee

  • Evernote
  • Woodinville, WA
Block or report user

Report or block gnilchee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
anti1869 /
Created Dec 21, 2015
How To Call Shell Commands From Python In Parallel With Asyncio
#!/usr/bin/env python
Test parallel scripts running with asyncio executors.
Requires at least Python 3.4 to run.
import asyncio
import os
Easy Mac
Copyright (2015) Sean Beck
Licensed under Creative Commons Attribution-ShareAlike 4.0 International
Easily change your MAC address on Linux using `ifconfig`
z0mbix / tcpdump-es-capture
Created Dec 19, 2014
Capture Elasticsearch Queries
View tcpdump-es-capture
# tcpdump -A -nn -s 0 'tcp dst port 9200 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -i lo
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
14:32:33.525122 IP > Flags [P.], seq 313752908:313753888, ack 2465010394, win 257, options [nop,nop,TS val 2684167067 ecr 2684167066], length 980
..#...#.GET /index/_search HTTP/1.1
Accept: */*
Content-Length: 845
Content-Type: application/x-www-form-urlencoded
jeremyj / haproxy rate limiting
Last active Oct 31, 2019
haproxy rate limiting
View haproxy rate limiting
HTTP request limiting ===================================================================================================================
frontend ft_web
# Use General Purpose Couter (gpc) 0 in SC1 as a global abuse counter
# Monitors the number of request sent by an IP over a period of 10 seconds
stick-table type ip size 1m expire 10s store gpc0,http_req_rate(10s)
tcp-request connection track-sc1 src
# refuses a new connection from an abuser
tcp-request content reject if { src_get_gpc0 gt 0 }
View gist:42e4d8b4a9abbffb28c0
# ------------------------------------------------------------------
# Author: Ryan C Koch -
# ------------------------------------------------------------------
thisismitch /
Last active Mar 6, 2020
How To Use Terraform with DigitalOcean
resource "digitalocean_droplet" "haproxy-www" {
image = "ubuntu-14-04-x64"
name = "haproxy-www"
region = "nyc2"
size = "512mb"
private_networking = true
ssh_keys = [
connection {
weapp / nginx.conf
Created Aug 4, 2014
Return common errors as json in Nginx
View nginx.conf
error_page 500 /500.html;
location /500.html{
return 500 '{"error": {"status_code": 500,"status": "Internal Server Error"}}';
error_page 502 /502.html;
location /502.html{
return 502 '{"error": {"status_code": 502,"status": "Bad Gateway"}}';
TSiege / The Technical Interview Cheat
Last active May 29, 2020
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat


I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!


creativepsyco / gist:9322214
Last active Aug 29, 2015 — forked from vitormoura/gist:9102668
Host Python Server in Current Directory.
View gist:9322214
#Python 2
python -m SimpleHTTPServer 8080
#Python 3
python3 -m http.server 8113
You can’t perform that action at this time.