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:
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* MU-Plugin Autoloader | |
* | |
* @author Eric Mann <[email protected]> | |
* @license MIT | |
* @copyright 2015 Eric Mann | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { |
<?php | |
$query_timer = 0; | |
add_filter( 'do_parse_request', function( $parse ) { | |
global $query_timer; | |
$query_timer = microtime( true ); | |
return $parse; |
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
<?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 ); | |
} | |
<?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 { | |
/** |
<?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 { | |
/** |
<?php | |
class Example { | |
public function __construct() { | |
$this->instantiate(); | |
} | |
public function instantiate() { | |
static $instance = null; | |
( function( window, undefined ) { | |
var md, rd; | |
// Constants | |
var MU = 2.0; | |
G = 6.626 * Math.pow( 10, -8 ), | |
PI = 3.14159, | |
MS = 1.989 * Math.pow( 10, 33 ), | |
RS = 6.96 * Math.pow( 10, 10 ), | |
CSQ = Math.pow( 2.9979 * Math.pow( 10, 10 ), 2 ); |