This file contains 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 is a monit configuration file that watches a 'git.log' file | |
# which should be a 777 file inside your WordPress | |
check file observable_file with path /home/webmaster/www/domain.com/git.log | |
if changed checksum then exec "/usr/local/sbin/observable_file.sh" | |
This file contains 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 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 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 these filters in functions.php | |
add_filter( 'meta_content', 'wptexturize' ); | |
add_filter( 'meta_content', 'convert_smilies' ); | |
add_filter( 'meta_content', 'convert_chars' ); | |
add_filter( 'meta_content', 'wpautop' ); | |
add_filter( 'meta_content', 'shortcode_unautop' ); | |
add_filter( 'meta_content', 'prepend_attachment' ); | |
This file contains 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
var crypto = require("crypto"); | |
var SECRET_KEY = 'MY_AWS_SECRET_KEY'; | |
var POLICY_JSON = { | |
"expiration": "2030-12-01T12:00:00.000Z", | |
"conditions": [ | |
{"bucket": "my-bucket-name"}, | |
["starts-with", "$key", ""], | |
{"acl": "public-read"}, | |
["starts-with", "$Content-Type", ""], |
This file contains 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
#!/usr/bin/env python | |
import os | |
import sys | |
from jinja2 import Environment, FileSystemLoader | |
def set_environment(template_dir): | |
env = Environment(loader=FileSystemLoader(template_dir), trim_blocks=True) | |
env.globals['env_var'] = lambda varname, default='': os.getenv(varname, default) | |
env.globals['exists'] = lambda varname: varname in os.environ |
This file contains 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
# description: An xinetd service to show PSQL status | |
# put this file into /etc/xinetd.d | |
service postgrescheck | |
{ | |
type = UNLISTED | |
flags = REUSE | |
wait = no | |
disable = no | |
socket_type = stream | |
protocol = tcp |
This file contains 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 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
import fs from 'fs'; | |
import path, { resolve } from 'path'; | |
import assert from 'assert'; | |
import Module from 'module'; | |
import jsdom from 'jsdom'; | |
import Mocha from 'mocha'; | |
import chokidar from 'chokidar'; | |
// Let's import and globalize testing tools so | |
// there's no need to require them in each test |
This file contains 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
kind: Endpoints | |
apiVersion: v1 | |
metadata: | |
name: glusterfs | |
subsets: | |
- addresses: | |
# Change the following to match your GlusterFS instance IPs | |
- ip: 10.132.0.5 | |
- ip: 10.132.0.6 | |
ports: |
OlderNewer