Skip to content

Instantly share code, notes, and snippets.

@atomicstack
atomicstack / nmap_build_info.txt
Created June 10, 2020 09:43
building nmap on macOS
% eval $( brew info openssl | egrep '(LDFLAGS|CPPFLAGS)' )
% export PYTHON=/usr/local/bin/python3
% ./configure --with-libpcap=included --prefix=$PWD
#!/bin/bash
# extract tarball and run from its root dir.
# wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz && tar -xvf Python-3.7.4.tgz
sudo make clean && ( env LDFLAGS=-Wl,-rpath,/usr/local/python-3.7.4/lib ./configure --enable-optimizations --enable-shared --with-ssl --prefix=/usr/local/python-3.7.4 && make && sudo make install ) |& ( ts '[%F %T] ' | tee -a build.log ) | pv -l -s 10000 > /dev/null
$ perl -MDateTime -E 'printf( qq{%30s: %s\n}, $_, DateTime->now(time_zone => $_)->strftime(q{%a %F %T})) foreach qw{ US/Pacific US/Eastern Europe/London Europe/Amsterdam Europe/Berlin Asia/Singapore Australia/Melbourne }'
US/Pacific: Fri 2018-09-21 14:35:37
US/Eastern: Fri 2018-09-21 17:35:37
Europe/London: Fri 2018-09-21 22:35:37
Europe/Amsterdam: Fri 2018-09-21 23:35:37
Europe/Berlin: Fri 2018-09-21 23:35:37
Asia/Singapore: Sat 2018-09-22 05:35:37
Australia/Melbourne: Sat 2018-09-22 07:35:37
[diff]
# external = git-diff-wrapper.sh
algorithm = patience
# colorMoved=plain
[pager]
diff =
[color]
diff = auto
# Set the prefix to ^A.
unbind C-b
set -g prefix ^A
bind a send-prefix
# Bind appropriate commands similar to screen.
# lockscreen ^X x
unbind ^X
# bind ^X lock-server
unbind x
$ uname -a
Linux proton 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 GNU/Linux
@atomicstack
atomicstack / setup.sh
Created March 6, 2018 16:37
setup for base20180306
#!/bin/bash
apt-get install sudo vim-nox wget tmux tcpdump strace htop iotop pv moreutils build-essential pkg-config autoconf zip unzip bzip2 libssl-dev zlib1g-dev libreadline-dev libexpat-dev libevent-dev libncurses-dev libnss-mdns
# https://twitter.com/OvidPerl/status/137172488206553090
perl -e '@t=qw(▁ ▂ ▃ ▄ ▅ ▆ ▇ █);@s=sort{$a<=>$b}@ARGV;$d=($s[-1]-$s[0])/@t;$d*=1.01;for(@ARGV){print $t[($_-$s[0])/$d]}'
export TEMPDEST=/tmp/trouw URL=https://www.ticketswap.nl/36538/trouw-op-zondag-ade-special-ade; while sleep 5; do curl --silent $URL | grep -w -A2 counter-available >! $TEMPDEST; new_sha=$(sha1sum $TEMPDEST | awk '{print $1}'); if [[ "$new_sha" != "$last_sha" ]]; then; rgrowl 'tickets changed' "$( grep counter-value $TEMPDEST )"; echo $new_sha; fi; last_sha=$new_sha; echo -n . ; done
@atomicstack
atomicstack / chrome-mac-debug.sh
Created September 22, 2012 11:38
chrome-mac-debug
#!/bin/bash
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --enable-logging --v=1 2>> "$HOME/Library/Application Support/Google/Chrome/chrome_stderr.log" &