Check These Out
Substitute 'brown' with 'pink' or 'white' according to your taste.
I put this on my headphones when I'm working in an "open concept" office, where there are always three to five conversations going in earshot, or if I'm working somewhere it is "rude" of me to tell a person to turn off their cubicle radio.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
This takes a picture (with the web cam) every 5 minutes, and send the picture to your e-mail.
Some systems support
mail -a "References: "
so that all video surveillance emails are grouped in a single email thread.
To keep your inbox clean, it is still possible to filter and move to trash video surveillance emails (and restore these emails only if you really get robbed!)
For instance with Gmail, emails sent to me+trash@gmail.com can be filtered with "Matches: DeliveredTo:me+trash@gmail.com"
sox (SOund eXchange) can capture the system audio be it a browser playing youtube or from hardware mic and can pipe it to ffmpeg which encodes it into flv and send it over rtmp.
Tested using Red5 rtmp server.
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token.
This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use:
`awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'`
You must adapt the command line to include:
* $MFA_IDis ARN of the virtual MFA or serial number of the physical one
* TTL for the credentials
Mirror a remote directory using some tricks to maximize network speed.
lftp:: coolest file transfer tool ever
-u: username and password (pwd is merely a placeholder if you have ~/.ssh/id_rsa)
-e: execute internal lftp commands
set sftp:connect-program: use some specific command instead of plain ssh
ssh::
-a -x -T: disable useless things
-c arcfour: use the most efficient cipher specification
-o Compression=no: disable compression to save CPU
mirror: copy remote dir subtree to local dir
-v: be verbose (cool progress bar and speed meter, one for each file in parallel)
-c: continue interrupted file transfers if possible
--loop: repeat mirror until no differences found
--use-pget-n=3: transfer each file with 3 independent parallel TCP connections
-P 2: transfer 2 files in parallel (totalling 6 TCP connections)
sftp://remotehost:22: use sftp protocol on port 22 (you can give any other port if appropriate)
You can play with values for --use-pget-n and/or -P to achieve maximum speed depending on the particular network.
If the files are compressible removing "-o Compression=n" can be beneficial.
Better create an alias for the command.
This one-liner is for cron jobs that need to provide some basic information about a filesystem and the time it takes to complete the operation. You can swap out the di command for df or du if that's your thing. The |& redirections the stderr and stdout to the mail command.
How to configure the variables.
TOFSCK=/path/to/mount
FSCKDEV=/dev/path/device
or
FSCKDEV=`grep $TOFSCK /proc/mounts | cut -f1 -d" "`
MAILSUB="weekly file system check $TOFSCK "
Please install aria2c before you try the above command. On ubuntu the command to install aria2c would be:
$sudo aptitude install aria2