Skip to content

Instantly share code, notes, and snippets.


Russell Heimlich kingkool68

View GitHub Profile
georgestephanis /
Created Nov 21, 2018
Make deploying from Git repositories to SVN a bit easier.
if [ $# -eq 0 ]; then
echo "Run this script from within the root of the git repository that you'd like to deploy."
echo "You can only deploy something that's already been tagged in git."
echo 'Usage: ` <tag | HEAD>`'
exit 1
GIT_DIR=$( pwd )
stephenharris / import-venues.php
Created Mar 21, 2017
A WP-CLI command to import a CSV of venues
View import-venues.php
Plugin Name: Import Venues WP CLI command
Plugin URI:
Description: Adds `wp eo venue import <path-to-file>` command.
Author: Stephen Harris
Version: 0.1
// Exit if accessed directly
mbijon /
Created Sep 19, 2016
CLI command to start Chrome with XSS Auditor disabled. Use for XSS/security testing
'/Applications/Google Chrome' --disable-xss-auditor --enable-devtools-experiments --disable-features=enable-automatic-password-saving
MikeNGarrett / wp-config.php
Last active Dec 3, 2021
All those damned wp-config constants you can never remember.
View wp-config.php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url
ericandrewlewis / gist:95239573dc97c0e86714
Last active Nov 30, 2021
Setting up a WordPress site on AWS
View gist:95239573dc97c0e86714

Setting up a WordPress site on AWS

This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.

This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.

If you experience any difficulties or have any feedback, leave a comment. 🐬

Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.

ryanjbonnell / wp-config.php
Created Mar 12, 2014
WordPress Config: Use X-Forwarded-For HTTP Header to Get Visitor's Real IP Address
View wp-config.php
// Use X-Forwarded-For HTTP Header to Get Visitor's Real IP Address
if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
$http_x_headers = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] );
$_SERVER['REMOTE_ADDR'] = $http_x_headers[0];
ravibhure / gist:7523642
Created Nov 18, 2013
HAProxy config for wordpress
View gist:7523642
# HAProxy config to block /wp-login.php and wp-admin POST method on wordpress webserver
log local0
log local1 notice
#log loghost local0 info
maxconn 25000
user prod
group prod
pix0r /
Last active Sep 11, 2021
Use wget to scrape all URLs from a sitemap.xml Usage:
if [ "$SITEMAP" = "" ]; then
echo "Usage: $0"
exit 1
XML=`wget -O - --quiet $SITEMAP`
aarongustafson / undoing-tables.html
Last active Dec 11, 2015
A Strategy for Undoing Tables
View undoing-tables.html
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Dept, Title</th>
<th scope="col">Phone</th>
croxton / gist:4073583
Last active Mar 29, 2021
Install xdebug 2.2.0 for AMPPS on OSX
View gist:4073583
Grab the 'PHP Remote Debugging Client' (the pre-complied xdebug binary for OSX) from here:
Unzip it, find the folder that corresponds to the version of PHP you want to install it for and copy the file from there into your php extensions folder in the relevant PHP version directory. E.g. for PHP 5.4:
Now open PHP.ini in a text editor: