Skip to content

Instantly share code, notes, and snippets.

View ptts's full-sized avatar
🏠
Working from home

Patrick ptts

🏠
Working from home
View GitHub Profile
@ptts
ptts / cloudflare-update-record.sh
Created December 2, 2017 16:07 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
#!/bin/bash
# CHANGE THESE
auth_email="[email protected]"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)
@ptts
ptts / cf-ddns.sh
Created December 2, 2017 16:33 — forked from ellerbrock/cf-ddns.sh
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# /usr/local/bin/cf-ddns.sh
@ptts
ptts / updateDns.php
Created December 2, 2017 17:00 — forked from Doxylamin/updateDns.php
Cloudflare + FritzBox -> DynDNS
<?php
/*
FRITZ!Box DynDNS Howto:
Update-URL: http://your-domain.tld/filename.php?user=<username>&pass=<pass>&hostname=<domain>&myip=<ipaddr>
Domainname: dyndns.your-domain.tld
Username: your-cloudflare-email-address
Password: your-cloudflare-api-token
*/
// static config:
#!/bin/bash
DATETIME=$(date '+%Y%m%d%H%M%S')
echo "This script will rename the Outlooks database to force a recreation"
read -p "Press enter to continue or close this window to abort."
# Force Outlook Profile rebuild (can take up to an hour)
OUTLOOK_PROFILES_DIR="$HOME/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles"