Check These Out
#4345 also works under windows
You would need pwgen installed first, on ubuntu you can get it by apt-get
$ sudo apt-get install pwgen
Useful when quickly looking for a commit id from a branch to use with git cherry-pick.
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
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
you will hear how many seconds since 1.1.1970 in english words with billions, millions and thousands.
this is very useful, if you want to get over to use the unixtimestamp instead of the 24 hour clock in your dayly life
The first grep any line with pod-feed in it plus the following five lines.
The second grep throws out any line not containing .
sed removes the leading four spaces then and the trailing .
Using a colon as sed's separating character avoids having to escape the /.
Works ok with Mythbuntu 9.04 (used mostly as a three line bash script).
combination of several of the above
An advantage is that this doesn't modify remained string at all. One can change {0,1} with {0,n} to drop several columns
ZSH ships a couple random number generators via the $RANDOM environment variable and rand48() via zsh/mathfunc, but neither are cryptographically secure. This code produces a 32-bit random number suitable for cryptography. It's only dependency is /dev/urandom and it does not rely on any shell commands or 3rd party utilities. It assumes ZSH was compiled with 64-bit integer support.