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
[diff] | |
# external = git-diff-wrapper.sh | |
algorithm = patience | |
# colorMoved=plain | |
[pager] | |
diff = | |
[color] | |
diff = auto |
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
$ 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 |
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/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 |
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
% eval $( brew info openssl | egrep '(LDFLAGS|CPPFLAGS)' ) | |
% export PYTHON=/usr/local/bin/python3 | |
% ./configure --with-libpcap=included --prefix=$PWD |
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
# system-wide environment settings for zsh(1) | |
# unfucks PATH breakage inside tmux | |
# https://superuser.com/questions/544989/does-tmux-sort-the-path-variable | |
# https://apple.stackexchange.com/questions/248813/tmux-always-modify-my-zsh-path | |
if [[ -x /usr/libexec/path_helper && -z "$TMUX" ]]; then | |
eval `/usr/libexec/path_helper -s` | |
fi |
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
wget --base=https://github.com/raspberrypi/firmware/raw/master/ -i <( wget -qO- https://github.com/raspberrypi/firmware/raw/master/boot/ | grep 'react-app.embeddedData' | perl -nE 's{\s+<script[^>]+>}{}; s{</script>}{}; say' | jq -r '.payload.tree.items[].path | select(test("(elf|dat)$"))' ) |
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
muon ~ % dscacheutil -q host -a name rp1-cluster1.local | |
name: rp1-cluster1.local | |
ipv6_address: fe80:b::dea6:32ff:feba:101f | |
ipv6_address: fe80:e::dea6:32ff:feba:101f | |
name: rp1-cluster1.local | |
ip_address: 10.0.0.167 |
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
lepton ~ % sudo apt install -y libnss-mdns avahi-utils | |
lepton ~ % avahi-resolve-host-name -4 rp1-cluster1.local | |
rp1-cluster1.local 10.0.0.167 |
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
rp1-cluster1 ~ % for zone in /sys/class/thermal/thermal_zone*; do echo -n "$(basename $zone)="; cat $zone/temp | perl -nE 'printf(qq{%.02fC\n}, ($_/1000))'; done | |
thermal_zone0=42.35C |
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/bash | |
set -x | |
/usr/bin/time -l find $HOME 2>&1 1>/dev/null | grep -i real | |
/usr/bin/time -l find $HOME 2>&1 1>/dev/null | grep -i real | |
/usr/bin/time -l find $HOME 2>&1 1>/dev/null | grep -i real | |
/usr/bin/time -l find $HOME 2>&1 1>/dev/null | grep -i real | |
/usr/bin/time -l find $HOME 2>&1 1>/dev/null | grep -i real |