sudo usermod -a -G nginx ec2-user &&
exit
foreach ( array( 'pre_term_description' ) as $filter ) { | |
remove_filter( $filter, 'wp_filter_kses' ); | |
} | |
foreach ( array( 'term_description' ) as $filter ) { | |
remove_filter( $filter, 'wp_kses_data' ); | |
} |
var browserSync = require("browser-sync"); | |
var bs1 = browserSync.create("proxy1"); | |
var bs2 = browserSync.create("proxy2"); | |
bs1.init({ | |
proxy: "http://mylocal.dev", | |
port: 3010, | |
ui: { | |
port: 3011 |
<?php | |
/****** | |
Parallelize downloads across hostnames for WordPress. | |
Useful to boost static resources load speed on websites. | |
Recommended by GTmetrix, Pingdom, Google Speed Insights, and others. | |
See full post > https://medium.com/p/32e9dc2fec0c | |
In order to work properly, all subdomains/hostnames MUST have the same structure/path. Ex: | |
http://mydomain.com/wp-content/uploads/2015/11/myimage.jpg |
/** | |
* This function loops over cart items, and moves any item with shipping class 'special-class' into a new package. | |
* The new package in this example only takes flat rate shipping. | |
*/ | |
function split_special_shipping_class_items( $packages ) { | |
$found_item = false; | |
$special_class = 'special-class'; // edit this with the slug of your shippig class | |
$new_package = current( $packages ); | |
$new_package['contents'] = array(); | |
$new_package['contents_cost'] = 0; |
String.prototype.getInitials = function(glue){ | |
if (typeof glue == "undefined") { | |
var glue = true; | |
} | |
var initials = this.replace(/[^a-zA-Z- ]/g, "").match(/\b\w/g); | |
if (glue) { | |
return initials.join(''); | |
} |
<?php | |
/** | |
* Run a WP-CLI command via an authorized HTTP POST webhook. | |
* | |
* curl -X POST https://mysite.com/webhook-wp-cli.php \ | |
* -H 'Content-Type: application/json' \ | |
* -H 'X-Authorization: Bearer MY_SUPER_SECRET_KEY_HERE' \ | |
* -d '[ ["theme", "install"], ["https://downloads.wordpress.org/theme/go.zip"], ["force"], {"user": 1} ]' | |
* |
A Pen by Marcus Obst on CodePen.
// License: MIT, feel free to use it! | |
const Intercom = require('intercom-client'); | |
const appId = 'APP_ID' | |
const apiKey = 'APP_KEY' | |
const client = new Intercom.Client(appId, apiKey); | |
const async = require('async-q') | |
//REF: https://developers.intercom.com/reference#iterating-over-all-users | |
//WARNING: you can only have one scroll working at once. you need to wait for that scroll to clear to try again |
#!/bin/bash | |
# Stop all containers | |
containers=`docker ps -a -q` | |
if [ -n "$containers" ] ; then | |
docker stop $containers | |
fi | |
# Delete all containers | |
containers=`docker ps -a -q` | |
if [ -n "$containers" ]; then | |
docker rm -f -v $containers |