Skip to content

Instantly share code, notes, and snippets.

View kdallas's full-sized avatar

Larry Browning kdallas

View GitHub Profile
@howanghk
howanghk / cloudflare_ddns_updater.php
Last active February 26, 2017 03:48 — forked from kdallas/index.php
Invited by Matthew Prince (https://twitter.com/eastdakota/status/453542354117754882), I am switching to Cloudflare DDNS. However it's difficult to configure my dd-wrt router to update my Dynamic DNS host name with Cloudflare. So I ended up with my router calling a PHP script hosted on my website.
<?php
// ----- dd-wrt DDNS settings: -----
// DDNS Service: Custom
// DYNDNS Server: <your web server domain> (e.g. www.example.com)
// User Name: <anything>
// Password: <anything>
// Host Name: <your DDNS hostname> (e.g. home.example.com)
// URL: /cloudflare_ddns_updater.php?email=<your cloudflare account email>&apikey=<your cloudflare client api key>&domain=<your domain>&host=<your DDNS hostname>
// (e.g.: /cloudflare_ddns_updater.php?email=me@example.com&apikey=123456789012345678901234567890&domain=example.com&host=home.example.com)
@francisbyrne
francisbyrne / chmodr.sh
Created September 16, 2012 07:54
Recursive chmod script for dirs and/or files
#!/bin/sh
#
# chmodr.sh
#
# author: Francis Byrne
# date: 2011/02/12
#
# Generic Script for recursively setting permissions for directories and files
# to defined or default permissions using chmod.
#
@gentlecat
gentlecat / cloudflare.php
Last active October 23, 2022 10:13
CloudFlare DNS records updater
<?php
/**
* Settings
*/
define('API_KEY', $_GET['apikey']); // CloudFlare API key
define('USERNAME', 'user@example.com'); // Email address used to login into CloudFlare
define('IP', getCurrentIP()); // Current IP address
echo 'Setting IP address to "' . IP . '"...<br />';