Skip to content

Instantly share code, notes, and snippets.

@lumpysimon
lumpysimon / wp-disable-rest.php
Created November 26, 2015 22:44
Completely disable WordPress REST API
add_filter( 'rest_enabled', '_return_false' );
add_filter( 'rest_jsonp_enabled', '_return_false' );
@leylaso
leylaso / pad.js
Created March 28, 2012 04:18
custom pad.js file for etherpad-lite allows setting author names as line numbers
/**
* @file
* This file is an example of ways to modify etherpad-lite behaviour from the
* static/custom/pad.js file generated by etherpad-lite on first run.
*/
var edBod = [];
var lastLine = 0;
/**
@trshafer
trshafer / gist:519251
Created August 11, 2010 16:24
git ps1
# GIT PS1
# COLORS
LIGHT_GRAY="\[\033[0;37m\]"; BLUE="\[\033[0;34m\]"; RED="\[\033[0;31m\]"; LIGHT_RED="\[\033[1;31m\]";
GREEN="\[\033[0;32m\]"; WHITE="\[\033[1;37m\]"; LIGHT_GRAY="\[\033[0;37m\]"; YELLOW="\[\033[1;33m\]";
BROWN="\[\033[0;33m\]"; BLACK="\[\033[0;30m\]";PURPLE="\[\033[0;35m\]";CYAN="\[\033[0;36m\]";
# GIT PROMPT (http://gist.github.com/120804)
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \(\1\)/';
}
function parse_git_status {