Skip to content

Instantly share code, notes, and snippets.

View dbspringer's full-sized avatar

Derek Springer dbspringer

View GitHub Profile
@pento
pento / commercial-client.php
Created July 2, 2013 12:29
Sample Commercial Plugin update server and client
<?php
/*
* Plugin Name: Commercial Client
* Plugin URI: http://pento.net/
* Description: A sample client plugin for showing updates for non-WordPress.org plugins
* Author: pento
* Version: 0.1
* Author URI: http://pento.net/
* License: GPL2+
*/
{
"IAB1": "Arts & Entertainment",
"IAB1-1": "Books & Literature",
"IAB1-2": "Celebrity Fan/Gossip",
"IAB1-3": "Fine Art",
"IAB1-4": "Humor",
"IAB1-5": "Movies",
"IAB1-6": "Music",
"IAB1-7": "Television",
"IAB2": "Automotive",
@markjaquith
markjaquith / plugin-deploy.sh
Created November 16, 2012 05:04 — forked from scribu/plugin-deploy.sh
Plugin deploy script
#!/bin/bash
# args
MSG=${1-'deploy from git'}
BRANCH=${2-'trunk'}
# paths
SRC_DIR=$(git rev-parse --show-toplevel)
DIR_NAME=$(basename $SRC_DIR)
DEST_DIR=~/svn/wp-plugins/$DIR_NAME/$BRANCH
@cfinke
cfinke / html-posts.php
Created October 16, 2012 14:44
Write all of the posts in a WordPress blog as HTML files
<?php
/**
* Drop this file in wp-content/mu-plugins/ (create if it doesn't exist),
* create a writable directory on your server to store the HTML, then call
* http://www.yourblog.com/?html-output-dir=/path/to/dir/you/created.
*/
function write_html_posts() {
remove_filter( 'the_content', 'wptexturize' );
@cfinke
cfinke / chrome_locales_in_firefox.js
Created December 10, 2010 18:05
A method for using Google Chrome-style locales in Firefox extensions.
var MY_EXTENSION_STRINGS = {
"strings" : {},
get : function (key, substitutions) {
if (key in this.strings) {
var bundle = this.strings[key];
var message = this.strings[key].message;
if ("placeholders" in bundle) {