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
@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
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 / 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" " "
@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 / 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 / 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
ctools_include('content');
dsm(ctools_get_addressable_content('page_manager::node_view::::node_view_panelizer::1::1'));
var jerk = require('jerk'),
channel = ('SWEETDUDEBOT_CHANNEL' in process.env)? process.env.SWEETDUDEBOT_CHANNEL : '#yourchannel',
options = {
server: ('SWEETDUDEBOT_SERVER' in process.env)? process.env.SWEETDUDEBOT_SERVER : 'chat.freenode.net',
nick: ('SWEETDUDEBOT_NICK' in process.env)? process.env.SWEETDUDEBOT_NICK : 'sweetdudebot',
port: ('SWEETDUDEBOT_PORT' in process.env)? process.env.SWEETDUDEBOT_PORT : '6667',
flood_protection: true,
channels: [channel]
};
@smerrill
smerrill / gist:1197979
Created September 6, 2011 16:00 — forked from johnrobertwilson/gist:1197958
Air Apache Vhost settings
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
@smerrill
smerrill / convert
Created September 5, 2011 00:06
GraphicsMagick compatibility shim for use with Drupal
#!/bin/bash
# Save this file as 'convert' and point Drupal at it at /admin/config/media/image-toolkit
[[ $1 == 'version' ]] && {
gm $1
} || {
gm convert $@
}