Check These Out
This command will replace spaces in filename with underscore, for all file in directory that contain spaces.
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
Never ending music, generated via a C snippet, piped to aplay. Taken from: http://canonical.org/~kragen/bytebeat/
Shows all block devices in a tree with descruptions of what they are.
Compares the md5 checksums of the contents of two directories, outputting the checksum and filename where any files differ. Shows only the file name, not the full path.
(separator = $IFS)
Very simple web server listening on port 80 will serve index.html file or whatever file you like pointing your browser at http://your-IP-address/index.html for example.
If your web server is down for maintenance and you'd like to inform your visitors about it, quickly and easily, you just have to put into the index.html file the right HTML code and you are done! Of course you need to be root to run the command using port 80.
list top committers (and number of their commits) of svn repository.
in this example it counts revisions of current directory.
If you are behind a restrictive proxy/firewall that blocks port 22 connections but allows SSL on 443 (like most do) then you can still push changes to your github repository.
Your .ssh/config file should contain:
Host *
ForwardX11 no
TCPKeepAlive yes
ProtocolKeepAlives 30
ProxyCommand /usr/local/bin/proxytunnel -v -p -d %h:443
Host
User git
Hostname ssh.github.com
ChallengeResponseAuthentication yes
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
Basically proxytunnel "tunnels" your ssh connection through port 443.
You could also use corkscrew or some other tunneling program that is available in your distro's repository.
PS: I generally use "github.com" as the SSH-HOST so that urls of the kind git@github.com:USER/REPO.git work transparently :) You