Check These Out
In this example 'git' is the user name and the output format is YAML but you can change this to XML or JSON, eg: curl http://github.com/api/v1/json/usernamehere
You can ask repeatedly for a non-blank password using this function:
function read_password() {
while [ ! -n "$USER_PASSWORD" ]; do
read -s -p"Password: " USER_PASSWORD
if [ ! -n "$USER_PASSWORD" ]; then
echo "ERROR: You must specify a valid password, please try again"
fi
echo
done
}
Also you can set a time out (in seconds) to write the password
read -t 10 -s -p"Password: " USER_PASSWORD_VARIABLE
if [ ! $? -eq 0 ]; then
echo "Time out!"
fi
Fir3net.com
In this example, file contains five columns where first column is text. Variance is calculated for columns 2 - 5 by using perl module Statistics::Descriptive. There are many more statistical functions available in the module.
in loop, until the last port (65535), list all opened ports on host.
in the sample I used localhost, but you can replace with any host to test.
This set of commands was very convenient for me when I was preparing some xml files for typesetting a book. I wanted to check what styles I had to prepare but coudn't remember all tags that I used. This one saved me from error-prone browsing of all my files. It should be also useful if one tries to process xml files with xsl, when using own xml application.
nmap for windows and other platforms is available on developer's site: http://nmap.org/download.html
nmap is robust tool with many options and has various output modes - is the best (imho) tool out there..
from nmap 5.21 man page:
-oN/-oX/-oS/-oG : Output scan in normal, XML, s|
This one-liner was useful in helping someone I know to get off of MS Exchange. `mailutil` proved to be a much better alternative than `fetchmail` or `getmail` in this case.
It quickly moved all mails to the destination server (a simple Dovecot/Maildir setup), with no need to convert back and forth between mbox/maildir on the user's own system.
Extracts an MP3 encoded audio stream from an input video file.