Skip to content

Instantly share code, notes, and snippets.

@mpgeek
mpgeek / gist:df30d2a36019e004b5bc
Last active August 29, 2015 14:04
Dynamic drush aliases
<?php
$directories = glob('/var/www/dev/*');
foreach ($directories as $directory) {
$name = array_pop(explode('/', $directory));
$aliases[$name] = array(
'uri' => "http://$name.dev",
'root' => $directory,
);
@mpgeek
mpgeek / rebuild-specific.drush
Created March 27, 2014 23:19
Build specific project or library from a project makefile.
cd $PROJECT_ROOT/$PROFILE
# rebuild project
drush make --contrib-destination=. --no-core -y --projects=$PROJECT_LIST ./$PROFILE.make
# rebuild library
drush make --contrib-destination=. --no-core -y --libraries=$LIBRARY_LIST ./$PROFILE.make
# ${PROJECT|LIBRARY}_LIST can be comma-separated for multiples.
@mpgeek
mpgeek / environment-indicator.settings
Last active August 29, 2015 13:57
Environment Indicator Overrides in settings.php
$conf['environment_indicator_overwrite'] = TRUE;
$conf['environment_indicator_overwritten_name'] = 'LOCAL DEV';
$conf['environment_indicator_overwritten_color'] = '#336633';
$conf['environment_indicator_overwritten_position'] = 'top';
@mpgeek
mpgeek / map.make
Last active December 29, 2015 00:10
Drush make file for large-scale mapping with server side clustering via the geocluster stack and leaflet for display.
; Large-scale mapping build spec.
;; GeoPHP
libraries[geoPHP][download][type] = "git"
libraries[geoPHP][download][url] = "https://github.com/phayes/geoPHP.git"
libraries[geoPHP][download][revision] = "0aae7c3"
projects[geophp][version] = "1.7"
;; Geocoder