How to set up a Headless Selenium Testing environment for CentOS 6.3.
Follow these steps to set up a CentOS 6.3 host to run headless Selenium tests with Firefox.
// To run: node theme.js | |
const fs = require('fs'); | |
const theme = { | |
"settings": { | |
"typography": { | |
"fontSizes": [ | |
// This is a comment. | |
{ | |
"name": "Large", |
[xdebug] | |
zend_extension="xdebug.so" | |
xdebug.remote_enable=1 | |
xdebug.remote_connect_back=1 | |
xdebug.default_enable=1 | |
xdebug.remote_autostart=1 | |
xdebug.remote_host=localhost | |
xdebug.remote_handler=dbgp | |
xdebug.remote_port=9000 | |
xdebug.cli_color=1 |
<?php | |
/** | |
* Do the opposite of wpautop | |
* | |
* @param string $s | |
* | |
* @return string | |
*/ | |
public static function reverse_wpautop( $s ) { |
<?php | |
if ( ! function_exists( '__return' ) ) { | |
function __return( $return ) { | |
return function() use ( $return ) { | |
return $return; | |
# using .domain to 127.0.0.1 | |
echo 'address=/.domain/127.0.0.1' >> /usr/local/etc/dnsmasq.conf | |
# make sure the file name in /etc/resolver is the same as your domain | |
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/domain' | |
# restart dnsmasq | |
sudo brew services restart dnsmasq |
<?php | |
/** | |
* Plugin Name: Extend a plugin | |
* Version: 0.0.1 | |
* Author: Jonathan Bardo | |
* License: GPLv2+ | |
* Author URI: http://jonathanbardo.com | |
*/ | |
if ( ! class_exists( 'Date_Range_Filter' ) ) { |
# Download from wordpress.org repository into your plugins folder | |
# https://wordpress.org/plugins/elasticpress/ | |
# Make sure you have wp-cli installed (otherwise it won't work) http://wp-cli.org/ | |
# Add config line to wp-config.php: | |
# define( 'EP_HOST', 'http://127.0.0.1:9200' ); | |
# In your docroot (WordPress root folder) | |
wp plugin activate elasticpress --network |
# Install on ubuntu trusty tahr 14.04 | |
# I do this with root user, but if you sudo access with your user it will work too! | |
sudo su | |
# Update apt-get | |
apt-get update | |
# Install java jdk 7 or java jdk 8 or oracle jdk | |
apt-get install openjdk-7-jre-headless | |
# Make sure java is installed | |
java -version | |
# This should output: java version "1.7.XX" |
# Querying vagrant | |
$ cd ~/Sites/vvv/www/example.com/ | |
$ vagrant ssh | |
$ cd /www/example.com/ | |
$ wp plugin status | |
$ exit; | |
# Querying staging server | |
$ ssh root@awesome.staging.server | |
$ cd /www/example.com/ |