Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
#!/usr/bin/php | |
<?php | |
// NOTE: create a folder for each metric. ./ActiveUsers and ./NewUsers and etc | |
$appMetrics = array('ActiveUsers', 'NewUsers', 'MedianSessionLength', 'AvgSessionLength', 'Sessions', 'RetainedUsers'); | |
// define your platforms as listed in Flurry | |
$platforms = array(); |
#!/bin/env python | |
""" | |
This is a test script to simulate a memcached instance on a server | |
that has gone south and is accepting connections, but generally not | |
responding. | |
The goal of this script is to help test/develop correct client | |
side settings for timeouts/failure scenarios |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
/* Solarized Dark | |
For use with Jekyll and Pygments | |
http://ethanschoonover.com/solarized | |
SOLARIZED HEX ROLE | |
--------- -------- ------------------------------------------ | |
base03 #002b36 background | |
base01 #586e75 comments / secondary content |
# -*- coding: utf-8 -*- | |
from datetime import datetime | |
import time | |
import sublime_plugin | |
class TimestampCommand(sublime_plugin.EventListener): | |
"""Expand `isoD`, `now`, `datetime`, `utcnow`, `utcdatetime`, | |
`date` and `time` |
# List Git branches in order of most-recently-updated. | |
# https://gist.github.com/tcg/381dba155117a2e7a545 | |
alias gitbranchesbydate="git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:iso8601) %09 %(refname) %09 %(authorname)' | sed -e 's-refs/heads/--'" | |
# Output looks like: | |
# 2014-06-06 12:58:53 -0500 tcg/donate_language_updates Tommy George | |
# 2014-06-06 10:28:04 -0500 integration Brad | |
# 2014-06-05 16:13:30 -0500 super_dev_branch Chris | |
# List files that SHOULD now be ignored by .gitignore, but might not yet be. | |
# Use this if you just added your .gitignore file and want to make sure that |
\n | |
============= HOST: ==========\n | |
\n | |
local_ip: %{local_ip}\n | |
local_port: %{local_port}\n | |
remote_ip: %{remote_ip}\n | |
remote_port: %{remote_port}\n | |
\n | |
======= CONNECTION: ==========\n | |
\n |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail