Skip to content

Instantly share code, notes, and snippets.

@dustincurrie
dustincurrie / gist:1262560
Created October 4, 2011 19:34
Get list of all enabled modules on a drupal site
drush sm | grep Enabled | gawk '{if (match($0,/\((.*)\)/,f)) print f[1]}' | sort
@dustincurrie
dustincurrie / install-jenkins.sh
Created February 20, 2012 22:15
Jenkins for the Drupal Quickstart: Pre-made Development Environment. Tested on Ubuntu 11.04 64bit.
#!/bin/bash
# ################################################################################ Jenkins
# README:
#
# This script will install Jenkins (a continious integration server) on port 8081
#
HELP="
@dustincurrie
dustincurrie / gist:1895573
Created February 23, 2012 22:57
Calculate size of all tables in a database
SELECT TABLE_NAME, table_rows, data_length, index_length,
round(((data_length + index_length) / 1024 / 1024),2) "Size in MB"
FROM information_schema.TABLES WHERE table_schema = "dbname";
@dustincurrie
dustincurrie / docker-rma.sh
Last active October 29, 2015 01:25
Delete all docker containers and images
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)