Skip to content

Instantly share code, notes, and snippets.

View msonnabaum's full-sized avatar

Mark Sonnabaum msonnabaum

  • Lithic
  • San Diego, CA
View GitHub Profile
#!/bin/bash
apt-get update
apt-get install -y ruby ruby-dev rubygems libopenssl-ruby
echo "gem: --bindir /usr/local/bin" >> ~/.gemrc
gem install chef
<?php
/**
* Implementation of hook_views_query_substitutions().
*/
function welcom_core_views_query_substitutions($view) {
$roles = user_roles();
$subs = array();
foreach ($roles as $rid => $role) {
@msonnabaum
msonnabaum / gist:902086
Created April 4, 2011 18:03
variable_get the word under the cursor with ,v
nnoremap ,v :execute "!drush vget ".shellescape(expand("<cword>"), 1)<CR>
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
" Janus undo-ing
" Having this on breaks highlighting text with visual mode and then hitting d
" to delete or = to indent.
unlet macvim_hig_shift_movement
" Nick wrote: Uncomment these lines to do syntax checking when you save
augroup Programming
" clear auto commands for this group
autocmd!
augroup module
autocmd BufRead *.module set filetype=php
autocmd BufRead *.install set filetype=php
autocmd BufRead *.inc set filetype=php
autocmd BufRead *.profile set filetype=php
autocmd BufRead *.test set filetype=php
augroup END
# Multistage support - see config/deploy/[STAGE].rb for specific configs
set :stages, %w(prod qa dev)
set :default_stage, "dev"
require 'capistrano/ext/multistage'
set :application, "blah"
set :user, "acquia"
set :scm, :git
ssh_options[:forward_agent] = true
#set :branch, "master"
set :domain, "qa.blah.com"
set :branch, "3.x"
role :web, "drupal01"
after "deploy:symlink", "drupal:symlink_shared"
after "deploy:symlink", "drush:updatedb"
after "deploy:symlink", "drush:features_revert_all"
after "deploy:symlink", "drush:updatedb"
after "deploy:symlink", "drush:cache_clear"
sub vcl_deliver {
# Add an X-Cache diagnostic header
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
set resp.http.X-Cache-Hits = obj.hits;
} else {
set resp.http.X-Cache = "MISS";
}
return(deliver);
}
<?php
// $Id: $
/**
* @file
* pathauto.drush.inc
*/
/**
* Implementation of hook_drush_command().
*