Between me: [my name]
and you: [customer name]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# @file | |
# Untested: use at your own risk! | |
# Entity type, bundle name, field name. | |
# Different entity types are currently unsupported (will always use "node"). | |
IFS='.' read -r -a from <<< "$1" | |
IFS='.' read -r -a to <<< "$2" | |
# Support Linux & OSX < 10.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Usage: copy_with_dirs.py <file> [file] [...] | |
# OR ... | xargs -d '\n' /tmp/copy_with_dirs.py | |
import shutil | |
import urllib | |
import sys | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Parse a markdown contract and replace selected [tokens] with custom values. | |
Define some custom tokens and default values in a file ~/.contract-builder.yml, | |
but permit command-line overrides. | |
Example usage: | |
contract-builder.py < my_contract_template.md > contract_for_ann.md --customer-name "Ann Other" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Country flags on icons | |
for i in uk us au; do composite -geometry wxh+top+left $i.png original-icon.png icon-$i.png; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
[default] Running Puppet with /tmp/vagrant-puppet/manifests/bootstrap.pp... | |
stdin: is not a tty | |
err: /Stage[main]//Node[default]/Package[puppet]/ensure: change from purged to latest failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install puppet' returned 100: Reading package lists... | |
Building dependency tree... | |
Reading state information... | |
The following extra packages will be installed: | |
augeas-lenses debconf-utils facter libaugeas-ruby1.8 libaugeas0 libreadline5 | |
libruby libruby1.8 libshadow-ruby1.8 puppet-common ruby ruby1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Via rjmackay | |
# Add git ps1 $(__git_ps1 " (%s)") | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[0;33m\]$(__git_ps1 " (%s)")\[\033[00m\]\$ ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1 " (%s)")\$ ' | |
fi | |
force_color_prompt=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MySQL does not implement raising exceptions within triggers. Here's a hacky model for doing so. | |
-- This permits unwanted conditions to bubble up to the application layer, to be dealt with | |
-- Only use this during debugging. Don't rely on this in production code as it's a hack. | |
DELIMITER $$ | |
-- Procedure guaranteed to raise an exception | |
CREATE PROCEDURE die_horribly() SQL SECURITY INVOKER DETERMINISTIC | |
BEGIN | |
INSERT INTO does_not_exist (nid) VALUES (NULL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Search all Drupal database tables for a string | |
* Uses simple concat(), so could | |
* (a) have false positives through concat or | |
* (b) have false negatives through TEXT trimming | |
*/ | |
require_once './includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See the following for references: | |
# * http://www.metacircus.com/hacking/2011/02/18/play-git-like-a-violin.html | |
# * http://cheat.errtheblog.com/s/git/ | |
# * http://pyrtsa.posterous.com/aligning-your-git-logs | |
# * http://blog.apiaxle.com/post/handy-git-tips-to-stop-you-getting-fired/ | |
# Git >v1.7.10 lets you include external files | |
# Put your user configuration in here, so it never | |
# accidentally gets checked in | |
[include] |
NewerOlder