Check These Out
Create a serial console with "socket (named pipe)" of "/tmp/socket", "from:server, to:virtual machine" in vmware player, etc.. gui. Run the above command after you have booted the guest OS (which should also be configured for serial console).
An easy alias for opening a manpage, nicely HTML formatted, in your set internet browser.
If you get a "command exited with status 3" error you need to install groff.
Are there any creative pieces of music that can be created using beep and the shell? I'd love to hear it!
In order to write bash-scripts, I often do the task manually to see how it works. I type ### at the start of my session.
The function fetches the commands from the last occurrence of '###', excluding the function call. You could prefix this with a here-document to have a proper script-header.
Delete some lines, add a few variables and a loop, and you're ready to go.
This function could probably be much shorter...
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
Setting: You have a lot of jpg files in a directory.
Maybe your public_html folder which is readable on the net because of Apache's mod_userdir. All those files from the current folder will be dropped into a file called gallery.html as image tags that can be viewed within a web browser locally or or over the Internet.
Original:
$find . -iname "*.jpg" -exec echo "" >> gallery.html \;
Exclude 400 client hosts with NFS auto-mounted home directories.
Easily modified for inclusion in your scripts.
Read this before you down voting and comment that it is not working -> Wont work on latest versions ~75> since database file is locked and has to be decrypted. This is useful if you have an old hdd with a chrome installation and want to decrypt your old passwords fast.