Check These Out
Negative shell globs already come with bash. Make sure to turn on extended pattern matching with 'shopt -e extglob'.
This will allow you to convert an audio file to wav format, and send it via ssh to a player on the other computer, which will open and play it there. Of course, substitute your information for the sound file and remote address
You do not have to use paplay on the remote end, as it is a PulseAudio thing. If the remote end uses ALSA, you should use aplay instead. If it uses OSS, you should berate them about having a lousy sound system. Also, you're not limited to transmitting encoded as wav either, it's just that AFAIK, most systems don't come with mp3 codecs, but will play wav files fine.
If you know SoX is installed on the remote end and has mp3 codecs, you can use the following instead:
$ cat Klaxon.mp3 |ssh thelab@company.com play -t mp3 -
this will transmit as mp3. Again, use your specific information. if you're not playing mp3s, use another type with the -t option
You can get what functions at which addresses are inside a dynamic link library by this tool.
To do hex to binary: echo 'ibase=16; obase=2; 16*16' | bc # prints: 111100100
To do 16*16 from decimal to hex: echo 'ibase=10; obase=16; 16*16' | bc # prints: 100
You get the idea... Alternatively, run bc in interactive mode (see man page)
Slightly simpler version of previous sed command that does the same thing. In this case, the output will stop at the command, and the entire command will be terminated as well, instead of proceeding through the whole file.
Get a listing of all of your databases in Postgres and their sizes, ordering by the largest size first.
Requires that you give the -d parameter a valid database name that you can connect to.
Benchmark a SQL query against MySQL Server.
The example runs the query 10 times, and you get the average runtime in the output. To ensure that the query does not get cached, use `RESET QUERY CACHE;` on top in the query file.
Convert DOS newlines (CR/LF) to Unix format using sed command