Skip to content

Instantly share code, notes, and snippets.

View EvanHerman's full-sized avatar
🐈
Cats, Code, WordPress

Evan Herman EvanHerman

🐈
Cats, Code, WordPress
View GitHub Profile
@EvanHerman
EvanHerman / apache-ci.conf
Last active August 25, 2017 21:10 — forked from petersuhm/apache-ci.conf
Circle CI Apache configuration file
<VirtualHost *:80>
LoadModule php7_module /opt/circleci/php/7.1.3/usr/lib/apache2/modules/libphp7.so
DocumentRoot "/home/ubuntu/wordpress"
ServerName wordpress.dev
ServerAlias *.dev
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
@EvanHerman
EvanHerman / circle.yml
Last active August 25, 2017 23:24 — forked from petersuhm/circle.yml
Example CircleCi configuration for WP Pusher
machine:
timezone:
Europe/Copenhagen
php:
version: 5.3.3
# This will be added to the `/etc/hosts` file
hosts:
wordpress.dev: 127.0.0.1
@EvanHerman
EvanHerman / circle.yml
Created August 24, 2017 17:49 — forked from Arjeno/circle.yml
Always use the latest version of Chrome on CircleCI
# This makes sure Chrome is always up to date in your test suite
# On average this adds about 10 seconds to your build suite
# Be sure to use Ubuntu 14.04 (Trusty) in the CircleCI's OS setting (Settings > Build Environment)
dependencies:
pre:
- curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome.deb
- sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome
- rm google-chrome.deb
@EvanHerman
EvanHerman / gist:dfd2a8c4f2f129b65a54344a97ffd80e
Created December 17, 2016 19:08 — forked from paulallies/gist:0052fab554b14bbfa3ef
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
@EvanHerman
EvanHerman / functions.php
Created January 24, 2016 16:56
Localize the jquery datepicker in WordPress using the WP_Locale object
<?php
add_action( 'admin_enqueue_scripts', 'admin_print_js' );
public function admin_print_js() {
global $wp_locale;
//add the jQuery UI elements shipped with WP
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'jquery-ui-datepicker' );
<?php
/*
Plugin Name: Pug Bomb API Endpoint
Description: Adds an API endpoint at /api/pugs/$n_pugs
Version: 0.1
Author: Brian Fegter
Author URL: http://coderrr.com
*/
class Pugs_API_Endpoint{
@EvanHerman
EvanHerman / timeline-express-image-icons.php
Last active February 25, 2018 14:28 — forked from petenelson/timeline-express-filter-test.php
Timeline Express - Add an additional image field to use in place of the icon on the timeline.
/*
* Timeline Express - Image Icons
*
* Note: Requires Timeline Express v1.2 or later.
* The following code should be placed in the bottom of your active themes functions.php file.
*/
add_filter( 'timeline-express-custom-icon-html', 'pn_timeline_express_custom_icon_html_test', 10, 3 );
function pn_timeline_express_custom_icon_html_test( $html, $post_id, $timeline_express_options ) {