Skip to content

Instantly share code, notes, and snippets.

View A5hleyRich's full-sized avatar

Ashley Rich A5hleyRich

View GitHub Profile
@A5hleyRich
A5hleyRich / nginx.conf
Last active March 19, 2016 23:48
Hosting WordPress Yourself Multiple Sites
user ashley;
worker_processes 1;
pid /run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
}
http {
@A5hleyRich
A5hleyRich / cron-test.php
Last active July 26, 2022 17:25
WordPress Cron and Email Test
<?php
/**
* Plugin Name: Cron Test
* Plugin URI: https://gist.github.com/A5hleyRich/6de1712ce5f46662c8ba
* Description: WordPress cron and email test.
* Author: Ashley Rich
* Version: 1.0
* Author URI: http://ashleyrich.com
*/
@A5hleyRich
A5hleyRich / base64_test.php
Created June 9, 2015 15:00
Base64 Testing
<?php
/*
Plugin Name: Base64 Encoded Data Test
Plugin URI: http://github.com/deliciousbrains/wp-migrate-db-pro-tweaks
Description: Examples of using WP Migrate DB Pro's filters
Author: Delicious Brains
Version: 0.1
Author URI: http://deliciousbrains.com
*/
@A5hleyRich
A5hleyRich / nginx.conf
Last active October 17, 2017 12:35
Hosting WordPress Yourself Part 1 – Installing Nginx, PHP and MySQL
user ashley;
worker_processes 1;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 1024;
multi_accept on;
}
@A5hleyRich
A5hleyRich / buttons-1.php
Last active August 29, 2015 14:17
Delightful Download Docs
$buttons = array(
'black' => array(
'name' => __( 'Black', 'delightful-downloads' ),
'class' => 'button-black'
),
'blue' => array(
'name' => __( 'Blue', 'delightful-downloads' ),
'class' => 'button-blue'
),
'grey' => array(
@A5hleyRich
A5hleyRich / nginx.conf
Last active August 29, 2015 14:11
Post: WordPress Outbound Link Tracking using Google Analytics
# Affiliate Links
location /out/digitalocean {
add_header X-Robots-Tag: "noindex, nofollow";
return 302 https://www.digitalocean.com/?refcode=3196717b4908;
}
location /out/studiopress {
add_header X-Robots-Tag: "noindex, nofollow";
return 302 http://www.shareasale.com/r.cfm?b=241369&u=904813&m=28169&urllink=&afftra$
}
@A5hleyRich
A5hleyRich / myplugin.php
Last active August 29, 2015 14:11
Post: Upgrade Procedure for WordPress Plugin Developers
<?php
define( 'MYPLUGIN_VERSION', '1.6.1' );
if ( is_admin() ) {
include_once( plugin_dir_path( __FILE__ ) . 'includes/admin/upgrades.php' );
}
@A5hleyRich
A5hleyRich / .gitignore
Created December 6, 2014 14:10
WordPress Git
# Thanks to: https://gist.github.com/jdbartlett/444295
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!wp-content/
# Ignore everything in the "wp-content" directory, except the "plugins" and "themes" directories.
wp-content/*
!wp-content/plugins/