Skip to content

Instantly share code, notes, and snippets.

View Developer Contract Killer

Development Contract Killer

A fork of the popular open-source contract for web designers and developers by Stuff & Nonsense, reworded for developers

Between us [company name] and you [customer name]

scribu /
Created Dec 24, 2013
Set up the package index for WP-CLI
#!/usr/bin/env bash
if [ -z "$INSTALL_DIR" ]; then
mkdir -p "$INSTALL_DIR"
if [ ! -x composer.phar ]; then
davatron5000 / Sublime Text
Last active Oct 2, 2020
A new user's guide to SublimeText 2. Estimated reading time: 2 mins. Estimated workthrough time: 12 minutes.
View Sublime Text

Make it useful

  • Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( '' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.

justintadlock / register-post-type.php
Last active Oct 2, 2020
Help file when registering post types.
View register-post-type.php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
* Registers post types needed by the plugin.
* @since 1.0.0
* @access public
simonwhitaker / postcode-regex.js
Last active Dec 6, 2019
An example of using a simplified UK postcode regex in Javascript
View postcode-regex.js
var tweet = "Currently chilling out at W1B 2EL, then on to WC2E 8HA or maybe even L1 8JF! :-)";
// Here's a simple regex that tries to recognise postcode-like strings.
// See
// for the rules on how UK postcodes are formatted.
var postcode_regex = /[A-Z]{1,2}[0-9][0-9A-Z]?\s?[0-9][A-Z]{2}/g;
var postcodes = tweet.match(postcode_regex);
barneycarroll / fileInput.css
Last active Aug 19, 2020
Total input[type=file] style control with pure CSS. File type inputs are notoriously hard to style, due to different semi-serious style restrictions in the name of security (the argument being that a file input presents access to the user's private file system, and should as such always look unambiguously like what it is — redundant if you ask m…
View fileInput.css
.fileContainer {
overflow: hidden;
position: relative;
.fileContainer [type=file] {
cursor: inherit;
display: block;
font-size: 999px;
filter: alpha(opacity=0);
bueltge / keep_me_logged_in_for_1_year.php
Last active Dec 8, 2017
WordPress Plugin, that set the time that the cookie will be kept at 1 year and active the 'Rember Me' Checkbox for default
View keep_me_logged_in_for_1_year.php
* Plugin Name: Keep me Logged In for 1 Year
* Plugin URI:
* Description: Set the time that the cookie will be kept at 1 year.
* Version: 0.0.2
* Author: Frank Bültge
* Author URI:
View transition_sniffing.js
function whichTransitionEvent(){
var t;
var el = document.createElement('fakeelement');
var transitions = {
bueltge / attachment-taxononimies.php
Created Dec 6, 2012
WordPress Attachment Taxonomies with WP 3.5*
View attachment-taxononimies.php
* Plugin Name: Attachment Taxonomies
* Plugin URI: attachment_taxonomies
* Text Domain: addquicktag
* Domain Path: /languages
* Description:
* Version: 1.0.0
* Author: Frank Bültge
* Author URI:
Raysharr / better_setInterval.js
Created Oct 18, 2012
Paul Irish's better setInterval
View better_setInterval.js
/* From Paul Irish */
/* instead of */
setInterval(function(){ doStuff(); },100);
/* use anonymous self-executing function */
(function thisismyfunctionuniquename(){
You can’t perform that action at this time.