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
| curl \ | |
| -sG \ | |
| -d o=TRACKING_IDS \ | |
| --data-urlencode q='(owner:niedzielski OR owner:sniedzielski OR owner:pmiazga OR owner:jdrewniak OR owner:jdlrobson OR owner:nray OR owner:phuedx OR owner:volkere) -age:1week -is:wip -message:wip' \ | |
| https://gerrit.wikimedia.org/r/changes/| | |
| node -e ' | |
| JSON.parse(require("fs").readFileSync(0).toString("utf-8").substring(5)) | |
| .reduce((sum, val) => ([...sum, ...val.tracking_ids]), []) | |
| .filter(({system}) => system === "Phab") | |
| .map(({id}) => id) |
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
| node -pe 'JSON.stringify(JSON.parse(require("fs").readFileSync(0)), null, 2)' |
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
| rg -g\!/resources/dist/ -g\!/i18n/ -g\!/tests/ -g\!/doc/ -t js foo |
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 all files not in the current user ownership AND group. | |
| sudo find "$DIR" -not \( -uid $(id -u) -gid $(id -g) \) | |
| # Recursively change owner and group to current user. | |
| sudo chown -R $(id -nu):$(id -ng) "$DIR" |
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
| sudo sg_map -i | |
| df -h /dev/sdX* | |
| time sudo shred -v /dev/sdX |
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 -type f -iname \*.flac| | |
| while IFS= read -r file; do | |
| ffmpeg -v 24 -nostdin -i "$file" -ab 320k "${file%.flac}.mp3" | |
| done |
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
| sed '0,/^LINE$/ d' |
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
| set -k | |
| foo() { echo "$bar"; } | |
| foo bar=baz | |
| # prints baz | |
| echo $bar | |
| # prints nothing |
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 <(sed -r s%1%3%g a.txt) <(sed -r s%2%3%g b.txt) |
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 exec -it container bash |
NewerOlder