Skip to content

Instantly share code, notes, and snippets.

View shrop's full-sized avatar
👋

Mark Shropshire shrop

👋
View GitHub Profile
@shrop
shrop / XML Header
Created December 9, 2010 01:41
Header for printing XML with PHP
<?php
header('Content-Type: text/xml');
print '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
?>
@shrop
shrop / gist:809555
Created February 3, 2011 14:46
Example aliases.drushrc.php file
<?php
// site.com aliases
$aliases['dev'] = array(
'uri' => 'dev.site.com',
'root' => '/var/www/dev',
);
$aliases['test'] = array(
'uri' => 'test.site.com',
'root' => '/var/www/test',
@shrop
shrop / .gitconfig
Created April 13, 2011 14:27 — forked from rfay/.gitconfig
# Put this in your .gitconfig
[url "http://git.drupal.org/project/"]
insteadOf = "contrib:"
@shrop
shrop / cod6.make
Created June 4, 2011 21:04
Drush Make file for COD 6.x-1.0-alpha3
api = 2
core = 6.x
projects[] = drupal
projects[cod][download][type] = "git"
projects[cod][download][revision] = "6.x-1.0-alpha3"
projects[cod][download][url] = "git://git.drupal.org/project/cod.git"
@shrop
shrop / gist:1012142
Created June 7, 2011 12:30
Aegir builds/platform naming standards

Builds

  • Builds (Make files, profiles and other support files for building a fully functional Drupal file structure), are stored in /var/aegir/builds on suarit01linux. Builds create platforms in Aegir.
  • Builds should be checked out from git repos so they are easily updated

Platforms

  • Platforms are fully functional Drupal file structures which become multisites for one or many web sites in Aegir.
  • Platforms are stored in /var/aegir/platforms on suarit01linux.

Naming Standards

  • Builds in /var/aegir/builds/ should be named lowercase and separated by hyphens. The name should be short and descriptive (ex: /var/aegir/d7-sandbox/d7-sandbox.make).
@shrop
shrop / gist:1014387
Created June 8, 2011 13:10
Rule to archive campus events 6 hours after the start date/time
array (
'rules' =>
array (
'rules_archive_events_rule' =>
array (
'#type' => 'rule',
'#set' => 'rules_archive_events_rule_set',
'#label' => 'Change workflow state to archived',
'#active' => 1,
'#weight' => '0',
@shrop
shrop / gist:1024851
Created June 14, 2011 13:05
Remove .svn folders
find . -name ".svn" -exec rm -rf {} \;
@shrop
shrop / Use drush to disable all non-core modules.sh
Created December 8, 2011 19:25
Use drush to disable all non-core modules
drush pml --no-core --type=module --status=enabled --pipe | xargs drush -y dis
@shrop
shrop / suar.drush.inc
Created December 19, 2011 15:24
Aegir function to redirect a path
<?php
function suar_provision_apache_vhost_config($uri, $data) {
return "Redirect /evaltrak http://suarit.uncc.edu";
}
?>
@shrop
shrop / pressflow6-git-checkout-drush-make.make
Created February 2, 2012 16:38
Check out Pressflow via a specific git commit. For use in a Drush Make file.
; Pressflow for core
; ------------------
projects[pressflow][type] = core
projects[pressflow][download][type] = git
projects[pressflow][download][url] = git://github.com/pressflow/6.git
projects[pressflow][download][revision] = 88ac16e6253dcdc713e036fa6336607995182bad