Skip to content

Instantly share code, notes, and snippets.

View doctorallen's full-sized avatar

David Allen doctorallen

View GitHub Profile
@doctorallen
doctorallen / deploy.sh
Last active January 12, 2016 15:27
Simple git deployment helper script
#!/usr/bin/env bash
if [ -r ./.deploy ]; then
echo "Reading config" >&2
. ./.deploy
fi
production=false
while getopts h:b:d:p opt; do
case $opt in
@doctorallen
doctorallen / updatenooverride.class.php
Created March 25, 2016 15:54
Override Processor for MODX and ImportX
<?php
require_once (dirname(__FILE__).'/update.class.php');
/**
*
* @param $data A JSON array of data to update from.
*
* @package modx
* @subpackage processors.resource
*/
class modResourceUpdateNoOverrideProcessor extends modResourceUpdateProcessor {
@doctorallen
doctorallen / gitarchive.sh
Created August 24, 2017 14:15
Clones a Git repository with all tags and branches, and archives it as a .tar.gz file.
#!/usr/bin/env bash
# Takes one parameter: a remote git repository URL.
#
# This is the stuff this script does:
#
# 1. Clones the repository
# 2. Fetches all remote branches
# 3. Compresses the folder
# 4. Deletes the cloned folder.