brew install libmemcached
brew install zlibFind installed locations:
Whenever we change our templates we still have to use our build script and this can get annoying. Thankfully with webpack-dev-server and BrowserSync we can fix this:
npm i -D browser-sync browser-sync-webpack-plugin webpack-dev-server
BrowserSync will act like a proxy, waiting for webpack to do its thing and then reloading the browser for us.
Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
| <?php | |
| /** | |
| * Create a new custom yoast seo sitemap | |
| */ | |
| add_filter( 'wpseo_sitemap_index', 'ex_add_sitemap_custom_items' ); | |
| add_action( 'init', 'init_wpseo_do_sitemap_actions' ); | |
| // Add custom index |
| var gulp = require('gulp'); | |
| var sourcemaps = require('gulp-sourcemaps'); | |
| var source = require('vinyl-source-stream'); | |
| var buffer = require('vinyl-buffer'); | |
| var browserify = require('browserify'); | |
| var watchify = require('watchify'); | |
| var babel = require('babelify'); | |
| function compile(watch) { | |
| var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
| <?php | |
| // Based on <https://github.com/mecha-cms/x.minify> | |
| namespace x\minify\_ { // start namespace | |
| $n = __NAMESPACE__; | |
| \define($n . "\\token_boolean", '\b(?:true|false)\b'); | |
| \define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+'); |
| <?php | |
| // UPDATE: Stefan from Stack Overflow has explained a better way to handle cart item data. | |
| // See http://stackoverflow.com/a/32327810/470480 | |
| // ---------------------- | |
| /* | |
| Instructions: |
| <?php | |
| /* | |
| * Plugin Name: Paulund WP List Table Example | |
| * Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area | |
| * Plugin URI: http://www.paulund.co.uk | |
| * Author: Paul Underwood | |
| * Author URI: http://www.paulund.co.uk | |
| * Version: 1.0 | |
| * License: GPL2 | |
| */ |
| <?php | |
| $file = '/path/to/file.png'; | |
| $filename = basename($file); | |
| $upload_file = wp_upload_bits($filename, null, file_get_contents($file)); | |
| if (!$upload_file['error']) { | |
| $wp_filetype = wp_check_filetype($filename, null ); | |
| $attachment = array( | |
| 'post_mime_type' => $wp_filetype['type'], | |
| 'post_parent' => $parent_post_id, |
| #!/bin/bash | |
| # Usage: slackpost <token> <channel> <message> | |
| # Enter the name of your slack host here - the thing that appears in your URL: | |
| # https://slackhost.slack.com/ | |
| slackhost=PUT_YOUR_HOST_HERE | |
| token=$1 |