Check These Out
How about this one ?
A quick alias I use right before logging into a server so that I have a log of the transactions as well as the ability to re-connect from another computer. Useful for when your boss says "what commands did you run again on that server?" and you had already closed the terminal ;)
I wrapped it in a script now, with more features, but this is the heart of it.
Never leave home without it.
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)
List all commands present on system by folder.
$PATH contains all command folder separated by ':'. With ${PATH//:/ }, we change ':' in space and create a list of folder for ls command.
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"
}
Show the current load of the CPU as a percentage.
Read the load from /proc/loadavg and convert it using sed:
Strip everything after the first whitespace:
$ sed -e 's/ .*//'
Delete the decimal point:
$ sed -e 's/\.//'
Remove leading zeroes:
$ sed -e 's/^0*//'
Need admin right to run dpkg-query
Why use many different utilities all piped together, when you only need two?
I always wanted to be able to copy formatted HTML, like from emails, on trello cards or READMEs... but the formatting is always wrong... But from this two links:
* https://jeremywsherman.com/blog/2012/02/08/pasting-html-into-markdown/
* http://stackoverflow.com/questions/3261379/getting-html-source-or-rich-text-from-the-x-clipboard
For instance, to to copy an formatted email to a trello card, just:
1. Select the email body
2. run: xclip -selection clipboard -o -t text/html | pandoc -f html -t markdown_github - | xclip -i -t text/plain
3. Paste in your trello card
4. Profit!
8-)