Skip to content

Instantly share code, notes, and snippets.

@tlattimore
tlattimore / DrushCoder.sublime-build
Created August 26, 2014 16:11
Sublime Text 3 Coder Review
{
"shell_cmd": "drush coder --minor $file",
"path": "/Users/tlattimore/.composer/vendor/bin" // I can't figure out another way to add Drush to ST3's path.
}
@tlattimore
tlattimore / 0_reuse_code.js
Created January 22, 2014 02:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tlattimore
tlattimore / TddTests.php
Created December 11, 2013 20:35
PHPUnit in Drupal 7
<?php
// We assume that this script is being executed from the root of the Drupal
// installation. e.g. ~$ `phpunit TddTests sites/all/modules/tdd/TddTests.php`.
// These constants and variables are needed for the bootstrap process.
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@tlattimore
tlattimore / brew install irssi
Created September 15, 2013 10:43
404 on brew install irssi
> brew -v install irssi !5877
Homebrew 0.9.4
==> Installing dependencies for irssi: glib
==> Installing irssi dependency: glib
==> Downloading http://ftp.gnome.org/pub/gnome/sources/glib/2.36/glib-2.36.4.tar.xz
Already downloaded: /Library/Caches/Homebrew/glib-2.36.4.tar.xz
/usr/local/opt/xz/bin/xz -dc "/Library/Caches/Homebrew/glib-2.36.4.tar.xz" | tar xf -
==> Downloading patches
/usr/bin/curl -f#LA Homebrew 0.9.4 (Ruby 1.8.7-358; Mac OS X 10.8.4) https://raw.github.com/gist/5393707/5a9047ab7838709084b36242a44471b02d036386/glib-configurable-paths.patch -o 000-homebrew.diff
=== 8.x..8.x compared (519c01fb1d090..519c0332d52ab):
ct : 97,297|97,297|0|0.0%
wt : 646,787|644,840|-1,947|-0.3%
cpu : 620,231|619,154|-1,077|-0.2%
mu : 57,638,288|57,715,496|77,208|0.1%
pmu : 57,803,112|57,889,016|85,904|0.1%
<a href="http://eight.site/xhprof-kit/xhprof/xhprof_html/index.php?source=drupal-perf&url=%2F&run1=519c01fb1d090&run2=519c0332d52ab&extra=8.x..8.x">Profiler output</a>
@tlattimore
tlattimore / gist:3822503
Created October 2, 2012 18:59
twig_engine error
User error: "0" is an invalid render array key in element_children() (line 6251 of core/includes/common.inc).
User error: "lang" is an invalid render array key in element_children() (line 6251 of core/includes/common.inc).
User error: "about" is an invalid render array key in element_children() (line 6251 of core/includes/common.inc).
User error: "0" is an invalid render array key in element_children() (line 6251 of core/includes/common.inc).
User error: "0" is an invalid render array key in element_children() (line 6251 of core/includes/common.inc).
[aegir@bender ~]$ more .drush/appstate.drush.inc
<?php
function appstate_provision_apache_vhost_config($uri, $data) { return array(
" # rewrites /sites/default/files to the new url",
" <IfModule mod_rewrite.c>",
" RewriteEngine On",
" RewriteRule ^/sites/default/files(/.*)$ sites/" . $uri . "/files$1 [R,L]",
" </IfModule>",
);
}
@tlattimore
tlattimore / order.txt
Created June 12, 2012 15:09 — forked from bigfleet/order.txt
Jimmy John's order
http://www.jimmyjohns.com/menu/menu.aspx
Thomas Lattimore: Turkey Tom
Scott Dieter: #5, no tomato
Mark Shropshire: JJBLT
Denny Abraham: #9 with hot peppers
Kevin Mussleman:
Glenn Goodrich: #12 without tomato
Duncan Mapes: #14
Nils: #12