Skip to content

Instantly share code, notes, and snippets.

View yacoob's full-sized avatar
😼

yacoob

😼
View GitHub Profile
@yacoob
yacoob / README.md
Last active March 1, 2019 01:19
tshark HTTP url extraction

tshark HTTP url extraction

tshark -Y 'tcp.port==80 && http.request.method in {"GET" "HEAD" "POST"}' -Tfields -e ip.dst -e http.request.method -e http.request.full_uri

Example output:

23.239.29.5	GET	http://openspeedtest.com/
205.234.175.175	HEAD	http://open.cachefly.net/downloading?n=0.37106589078326135
@yacoob
yacoob / zfs-snapshot
Last active August 4, 2019 00:17
quick & tasty zfs snapshots
#!/usr/bin/zsh
set -eu
LAST_DAYS=30
LAST_MONDAYS=26
VOLS=(lcl/geofront lilith/sys magi/sys)
for vol (${VOLS}); do
# Make a daily snapshot.
/sbin/zfs snapshot -r -o nerv.local:timestamp=$(date '+%s') ${vol}@$(date '+%Y-%m-%d')
@yacoob
yacoob / sshconfig
Created August 10, 2014 01:57
Recursive jumphosts
Host */*
ProxyCommand ssh $(dirname %h) -W $(basename %h):%p
@yacoob
yacoob / bookmarklet.js
Last active December 27, 2015 16:39
Youtube TV
window.open('http://www.youtube.com/tv', 'Youtube TV', 'scrollbars=no, titlebar=no, menubar=0')