Skip to content

Instantly share code, notes, and snippets.

@tibu
tibu / add-dns-record.sh
Last active September 19, 2017 15:18 — forked from justinclayton/add-dns-record.sh
CLI to add DNS Records in Route53
#!/bin/bash
## Allows for creation of "Basic" DNS records in a Route53 hosted zone
function main() {
zone_name=$1
record_name=$2
record_value=$3
[[ -z $record_value ]] && usage && exit 1
@tibu
tibu / whois-watch.sh
Created August 4, 2017 13:26 — forked from wei/whois-watch.sh
Monitor whois changes
#!/bin/bash
#
# Run this script once per minute
#
# * * * * * /path/to/whois-watch.sh google.com apple.com >> /var/log/whois-watch.log 2>&1
# update username in mail command
# update sed command depending on server return text
#
@tibu
tibu / phpmailer.sh
Last active December 28, 2016 14:02 — forked from cebe/phpmailer.sh
command for finding phpmailer files and line of code and change it to the latest version
#!/bin/bash
wget https://raw.githubusercontent.com/PHPMailer/PHPMailer/master/class.phpmailer.php
for file in $(find /var/www/ -name 'class.phpmailer.php' -print) ; do
echo $file
cp $file $file.bak
cp ./class.phpmailer.php $file
# dir=$(dirname $file)
# chown $(stat -c '%U' $dir):$(stat -c '%G' $dir) $file