View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

View temp-testing-curl.php
/**
* Gets the PURL from the Friendbuy API.
*
* @param string e-mail address
* @returns object API Response
*/
function friendbuy_get_purl( $email ) {
// Verify param is actually an e-mail
if ( ! is_email( $email ) ) {
View Customfile
config.vm.provider :hyperv do |v, override|
override.vm.box = "ericmann/trusty64"
end
config.vm.synced_folders.each do |id, options|
# Make sure we use SMB for file mounts on Windows
if ! options[:type] && Vagrant::Util::Platform.windows?
options[:type] = "smb"
end
end
View keybase.md

Keybase proof

I hereby claim:

  • I am ericmann on github.
  • I am eamann (https://keybase.io/eamann) on keybase.
  • I have a public key whose fingerprint is F7CA EACB D776 6264 C62E 0B32 9DC3 CED2 E6A0 7E86

To claim this, I am signing this object:

View autoloader.php
<?php
/**
* MU-Plugin Autoloader
*
* @author Eric Mann <eric@eamann.com>
* @license MIT
* @copyright 2015 Eric Mann
*/
if ( ! defined( 'ABSPATH' ) ) {
View gist:296897ca4195afe4eca5
<?php
$query_timer = 0;
add_filter( 'do_parse_request', function( $parse ) {
global $query_timer;
$query_timer = microtime( true );
return $parse;
View gist:d73806e773e1b1765af4

Ghost is an open source platform for blogging founded by John O'Nolan and Hannah Wolfe. It's a node.js application and therefore works great in conjunction with nginx. This guide will will help you create a high performance nginx virtual host configuration for Ghost.

"Don't use #nodejs for static content" - @trevnorris. If #nginx isn't sitting in front of your node server, you're probably doing it wrong.

— Bryan Hughes (@nebrius) August 30, 2014
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

The node.js application runs on a port on your server. We can configure nginx to proxy to this port and also cache so that we don't need to rely on express, the default n

View gist:8929492
<?php
class My_Post_Work {
public function __construct() {
add_action( 'init', array( $this, 'custom_rewrites' ) );
add_filter( 'posts_results', array( $this, 'make_trash_public' ), 10, 2 );
add_filter( 'the_posts', array( $this, 'make_trash_private' ), 10, 2 );
}
View gist:7745729
<?php
/**
* This class contains one protected method we wish to test.
* In reality, it would also contain several public methods,
* but that's immaterial to our discussion.
*
* @pacakge Tutorials
*/
class ClassToTest {
/**
View gist:7702180
<?php
/**
* This class contains two private methods we wish to test.
* In reality, it would also contain several public methods,
* but that's immaterial to our discussion.
*
* @package Tutorials
*/
class ClassToTest {
/**