Instantly share code, notes, and snippets.

View nmap.sh
#!/usr/bin/env bash
#
# Run various nmap scans on a hostname and log all scans to a single file.
#
# Alternatively, nmap does support log-output arguments on it's own, but the problem is
# grouping various scans that often conflict during the same process, thus requiring
# a series of multiple scans and would create multiple logs.
#
# usage examples:
# default scan:
View aws.rds.restore.snapshot.sh
#!/usr/bin/env bash
#
# Restore/Re-Deploy an Amazon RDS (MySQL) Database Instance from a specified snapshot.
#
# This script is intended to be run on an AWS EC2 instance
# within an isolated VPC infrastructure, to restore or re-deploy a
# test/staging database instance from a the latest
# 'production database' snapshot.
#
# This script requires the latest aws-cli program.
View myisam2innodb.sh
#!/usr/bin/env bash
#
# This was commented on the following page:
# https://dev.mysql.com/doc/refman/8.0/en/converting-tables-to-innodb.html
#
# This script/command was tested and found to be harmless/non-destructive, surprisingly. ;-P
#
DBNAME="exampledb";
DBHOST="localhost";
DBUSER="someguy";
View postsuper
mailq
postsuper -d $(mail_queue_id)
View f.u.amazon.rds.super.privs.sh
sed -i 's/\/\*[^*]*DEFINER=[^*]*\*\///' dump2rds.sql
View test.pquery.pl
#!/usr/bin/perl
use strict;
use warnings;
# install pQuery:
# sudo cpanm pQuery;
use pQuery;
my $url = "https://github.com/sodonnell/plowbot/";
View install.awscli.sh
yum -y install python34 python34-pip
pip3 install --upgrade pip
pip3 install awscli
View Add basic php-fpm proxy to apache config
echo -e "<FilesMatch \\.php$>\n\tSetHandler \"proxy:fcgi://127.0.0.1:9000\"\n</FilesMatch>\n\n" >> /etc/httpd/conf/httpd.conf;
View mount_iso.sh
#!/bin/bash
sudo mkdir /mnt/iso
sudo mount -o loop disk.image.iso /mnt/iso