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 | |
| ## Convert an Rd file to all supported help formats. | |
| ## Copyright (C) 2025 Sebastian Meyer <seb.meyer@fau.de> | |
| set -e | |
| R=R | |
| if [ -n "${R_HOME}" ]; then # R CMD Rd2all | |
| R=${R_HOME}/bin/R |
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 | |
| # use optipng followed by advdef for lossless compression of a set of png files | |
| # or run this compression in parallel for all png files of a given directory | |
| if [ $# -eq 0 ]; then | |
| echo "usage: $0 <DIR|FILES...> " >&2 | |
| exit 1 | |
| fi | |
| export OPTIOPTS="-quiet -preserve -i0 -zc4 -zm5 -zw32k -zs0 -f0" |
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
| ## check an ext file system with progress reporting | |
| sudo e2fsck -v -p -f -C0 /dev/sdc3 | |
| ## We could pass the -ck or -cck option to run a badblocks subprocess | |
| ## but that lacks progress information and takes very long. | |
| ## Alternatively, we can do a manual search for bad blocks. | |
| ## The default is read-only; recommended but slow is -n (non-destructive rw). | |
| sudo fdisk -l /dev/sdc3 # find out block size, here 512 | |
| sudo badblocks -s -v -b 512 -o badblocks.txt /dev/sdc3 |