Skip to content

Instantly share code, notes, and snippets.

View KB1RMA's full-sized avatar

Christopher Snyder KB1RMA

  • Liberty Mutual
  • Newburyport, MA
  • X @kb1rma
View GitHub Profile
@KB1RMA
KB1RMA / local-config.php
Last active January 19, 2016 08:34
Here is a quick and dirty little trick I often use for faking environments in Wordpress installs for local development. The real trick here is just detecting whether or not a local config file exists and setting credentials appropriately.
<?php
// Settings used for local development
// do NOT track in your repository for deployment
/**
* Following 2 lines overwrite the standard WP_HOME and WP_SITEURL in the
* wp_options table of the database. Doesn't solve all problems, but any
* URL's generated dynamically (You are using site_url('', 'relative'), aren't you?!)
* will generate correctly.
#!/usr/bin/env ruby
# Check DNS records against two authoritative nameservers
# usage: $ ruby record-checker.rb --input_file record-checker.csv --nameserver nina.ns.cloudflare.com
#
# Example output:
#
# | TYPE | RECORD | CURRENT | @NINA.NS.CLOUDFLARE.COM
# --|-------|--------------------------------|--------------------------------|-------------------------------
# ✗ | A | www.matternow.com | 45.56.118.101 | matternow.com.