Skip to content

Instantly share code, notes, and snippets.

View keithort's full-sized avatar

Keith Ort keithort

View GitHub Profile
/** Determines if an object is freed
http://stevehanov.ca/blog/index.php?id=148
@param obj is the object of interest
@param freeFn is a function that frees the object.
@returns a promise that resolves to {freed: boolean, memoryDiff:number}
@author Steve Hanov <[email protected]>
*/
function isObjectFreed(obj, freeFn) {
return new Promise( (resolve) => {
<?php
/**
* Enqueue scripts and styles.
*/
function site_scripts() {
// Include Google fonts
$query_args = array(
'family' => 'Open+Sans|Lato|Montserrat',
'subset' => 'latin,latin-ext', );
wp_enqueue_style( 'google-fonts', add_query_arg( $query_args, "//fonts.googleapis.com/css" ), array(), null );