Check These Out
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Figlet is easy to find for download on the internet, and works for any text. Quite cool.
First we accept a socket and fork the server. Then we overload the new socket as a code ref. This code ref takes one argument, another code ref, which is used as a callback.
The callback is called once for every line read on the socket. The line is put into $_ and the socket itself is passed in to the callback.
Our callback is scanning the line in $_ for an HTTP GET request. If one is found it parses the file name into $1. Then we use $1 to create an new IO::All file object... with a twist. If the file is executable("-x"), then we create a piped command as our IO::All object. This somewhat approximates CGI support.
Whatever the resulting object is, we direct the contents back at our socket which is in $_[0].
This is a command to be used inside of MS-DOS batch files to check existence of commands as preconditions before actual batch processing can be started. If the command is found, batch script continues execution. If not, a message is printed on screen, script then waits for user pressing a key and exits.
An error message of the command itself is suppressed for clarity purpose.
This script compares the modification date of /var/lib/dpkg/info/${package}.list and all the files mentioned there.
It could be wrong on noatime partitions.
Here is non-oneliner:
#!/bin/sh
package=$1;
list=/var/lib/dpkg/info/${package}.list;
inst=$(stat "$list" -c %X);
cat $list |
(
while read file; do
if [ -f "$file" ]; then
acc=$(stat "$file" -c %X);
if [ $inst -lt $acc ]; then
echo used $file
exit 0
fi;
fi;
done
exit 1
)
Will trim the video to 4 seconds starting from the beginning.
The -vcodec , -acodec options are required so that ffmpeg knows in what video/audio format you want for the new video.
Add the QR code image on your webpage, business card ., etc, so people can scan it and quick add to their Contact Address Book. Tested on iPhone with QRreader.
Last argument is the youtube link.
Requires ffmpeg
A short variant if you have only one directory whit only audio files in it.