this works with URLs like git@github.com:...., not https
Use this command:
ssh-keygen -t rsa -C "email address of each account"
# make sure you name the key file accordingly| #!/usr/bin/python | |
| # Author: jose@josehidalgo.net, | |
| # github.com/joseche | |
| # Requirements: | |
| # pip install boto urlopen | |
| # Credentials: | |
| # You need to have your AWS keys in this file ~/.aws/credentials: |
| # A public telnet server with many little games and distractions. | |
| telnet telehack.com | |
| # x-mas syslog | |
| tail -F /var/log/syslog | awk '{printf("\033[%dm%s\033[0m\n",31+NR%2,$0)}' | |
| # Star Wars Episode IV in Reverse DNS. | |
| ( seq 1 8 200 ; seq 6 8 200 ) | sort -n | xargs -I{} -n 1 dig +short -x 206.214.251.{} |
| # get access and secret keys form a role | |
| # last param is the role name | |
| curl http://169.254.169.254/latest/meta-data/iam/security-credentials/MyRole |
| # install tools | |
| yum install -y policycoreutils-devel | |
| # create policy from logs | |
| grep nginx /var/log/audit/audit.log | audit2allow -M nginx | |
| # add policy to allowed policies | |
| semodule -i nginx.pp | |
| # more info |
Use this command:
ssh-keygen -t rsa -C "email address of each account"
# make sure you name the key file accordingly| function computeDistance(startCoords, destCoords) { | |
| var startLatRads = degreesToRadians(startCoords.latitude); | |
| var startLongRads = degreesToRadians(startCoords.longitude); | |
| var destLatRads = degreesToRadians(destCoords.latitude); | |
| var destLongRads = degreesToRadians(destCoords.longitude); | |
| var Radius = 6371; // radius of the Earth in km | |
| var distance = | |
| Math.acos(Math.sin(startLatRads) * Math.sin(destLatRads) + |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:GetBucketLocation", | |
| "s3:ListAllMyBuckets" | |
| ], | |
| "Resource": "arn:aws:s3:::*" |
| # .bash_profile for login shell | |
| # .profile for interactive shell | |
| # | |
| # control line: | |
| [ -z "$BASHRC" ] || exit | |
| # load defaults | |
| [ -f /etc/bashrc ] && . /etc/bashrc | |
| [ -f ~/.bash_profile ] && . ~/.bash_profile | |
| [ -f ~/.profile ] && . ~/.profile |
| echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf | |
| echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf | |
| sudo sysctl -w kern.maxfiles=65536 | |
| sudo sysctl -w kern.maxfilesperproc=65536 | |
| ulimit -n 65536 65536 |
| # first argument the xml file to convert | |
| # second argument the csv output file | |
| # TODO: it doesn't create the header of the csv file, only values | |
| require 'nokogiri' | |
| require 'pp' | |
| exit unless ARGV.length > 1 | |
| exit unless File.exist?(ARGV[0]) |