Skip to content

Instantly share code, notes, and snippets.

View smerrill's full-sized avatar
🤖
Attention is all you need

Steven Merrill smerrill

🤖
Attention is all you need
View GitHub Profile
ctools_include('content');
dsm(ctools_get_addressable_content('page_manager::node_view::::node_view_panelizer::1::1'));
@smerrill
smerrill / gist:1307450
Created October 23, 2011 15:02
Open vim's printed output in TextWrangler to (for example) edit the font.
set printexpr=system('open\ -a\ /Applications/TextWrangler.app\ '.v:fname_in)\ +\ v:shell_error
@smerrill
smerrill / gist:1316727
Created October 26, 2011 15:40
vagrant-tweaks.pp
class vagrant-tweaks {
group { "puppet":
ensure => present,
gid => 24,
}
user { "puppet":
ensure => present,
uid => 24,
gid => 24,
@smerrill
smerrill / start-mongo.sh
Created November 4, 2011 01:39
Fork a mongod on OS X w/ Homebrew
mongod run --config /usr/local/Cellar/mongodb/2.0.1-x86_64/mongod.conf --fork --logpath /usr/local/var/log/mongodb/mongod.log
@smerrill
smerrill / vagrant2drush.sh
Created November 23, 2011 16:27
Vagrant SSH config to drush 'ssh-options'
vagrant ssh-config | sed -n '2,$p' | sed -e "s/^ /-o'/;s/$/'/" | tr "\n" " "
include pear
# If no version number is supplied, the latest stable release will be
# installed. In this case, upgrade PEAR to 1.9.2+ so it can use
# pear.drush.org without complaint.
pear::package { "PEAR": }
pear::package { "Console_Table": }
# Version numbers are supported.
pear::package { "drush":
version => "4.5.0",
repository => "pear.drush.org",
@smerrill
smerrill / gist:1624447
Created January 17, 2012 03:31
The new Arch box clocked at 4.2 GHz and crunching 2.5 billion digits of pi.
Validation Version: 1.1
Program: y-cruncher - Gamma to the eXtReMe!!! ( www.numberworld.org )
Copyright 2008-2011 Alexander J. Yee ( a-yee@u.northwestern.edu )
User: "Username.txt" Not found.
Processor(s): Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
@smerrill
smerrill / gist:2128465
Created March 19, 2012 23:37
Sample 1.0.1 Vagrantfile w/ NFS, host-only network, Puppet provisioning
# Set up some variables relating to which path Vagrant will try to share
# with the VM.
require 'pathname'
$docroot_name = "path/to/your/docroot"
$docroot_path = ""
# Test that the directory to be shared is in the right place and if it is,
# calculate the fully dereferenced path (since NFS exports will fail if you
# try to specify the path to a symlink.)
if !File.exists?("../#{$docroot_name}") then
casper = require('casper').create({
verbose: true,
logLevel: "debug"
})
# Variables for the tests.
url = "http://georgia.gov"
breakpoints = [
[1280, 1024],
[960, 640],
class drush::files {
file { "/usr/share/pear/drush/drushrc.php":
ensure => present,
source => "puppet:///modules/drush/$environment/drushrc.php",
require => Class["drush::packages"],
}
file { "/usr/share/pear/drush/aliases.drushrc.php":
ensure => present,
source => "puppet:///modules/drush/$environment/aliases.drushrc.php",