Skip to content

Instantly share code, notes, and snippets.

Tibor Szentmarjay tibu

View GitHub Profile
@tibu
tibu / get-zone.sh
Created Jan 29, 2018
Download zone file in bind format from AWS Route53
View get-zone.sh
#!/bin/bash
# download zone from AWS Route53
zonename=$1
hostedzoneid=$(aws route53 list-hosted-zones | jq -r ".HostedZones[] | select(.Name == \"$zonename.\") | .Id" | cut -d'/' -f3)
aws route53 list-resource-record-sets --hosted-zone-id $hostedzoneid --output json | jq -jr '.ResourceRecordSets[] | "\(.Name) \t\(.TTL) \t\(.Type) \t\(.ResourceRecords[].Value)\n"'
@tibu
tibu / add-dns-record.sh
Last active Sep 19, 2017 — forked from justinclayton/add-dns-record.sh
CLI to add DNS Records in Route53
View add-dns-record.sh
#!/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 Aug 4, 2017 — forked from wei/whois-watch.sh
Monitor whois changes
View whois-watch.sh
#!/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 / keybase.md
Created Feb 10, 2017
Keybase proof
View keybase.md

Keybase proof

I hereby claim:

  • I am tibu on github.
  • I am tibu (https://keybase.io/tibu) on keybase.
  • I have a public key ASC72YCPAXZ3Xeh1rWBFAmPsORHKO2APnXCuCrNjj4exwgo

To claim this, I am signing this object:

@tibu
tibu / phpmailer.sh
Last active Dec 28, 2016 — forked from cebe/phpmailer.sh
command for finding phpmailer files and line of code and change it to the latest version
View phpmailer.sh
#!/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
View Linux commands
SSL cert test: openssl s_client -connect ssc.disneylandparis.com:443 | openssl x509 -noout -dates
You can’t perform that action at this time.