most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
<?php | |
add_filter( 'rest_authentication_errors', function( $result ) { | |
if ( ! empty( $result ) ) { | |
return $result; | |
} | |
if ( ! is_user_logged_in() ) { | |
return new WP_Error( 'restx_logged_out', 'Sorry, you must be logged in to make a request.', array( 'status' => 401 ) ); | |
} | |
return $result; |
== VM for local dev == | |
https://github.com/mmcachran/vagrant-elasticsearch-cluster | |
Add to WP config or in EP settings: | |
define( 'EP_HOST', 'http://10.0.0.11:9200' ); | |
Indexing your local | |
wp elasticpress index --setup --network-wide | |
== To index large multinetwork sites == |
Dockerfile
that is based on your production image and
simply install xdebug
into it. Exemple:FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
/** | |
* file: wdsjQuery.js | |
* | |
* Handle Foo things for the foo theme. | |
*/ | |
window.wdsFoo = {}; | |
( function( window, $, app ) { | |
// Private variable. | |
var fooVariable = 'foo'; |
<?php | |
// set up show expired = false | |
$where = array( | |
'Datetime.DTT_EVT_end' => array( '>=', current_time( 'mysql' )), | |
'status' => 'publish', | |
); | |
// run the query | |
if ( class_exists( 'EE_Registry' ) ) : | |
$events = EE_Registry::instance()->load_model( 'Event' )->get_all( array( | |
$where, |
// array utils | |
// ================================================================================================= | |
const combine = (...arrays) => [].concat(...arrays); | |
const compact = arr => arr.filter(Boolean); | |
const contains = (() => Array.prototype.includes | |
? (arr, value) => arr.includes(value) | |
: (arr, value) => arr.some(el => el === value) |
################################################################ | |
# Example configuration file for nginx | |
# | |
# To add a new local WordPress domain to your environment, copy | |
# this file using a filename that matches the domain you wish to | |
# setup. For example - mylocaldomain.com.conf would be an ideal | |
# filename for http://mylocaldomain.com | |
# | |
# Once copied, you will need to modify two settings in the server | |
# configuration provided: |
Currently considering https://github.com/webdriverio/webdrivercss
Core Goals: