I hereby claim:
- I am netj on github.
- I am netj (https://keybase.io/netj) on keybase.
- I have a public key whose fingerprint is 1111 1252 8C8F 4747 3140 1304 7860 1291 9E35 D477
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| # exshell -- a handy way to use command-line formulae's output to augment a TAB-separated input | |
| # | |
| # Synopsis: | |
| # $ cat a.txt | |
| # USA United States of America | |
| # India Republic of India | |
| # South_Korea Republic of Korea (ROK) | |
| # | |
| # $ exshell <a.txt \ |
| #!/usr/bin/env bash | |
| # remocon -- run given command remotely, replicating local git work tree on a remote host, and downloading remote changes if needed | |
| # | |
| # Author: Jaeho Shin <[email protected]> | |
| # Created: 2018-03-08 | |
| ## | |
| set -euo pipefail | |
| error() { echo >&2 "📡 ‼️ " "$@"; false; } | |
| warning() { echo >&2 "📡 ⚠️ " "$@"; } |
| # StackOverflow.bash | |
| $ (s() { echo $1; [[ $1 -le 0 ]] || s $(($1 - 1)); }; time s 6977) | |
| Segmentation fault (core dumped) | |
| $ (s() { echo $1; [[ $1 -le 0 ]] || s $(($1 - 1)); }; time s 6976) | |
| real 0m10.097s | |
| user 0m10.064s | |
| sys 0m0.032s |
| #!/usr/bin/perl -w | |
| # ts2dur -- Annotates a timestamp-per-line input with the duration between two lines | |
| # | |
| # Author: Jaeho Shin <[email protected]> | |
| # Created: 2017-02-17 | |
| ## | |
| use strict; | |
| use POSIX qw(strftime); | |
| use Date::Parse; | |
| use Time::HiRes; |
| #!/usr/bin/env bash | |
| # simple network I/O bandwidth test with ssh and pv | |
| # Author: Jaeho Shin <[email protected]> | |
| # Created: circa 2013 | |
| host=${1:?ssh-able host name}; shift | |
| maxbytes=${1:-$((2 ** 29))}; shift | |
| bs=${1:-$((2 ** 16))}; shift | |
| # rest are ssh options | |
| set -- ssh -S none -o Compression=no -o ControlMaster=no "$@" $host |
| // Scroll to selection focus, but only if it's out of view. Align selection | |
| // focus with the top or bottom edge of its scroll-container. Return true | |
| // on success. | |
| // * there might be several nested scroll-containers, including window | |
| // * must not try to scroll overflow:hidden and overflow:visible elements | |
| // * no scrolling should happen if selection focus is visible | |
| // * selection is not necessarily collapsed | |
| // * range.getBoundingClientRect doesn't work for collapsed ranges | |
| // * Opera reports incorrect startOffset and endOffset for collapsed ranges | |
| // outside of text nodes (e.g. between 2 <br> elements), range.insertNode |
I hereby claim:
To claim this, I am signing this object:
| RUN adduser --disabled-password --gecos "" user \ | |
| && adduser user adm \ | |
| && bash -c "echo '%adm ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers" | |
| USER user | |
| ENV USER=user |