Check These Out
for Mac OS X
Usefull as a light blink to remember events, mails, intrusions, etc... yet another output
Since nobody ever uses the scroll lock function...
Usefull to interface a linux system with some hardware, for example, opto interfacing the keyboard led to a relay to remotely reset, etc. ( a simple LDR glued over the LED will do the trick )
xset led 3 turns on the third led, ie, Scroll lock
xset -led 3 turns it off
xset led 1 turns on Numerical Lock led ( doesn t work on all computer )
xset led 2 turns on Caps Lock led ( idem )
Using it as a reset watchdog, the relay expected light pulses. Shall the computer hangs, the relay releases and reset the machine ( discharge of a capacitor ) ;-)
From the manpage:
$ man less
-X or --no-init
Disables sending the termcap initialization and deinitialization strings to the terminal. This is sometimes desirable if the deinitialization string does something unnecessary, like clearing the screen.
Bonus:
If you want to clear the screen after viewing a file this way that had sensitive information, hit or just type clear. Since is readily available, I don't know why less bothers to automatically clear. If you're viewing the file at all, chances are you want to see the output from it after you quit.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Use 'mmv' for mass renames. The globbing syntax is intuitive.
PS: 'lustatus' gives the list of all alternate boot environments.
Using this command one can cut a piece from the end of an audio file.
This should handle whitespaces well and will not get confused if your filenames have "?" in them
;)
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"
}