This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Place next to wp-blog-header.php. Visit this file to find the time suck. | |
*/ | |
declare(ticks=1); | |
register_tick_function('ds_do_profile'); | |
$ds_profile = array(); | |
$ds_last_time = microtime(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'after_switch_theme', 'gowp_copy_theme_mods' ); | |
function gowp_copy_theme_mods() { | |
$mods = get_theme_mods(); | |
if ( is_null( $mods ) || ( ( 1 == count( $mods ) ) && ! $mods[0] ) ) { | |
$parent = wp_get_theme()->get('Template'); | |
$child = basename( dirname( __FILE__ ) ); | |
update_option( "theme_mods_$child", get_option( "theme_mods_$parent" ) ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Install Packages Needed To Compile PHP 7 | |
apt: pkg={{ item }} state=latest | |
with_items: | |
- git | |
- autoconf | |
- bison | |
- libxml2-dev | |
- libbz2-dev | |
- libmcrypt-dev | |
- libcurl4-openssl-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Register script and add necessary options to it, make sure the path is correct | |
function flush_redis_enqueue_scripts() { | |
wp_enqueue_script( 'flush-redis', plugin_dir_url( __FILE__ ) . 'js/script.js', array( 'jquery' ) ); | |
wp_localize_script( 'flush-redis', 'FlushRedis', array( | |
'ajaxUrl' => admin_url( 'admin-ajax.php' ), | |
'flushRedisNonce' => wp_create_nonce( 'flush-redis-nonce' ), | |
) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file should be in /etc/monit/conf.d | |
check process hhvm with pidfile /var/run/hhvm/pid | |
group hhvm | |
# Start program calls our custom script from above | |
start program = "/usr/local/sbin/start_hhvm.sh" | |
stop program = "/usr/sbin/service hhvm stop" | |
if failed unixsocket /var/run/hhvm/hhvm.sock then restart | |
if mem > 400.0 MB for 1 cycles then restart | |
if 5 restarts with 5 cycles then timeout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
include /home/webmaster/www/www.wp-kickstart.com.conf; | |
server_name www.wp-kickstart.com; | |
listen 443 ssl spdy; | |
server_tokens off; | |
client_body_buffer_size 10K; | |
client_header_buffer_size 1k; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: datadog-agent | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Launch datadog agent | |
# Description: | |
### END INIT INFO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# For this script to work, save it somewhere in the executable path, like /usr/local/sbin/backup.sh | |
# make it executable: chmod +x /usr/local/sbin/backup.sh | |
# then add it to cron: crontab -e | |
# and add the line below, which will run backup 3am each day, then upload to Dropbox | |
# 0 3 * * * /usr/local/sbin/backup.sh > /dev/null 2>&1 | |
# You also need WP CLI installed: http://wp-cli.org/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###* | |
* @file | |
* A hook system. | |
* @see https://gist.github.com/donut/f16040209cdc6f5e62c2 | |
### | |
'use strict' | |
hook = | |
_callbacks: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: ACF Customizer Patch | |
Plugin URI: https://gist.github.com/fabrizim/9c0f36365f20705f7f73 | |
Description: A class to allow acf widget fields to be stored with normal widget settings and allow for use in customizer. | |
Author: Mark Fabrizio | |
Version: 1.0 | |
Author URI: http://owlwatch.com/ | |
*/ | |
class acf_customizer_patch |