Check These Out
For slow flash memory (cheap thumb drive), ext4 is the fastest stable file system for all use cases with no relevant exception:
http://www.linuxplanet.com/linuxplanet/tutorials/7208/1
Since we can usually dispense with the benefits of a journal for this type of storage, this is a way to achieve the least awful I/O-speed.
Disabling the journal for an existing ext4 partition can be achieved using
$ tune2fs -O ^has_journal /dev/sdXN
Note that it is often recommended to format removable flash media with ext2, due to the lack of a journal. ext4 has many advantages over ext2 even without the journal, with much better speed as one of the consequences. So the only usecase for ext2 would be compatibility with very old software.
Used to copy and paste a terminal buffer of a python interactive session into an editor
Loop is needed if you have more then one card.
A short, *easy-er* to remember command for stripping whitespace and comments from a config file, (or any file for that matter).
Remember regex as:
slash, space, star.
pound, slash, bar.
pointy-hat, dollar. (or "caret, dollar" if you must)
:-P
Simple command to convert a large number of images into jpeg-format. Will delete originals after conversion.
To rip DVD movie to ogg format using ffmpeg, follow these steps.
1) find the vob files on the mounted video DVD in VIDEO_TS that stores the movie itself. There would be a few other VOB files that stores splash screen or special features, the vob files for the movie itself can be identified by its superior size. You can verify these vob files by playing them directly with a player (e.g. mplayer)
2) concatenate all such vob files, pipe to ffmpeg
3) calculate the video size and crop size. The ogg video size must be multiple of 16 on both width and height, this is inherit limitation of theora codec. In my case I took 512x384.
The -vcodec parameter is necessary because ffmpeg doesn't support theora by itself. -acodec is necessary otherwise ffmpeg uses flac by default.
First (and only) argument should be a 4chan thread URL.
curl -sLkIv --stderr - https://t.co/2rQjHfptZ8
-s: silences the output when piped to a different command
-L: follow every redirect
-k: ignores certificate errors
-I: just request the headers
-v: be verbose
--stderr - : redirect stderr to stdout
https://t.co/2rQjHfptZ8: URL to check for redirects
piped to
grep -i location:
-i: grep target text ignoring case
location: : greps every string containing "location:"
piped to
awk {'print $3'}
prints the third column in every string
piped to
sed '/^$/d'
removes blank lines
Requires a listening port on HOST
eg. "cat movie.mp4 | nc -l 1356 " (cat movie.mp4 | nc -l PORT)
Useful if you're impatient and want to watch a movie immediately and download it at the same time without using extra bandwidth.
You can't seek (it'll crash and kill the stream) but you can pause it.