Check These Out
The Linux /dev/full file simulates a "disk full" condition, and can be used to verify how a program handles this situation.
In particular, several programming language implementations do not print error diagnostics (nor exit with error status) when I/O errors like this occur, unless the programmer has taken additional steps. That is, simple code in these languages does not fail safely. In addition to Perl, C, C++, Tcl, and Lua (for some functions) also appear not to fail safely.
Useful for quickly cleaning your Desktop.
Nice joke if launched at startup.
Useful for examining hostile processes (backdoors,proxies)
Something to stuff in an alias when you are working in multiple environments. The double-pipe OR will fall through until one of the commands succeeds, and the rest won't be executed. Any STDERR will fall out, but the STDOUT from the correct command will bubble out of the parenthesis to the less command, or some other command you specify.
Not so much handy by itself, but very nice in shell scripts.
This makes you a handy ncurses based checklist. Much like terminal installers, just use the arrow keys and hit 'Space' to adjust the selections. Returns all selected tags as strings, with no newline at the end. So, your output will be something like:
"one" "two" "three" "four" "etc"
For those who prefer bash expansion over gratuitious typing:
$ whiptail --checklist "Simple checkbox menu" 12 35 3 $(echo {one,two,three,four}" '' 0"} )
Things to note:
The height must includes the outer border and padding: add 7 to however many items you want to show up at the same time.
If the status is 1, it will be selected by default. anything else, will be deselected.
Converts any number of seconds into days, hours, minutes and seconds.
sec2dhms() {
declare -i SS="$1"
D=$(( SS / 86400 ))
H=$(( SS % 86400 / 3600 ))
M=$(( SS % 3600 / 60 ))
S=$(( SS % 60 ))
[ "$D" -gt 0 ] && echo -n "${D}:"
[ "$H" -gt 0 ] && printf "%02g:" "$H"
printf "%02g:%02g\n" "$M" "$S"
}
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Change the original date set by camera :
Create Date : 2020:08:21 13:26:24.63 //Operating System: Date Created (ie: sdcard)
Date/Time Original : 2020:08:21 13:26:24.63 // Set by camrea when you point and click for photo
Modify Date : 2020:08:21 13:26:24.63 //Operating System: Modified (ie: sdcard)
Exif argument examples are :
exiftool.exe ā-DateTimeOriginal+=0:0:0 5:30:0ā filename.jpg (add 5 hours and 30 minutes to the Exif Date/Time Original)
exiftool.exe" "-modifydate-=0:0:0 0:25:0" filename.jpg (reduce the Exif Modify Date to 25 minutes)
exiftool.exe ā-AllDates+=Y:M:D h:m:sā filename.jpg (Change all exif date values to Y:M:D h:m:s)
Bash process substitution which curls the website 'hashbang.sh' and executes the shell script embedded in the page.
This is obviously not the most secure way to run something like this, and we will scold you if you try.
The smarter way would be:
Download locally over SSL
> curl https://hashbang.sh >> hashbang.sh
Verify integrty with GPG (If available)
> gpg --recv-keys 0xD2C4C74D8FAA96F5
> gpg --verify hashbang.sh
Inspect source code
> less hashbang.sh
Run
> chmod +x hashbang.sh
> ./hashbang.sh