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 https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python - |
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
| # EXAMPLE OUTPUT | |
| # ============== | |
| # opening device 0xddcc | |
| # connected | |
| # tester present ... | |
| # read data by id: boot software id ... | |
| # 39990-TVA-A110 | |
| # read data by id: application software id ... | |
| # 39990-TVA-A150 | |
| # read data by id: application data 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
| # start tftp server | |
| docker run --rm --network=host --name=tftp -it -v /dev/log:/dev/log -v /<path>/<to>/tftp:/tftp pghalliday/tftp -Lvvv /tftp | |
| # view logs while running | |
| tail -f /var/log/syslog | |
| # request file | |
| tftp <hostname> << EOF | |
| get /tftp/test.txt | |
| EOF |
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
| HOSTS=( | |
| host1 | |
| host2 | |
| host3 | |
| ) | |
| for HOST in "${HOSTS[@]}"; do ssh-keyscan $HOST >> $HOME/.ssh/known_hosts; 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
| docker rm $(docker ps -q --filter "status=exited") |
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 bash | |
| set -e | |
| # log to file if not running interactively | |
| if [[ ! -t 1 ]]; then | |
| exec >> >(tee /var/log/$(basename ${0%.*}).log) 2>&1 | |
| fi | |
| echo "hello world!" |
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
| dstat -v --disk-util -rn |
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
| openssl rand -base64 30 | |
| date +%s | sha256sum | base64 | head -c 32 ; echo |
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 /<path>/<to>/<base> -type d -empty -print | xargs -I '{}' rmdir '{}' |
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
| mysql -h <hostname> -u <username> -p -sN -e "select json_object('key1', 1, 'key2', 2);" <database> > <filename> |