Check These Out
Requires installing json2yaml via npm:
npm install -g json2yaml
(can also pipe from stdin)
Ref: https://www.npmjs.com/package/json2yaml
#4345 also works under windows
Simple TCPDUMP grepping for common unsafe protocols (HTTP, POP3, SMTP, FTP)
This is a correction to https://www.commandlinefu.com/commands/view/22134
Use `-name` instead of `-iname`, because case-sensitivity is probably important when we're dealing with filenames. It's true that extensions are often capitalised (e.g., "something.JPG"), so choose whatever's appropriate. However, what is appropriate is the quoting of the name pattern, so the shell doesn't expand it incorrectly. Finally, `-delete` is clearer.
That "^M" is Ctrl-M, which is a carriage return, and is not needed in Unix file systems.
Where ^V is actually Ctrl-V and ^M is actually Ctrl-M (you must type these yourself, don't just copy and paste this command). ^V will not be displayed on your screen.
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"
}
This uses mpg123 to convert the files to wav before burning, but you can use mplayer or mencoder or ffmpeg or lame with the --decode option, or whatever you like.
rpm, sometimes, is not wildcard friendly. To search files installed from package this could be useful.
change PACKAGENAME to any package do you want to search
Waiting for your server to finish rebooting? Issue the command above and you will hear a beep when it comes online. The -i 60 flag tells ping to wait for 60 seconds between ping, putting less strain on your system. Vary it to your need. The -a flag tells ping to include an audible bell in the output when a package is received (that is, when your server comes online).