Check These Out
This is handy to just shove into a daily cron entry. If you do use cron, make sure to escape the %d with \%d or it will fail.
Set the affinity of a process to a particular core(s).
Arguments for processor include a comma separated list, or a range. (example: 1,2 or 0-3)
You can use top in smp mode (Press 1) to see the changes to the affinity.
Seen many questions how-to reinstall synology nas dsm without loosing data, here you go.
Wait for a few min and then head over to http://nasip and setup your fresh installed nas.
This will enable the possibility to navigate in the history of the command you type with the arrow keys, example "na" and the arrow will give all command starting by na in the history.You can add these lines to your .bashrc (without &&) to use that in your default terminal.
For those who hate navigating info pages, a shell function which will dump the contents to stdout, then page it through less, thus acting like 'man'.
list zipfile info in long Unix ``ls -l'' format.
This should probably only be used for testing in a dev environment as it's not terribly efficient, but if you're doing something that might trash a DB and you still want the old data available, this works like a charm.
Streaming HTML5 compatible video (Ogg Theora video with Vorbis sound) to an Icecast server using dvgrab, ffmpeg2theora and oggfwd.
In this example I'm merging stereo sound to mono (-c 1), saving the original dv for later higher quality on-demand video (tee dvstream.dv), saving the theora stream for immediate on-demand video, and publishing the stream in Xiph's stream directory (-p and the name and description).
The URL of the video will be (depending on your server) http://my.icecastserver.com/stream.ogv which will play in newer Firefox, Chrome and Opera web browsers. Cortado (a Java player) can easily be used for IE.
Note also that I'm using port 80, which is not the default port for Icecast, this is to avoid restrictive firewalls.
Also note that ffmpeg2theora 0.25 and will heed the bitrates much better than former versions because of using libtheora 1.1 or newer.