Check These Out
-e is the script function, it performs search and replace like vi, and -i is the edit the file in place.
if you use disk-based swap then it can defeat the purpose of this function.
Command used to know if we are working on a virtual or physical machine. This command will use the dmidecode utility to retrieve hardware information of your computer via the BIOS. Run this command as root or with sudo.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Replace 'csv_file.csv' with your filename.
This will deal nicely with filenames containing newlines and will run one lzma process per CPU core. It requires GNU Parallel http://www.youtube.com/watch?v=OpaiGYxkSuQ
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
*I run this with byobu as as a custom status bar entry that runs every 10 seconds by putting it in a script here:
$ .byobu/bin/10_update_windows
There's no output to stdout, so nothing is displayed on the status bar.
*Presumes that #{pane_title} is set to the hostname or prompt containing the host name. In my case, it's in this format:
$ $USER@$HOSTNAME:$PWD
The sed commands may need to be modified if your pane_title is different.
*If you want to strip out a common part of a hostname, add the following before '| uniq'
$ -e 's/[COMMON PART]//'
I use that to strip out the domain of the servers I connect to, leaving the subdomain.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
This will extract all DCT format images from foo.pdf and save them in JPEG format (option -j) to bar-000.jpg, bar-001.jpg, bar-002.jpg, etc.
Inspired by http://stefaanlippens.net/extract-images-from-pdf-documents