Check These Out
This will encrypt your single file and create a filename.gpg file.
Option: * -c : Encrypt with symmetric cipher
To decrypt
dhinesh@ubuntu:~$ gpg -c sample.rb.gpg
Uses google api to translate, you can modify the language in which translate modifying the parameter "langpair=|en", the format is language input|language output.
Mac OS X 10.5 (Leopard) introduced a new, 3D, reflective Dock. For those of us who prefer the Dock to be a little less distracting, this command is the answer. The Dock will be rendered in the same style as when pinned to the left- or right-hand side of the screen. Replace YES with NO to restore the 3D Dock.
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
Shows all block devices in a tree with descruptions of what they are.
Replace "user@domain.com" with the target e-mail address. Thanks to alediaz for "$HOSTNAME" which is very useful when running the command with Apple Remote Desktop to multiple machines simultaneously.
\$ which python
/usr/bin/python
\$ ll `!!`
lrwxrwxrwx 1 root root 9 2010-11-08 22:01 /usr/bin/python -> python2.6
Converts any number of seconds into days, hours, minutes and seconds.
sec2dhms() {
declare -i SS="$1"
D=$(( SS / 86400 ))
H=$(( SS % 86400 / 3600 ))
M=$(( SS % 3600 / 60 ))
S=$(( SS % 60 ))
[ "$D" -gt 0 ] && echo -n "${D}:"
[ "$H" -gt 0 ] && printf "%02g:" "$H"
printf "%02g:%02g\n" "$M" "$S"
}
Shows a tree of the disks. Requires "tree"