Skip to content

Instantly share code, notes, and snippets.

@webbj74
webbj74 / webbj74.pp
Last active January 2, 2016 23:19
Personal Boxen manifest
# Personal Boxen Manifest
# File: /opt/boxen/repo/modules/people/manifests/webbj74.pp
#
# Requires the following added to Puppetfile:
#
# github "adium", "1.3.0"
# github "autoconf", "1.0.0"
# github "chrome", "1.1.2"
# github "fitbit", "1.0.0.9.1", :repo => "webbj74/puppet-fitbit"
# github "iterm2", "1.0.4"
@webbj74
webbj74 / gist:6911428
Created October 10, 2013 01:11
Devel 6.x-1.27's mail wrapper
// Devel 6.x-1.27's mail wrapper
// $conf['smtp_library'] is set to path/to/devel.module
// Only define our mail wrapper if the devel module is the current mail
// wrapper.
if (variable_get('smtp_library', '') == drupal_get_filename('module', 'devel')) {
/**
* Log the mails sent out instead of mailing.
*/
function drupal_mail_wrapper($message) {
@webbj74
webbj74 / pubkey.txt
Last active December 19, 2015 23:29
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCyDCrrH+6VK5y21HxjvrstSnk0p2mdVmQg3rVjbx8/0vb/qPKC8TLM9fFCco0kVaUoojgjfgtaaMVTpOWrlJixtbQ//ItcRRehT3rkXfi/KPIbbq5kI+B2rk9+Hp2licXsWBlFy+fZYocjuTUpB+15jS4zjYrrnVkj18TFBqMXG2NXnIfwkWs3wL8bhlK/f1VP2cRcIKVQpzDmihAxossQw80bdkpZ16aZtfr8yodC2QfWSjqH54C6Ih8L07pYYloeY8sDfdPrm58FMYdW7fFdC0A4sguwC/NVpwVKUoZ8u/di0be6QJFp66/GHnixHRRGyqoxSQNCxmbPtVjnkr3FhPxi3BOvVlnr9WKgKZ/JSfUbOSNn0XXkwUhfJFXCmWHnnE/SvOeNw0HWnx8lDbTUtamashK8BLA7AqyDBKI8MaRw4P1LmKXVQNlDSDVSE38D+3FDQmiMlyJb6D0WfwR6XypgJEuOkBgUyDVYj4DjVdxruFbr0U6fqVkPT22D9f0AAEnGxJC8uU+J5Mnzu1cRsSSasjVdaYnSasuYpgzvcimJkKHAa+sS3HPnD2oIzzNSmK6Fw3TY1+KM/ldxWUorMT+YL4X8SNpGPgFvSNbISLr1N+hac/KUVbDzV51cHMlazsuhXUeg5j9aceCaGMBn3XhecNYg4xayWgkQTVOINw== jwebb
@webbj74
webbj74 / gist:5587486
Created May 15, 2013 21:18
Acquia Memcache Stats to CSV
MCINTERVAL=5; HOSTSHORT=`hostname -s`; MCHEADER=`(echo stats; sleep 0.5) | nc -w1 ${HOSTSHORT} 11211 | tr -d "\r\n"`; echo "host,${MCHEADER}" | sed -e 's/STAT \([a-z_]\+\) [0-9.]\+/\1,/g;s/,END//'; while [ 1 = 1 ]; do MCSTATS=`(echo stats; sleep ${MCINTERVAL}) | nc -w1 ${HOSTSHORT} 11211 | tr -d "\r\n"`; echo "${HOSTSHORT}${MCSTATS}" | sed -e 's/STAT [a-z_]\+ /,/g;s/END$//'; done | tee -a /mnt/tmp/sitename/memcache-logs.csv
@webbj74
webbj74 / drupal-quick-dump.sh
Last active October 29, 2023 10:10
Script to dump Drupal database structure, but exclude data from massive/unneeded tables.
#!/bin/bash
# usage: drupal-quick-dump user host database
USER="$1"
HOST="$2"
DB="$3"
DATE=`date +%Y%m%d`
# Get User Password
echo "Please provide the password for ${USER} on db ${DB} hosted at ${HOST}:"
@webbj74
webbj74 / CHEATSHEET.md
Created September 26, 2012 14:54
Generic Git Cheatsheet

Git Cheatsheet

Add an upstream remote repo

git remote add <name> <url>
git remote add upstream git@github.com:central-github-repo-username/sitename.git
@webbj74
webbj74 / default-site-redirect.settings.php
Created April 12, 2012 00:42
Drupal Default Site Redirection Template
<?php
/**
* Redirection rules for default Drupal site
*
* This drop-in for the default site's settings.php provides HTTP 301
* redirection rules for any request which does not already have a Drupal
* site folder assigned. Redirect rules are located in the global
* default_redirect array.
*
@webbj74
webbj74 / gist:1416891
Created December 1, 2011 13:55
Acquia Cloud - SVN Repository Layout (Text Expander Snippet)
Overall Repository Organization
This is your base repository URL:
%fill:repo_url%
Under this path you have three folders to organize your repository:
%fill:repo_url%/trunk
%fill:repo_url%/tags
%fill:repo_url%/branches