Check These Out
Requires perl 5.14 or greater
This command takes a 1280x1024 p picture from the webcam.
If prefer it smaller, try changing the -s parameter: qqvga is the tiniest, vga is 640x480, svga is 800x600 and so on.
Get your smile on and press enter! :)
While the posted solution works, I'm a bit uneasy about the "%d" part. This would be hyper-correct approach:
$ lsof|gawk '$4~/txt/{next};/REG.*\(deleted\)$/{sub(/.$/,"",$4);printf ">/proc/%s/fd/%s\n", $2,$4}'
Oh, and you gotta pipe the result to sh if you want it to actually trim the files. ;)
Btw, this approach also removes false negatives (OP's command skips any deleted files with "txt" in their name).
Save the current directory without having to leave it. When you do decide to leave the current directory, use popd to return to it.
Written for Mac OSX. When you are working in a project and want to open it on Github.com, just type "gh" and your default browser will open with the repo you are in. Works for submodules, and repo's that you don't own.
You'll need to copy / paste this command into a gh.sh file, then create an alias in your bash or zsh profile to the gh.sh script. Detailed instructions here if you still need help:
http://gist.github.com/1917716
In turn you can get the contents of your clipboard by typing xsel by itself with no arguments:
$ xsel
This command requires you to install the xsel utility which is free
Using this command you can track a moment when usb device was attached.
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
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"