Skip to content

Instantly share code, notes, and snippets.

@afridley
afridley / .eslintignore
Created April 30, 2019 22:35 — forked from wpscholar/.eslintignore
Webpack 4 Config for WordPress plugin, theme, and block development
**/*.min.js
**/*.build.js
**/node_modules/**
**/vendor/**
build
coverage
cypress
node_modules
vendor
@afridley
afridley / path-in-mac-osx-10.7.mdown
Created February 22, 2019 19:45 — forked from Overbryd/path-in-mac-osx-10.7.mdown
Correcting $PATH in MacOSX 10.7 for homebrew

$PATH in MacOSX 10.7

MacOSX has a truly global path setting that precedes any other setting like ~/.bash_profile. The file /private/etc/paths is a list of pathnames. The order from top to bottom defines the resulting order in the $PATH variable. After loading /private/etc/paths there is a directory /private/etc/paths.d/ with files in the same style. Those are appended to the $PATH variable.

The default content of /private/etc/paths looks like this:

/usr/bin

/bin

@afridley
afridley / neo-matrix-elementapi.php
Created January 17, 2019 18:08
neo element api example
<?php
require craft()->path->getPluginsPath().'elementapi/vendor/autoload.php';
require craft()->path->getAppPath().'../../vendor/autoload.php';
use League\Fractal\TransformerAbstract;
use Cocur\Chain\Chain;
class ProviderApiTransformer extends TransformerAbstract