finding unused security groups (ref: https://stackoverflow.com/questions/24685508/how-to-find-unused-amazon-ec2-security-groups) First, get a list of all security groups aws ec2 describe-securit...
Connect to different instances of RDS via ssh tunnels (ie bastion) with the handy (redacted) script show at the bottom of the page whcih effectively opens an ssh tunnel from here to RDS via the bas...
Best Practices configure a read only user for running discovery queries. never use an admin account for changing things unless absolutely required. Better if you can use an account that is ta...
Specify input file delimiter with -F; cat inputfile.csv | awk -F, '{print "this is the first field:"$1}' this is the first field:South Africa` write apostrophes out by escaping and wrapping in qu...
arp -n shows cached macs
apt-get update refreshes package info apt-get upgrade will upgrade packages without installing new packages or removing old ones. keep the box ‘as it is’. Will fail if it needs a new package for...
gather info ansible localhost -m setup debug For debugging purposes it can be useful to not just dump hostvars but also all other variables and group information. You can do this using a jinja ...
Create the new file (14Gig in this example) using fallocate as its quicker than dd fallocate -l 14G /mnt/lvm_log/swapfile now make it rw only by root chmod 600 /mnt/lvm_log/swapfile now make it...
ssh-keygen -p -f keyfile
All filters are read from the recordfilter table; mysql> select * from recordfilter; +----------+----------------------+-------------------------------------------------------------------------...
A new version of content is available.