Check These Out
You must have PHP 5.4.0 or later to be able to run the built in server.
This web server is designed for developmental purposes only, and should not be used in production.
URI requests are served from the current working directory where PHP was started, unless the -t option is used to specify an explicit document root. If a URI request does not specify a file, then either index.php or index.html in the given directory are returned. If neither file exists, then a 404 response code is returned.
If a PHP file is given on the command line when the web server is started it is treated as a "router" script. The script is run at the start of each HTTP request. If this script returns FALSE, then the requested resource is returned as-is. Otherwise the script's output is returned to the browser.
Standard MIME types are returned for files with extensions: .css, .gif, .htm, .html, .jpe, .jpeg, .jpg, .js, .png, .svg, and .txt. The .htm and .svg extensions are recognized from PHP 5.4.4 onwards.
More information here: http://php.net/manual/en/features.commandline.webserver.php
When you don't have c_rehash handy. Really simple - if you have a .pem file that doesn't really contain a x509 cert (let's say, newreq.pem), it will create a link, simply called '.0', pointing to that file.
Goes through all files in the directory specified, uses `stat` to print out last modification time, then sorts numerically in reverse, then uses cut to remove the modified epoch timestamp and finally head to only output the last 10 modified files.
Note that on a Mac `stat` won't work like this, you'll need to use either:
$ find . -type f -print0 | xargs -0 stat -f '%m%t%Sm %12z %N' | sort -nr | cut -f2- | head
or alternatively do a `brew install coreutils` and then replace `stat` with `gstat` in the original command.
-R Recursively change attributes of directories and their contents.
+i to set the immutable bit to prevent even root from erasing or changing the contents of a file.
Sometimes, in a shell script, you need a random number bigger than the range of $RANDOM. This will print a random number made of four hex values extracted from /dev/urandom.
Get simple description on each file from /bin dir, in list form, usefull for newbies.
Converts images (maybe from scans) into a PDF
Throttle download speed
$aria2c --max-download-limit=100K file.metalink
Throttle upload speed
$aria2c --max-upload-limit=100K file.torrent