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
| docker run \ | |
| -it --rm \ | |
| -u "$(id -u "$USER"):$(id -g "$USER")" \ | |
| -v /etc/group:/etc/group:ro \ | |
| -v /etc/passwd:/etc/passwd:ro \ | |
| -v "$PWD:/vol" \ | |
| ubuntu:18.04 \ | |
| bash |
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
| tail -f foo.bar| | |
| grep -E --line-buffered baz |
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
| xclip -sel c -o| | |
| fold -sw 72| | |
| xclip -sel c |
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
| # Sadly needed until npm up supports more options. | |
| # npm install -g npm-check-updates | |
| npm outdated | |
| ncu -au | |
| npm i |
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
| #!/usr/bin/env sh | |
| set -eu ${VERBOSE:+-x} | |
| execute() { | |
| local cmd="$1" | |
| shift | |
| case "$cmd" in | |
| start) echo a b|exec xargs -P0 -n1 "$0";; | |
| a) sleep 1; echo a; sleep 2; exec echo a;; |
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
| type Reverse<T> = {[V in T[keyof T] & keyof T]: keyof T} |
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
| javascript:(_ => { | |
| const marvin = 'marvin.wmflabs.org'; | |
| window.location.host = window.location.host === marvin ? 'en.wikipedia.org' : marvin; | |
| })() |
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
| javascript:(_ => { | |
| const url = new URL(window.location.href); | |
| url.searchParams.set('useformat', url.searchParams.get('useformat') !== 'mobile' ? 'mobile' : 'desktop'); | |
| window.location.href = url.toString(); | |
| })() |
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
| find -not \( \( -name node_modules -o -name .git -o -name dist \) -prune \) -type f -name \*.css| | |
| # a | |
| while IFS= read -r file; do git mv "$file" "${file%.css}.less"; done | |
| # b | |
| xargs -rd\\n -i sh -c 'git mv {} $(dirname {})/$(basename {} .css).less' | |
| time while IFS= read -ru9 -d $'\n' line; do | |
| echo -n "$line" |
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
| for i in *; do git --work-tree="$i" --git-dir="$i/.git" pull; done |