Skip to content

Instantly share code, notes, and snippets.

@andresriancho
andresriancho / HTTP-Traceroute.py
Created March 10, 2013 22:42
HTTP-Traceroute.py
#!/usr/bin/env python
import getopt, sys, re, urllib2, urllib, BaseHTTPServer
from urllib2 import Request, urlopen, URLError, HTTPError
################## HEADER ###################################
#
# Traceroute-like HTTP scanner
# Using the "Max-Forwards" header
@johntyree
johntyree / getBlockLists.sh
Last active March 3, 2025 05:56
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@rgov
rgov / debruijn.py
Last active November 14, 2023 07:37
de Bruijn sequence generator
def deBruijn(n, k):
'''
An implementation of the FKM algorithm for generating the de Bruijn
sequence containing all k-ary strings of length n, as described in
"Combinatorial Generation" by Frank Ruskey.
'''
a = [ 0 ] * (n + 1)
def gen(t, p):