Skip to content

Instantly share code, notes, and snippets.

@johnbillion
johnbillion / gist:11369697
Created April 28, 2014 11:58
zzmag contributors
@johnbillion: 14
@negatendo: 7
@karlfreeman: 5
@torrez: 5
@notch: 2
@boonych: 2
@mikesten: 1
@cityofprogress: 1
@darrenux: 1
@jansru: 1
@johnbillion
johnbillion / install-popular-themes.sh
Last active February 27, 2017 14:59
Install all the "Popular" themes from WordPress.org using wp-cli and jq
@johnbillion
johnbillion / install-all-languages.sh
Created February 18, 2017 20:12
Install all available languages on a WordPress site with WP-CLI
wp core language list --field=language | xargs -n 1 wp core language install
@johnbillion
johnbillion / plugin.php
Last active November 20, 2017 22:05 — forked from joncave/plugin.php
First pass at removing the vulnerabilities from this plugin. Untested. *bites nails*
<?php
/* Plugin Name: Damn Vulnerable WordPress Plugin
* Description: Intentionally vulnerable plugin for plugin author education
* Version: 0.1
* Plugin URI: http://make.wordpress.org/plugins/2013/04/09/intentionally-vulnerable-plugin/
* Author: Jon Cave
* Author URI: http://joncave.co.uk
* License: GPLv2+
*
* DO NOT RUN THIS PLUGIN ON AN INTERNET ACCESSIBLE SITE
@johnbillion
johnbillion / gist:5225514
Last active May 29, 2019 12:56
Post Meta Revisions
<?php
/*
Plugin Name: Post Meta Revisions
Description: Revisions for the 'foo' post meta field
Version: 1.0
Author: John Blackbourn
Plugin URI: http://lud.icro.us/post-meta-revisions-wordpress
*/
#!/bin/bash
REV=$1
svn up --ignore-externals . > /dev/null
svn merge -c$REV ../../trunk .
LOG=$(svn log -r$REV ../../trunk | grep -v '\-------' | tail -n +3)
BRANCH=$(basename $(pwd))
echo -en "$LOG\n\nMerges [$REV] to the $BRANCH branch." | pbcopy
echo ""
pbpaste
@johnbillion
johnbillion / install-debug-bar-extensions.sh
Last active September 18, 2019 02:35
Use WP-CLI to install a load of Debug Bar extensions (which work with Query Monitor too) in one go
# wp-cli: http://wp-cli.org/
wp plugin search debug-bar --field=slug --format=csv --per-page=50 \
| grep -F 'debug-bar-' \
| xargs -n 1 wp plugin install
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
atomic-blocks
caxton
coming-soon-blocks
cosmic-blocks
drop-shadow-boxes
ecwid-shopping-cart
editor-blocks
elegant-blocks
embedpress
enhanced-blocks
@johnbillion
johnbillion / gist:0c75d86169373041259f8af802ec06a6
Created July 21, 2020 22:23
BMW E39 M5 (MSS52) INPA error codes
1 Fuel Pump Relay
2 Idle Speed Actuator- Closing Coil
3 Fuel Injector Cyl 1
4 Fuel Injector Cyl 3
5 Fuel Injector Cyl 2
7 Intake Cam Position Sensor Bank 1
8 Intake Cam Position Sensor Bank 2
9 Knock Sensor- Cyl 1-2
10 Exhaust Cam Position Sensor Bank 1