Skip to content

Instantly share code, notes, and snippets.

Sean Cribbs seancribbs

Block or report user

Report or block seancribbs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:77271
define :mysql_database, :action => 'create' do
def mysql(command, config=nil, )
"mysql --defaults-file=#{config} --execute=#{command.inspect}"
include_recipe "mysql::client"
# For now, use the super-user conf
case @node[:platform]
when "debian", "ubuntu"
View legacy-html.conf
<VirtualHost *:80>
View gist:85701
# Radiant additions
namespace :deploy do
task :migrate_extensions, :role => :db do
run "cd #{current_path}; rake #{rails_env} db:migrate:extensions"
task :update_extensions, :role => :db do
run "cd #{current_path}; rake #{rails_env} radiant:extensions:update_all"
View cucumber.diff
diff --git a/lib/dataset.rb b/lib/dataset.rb
index 54bd20b..5be76d5 100644
--- a/lib/dataset.rb
+++ b/lib/dataset.rb
@@ -69,7 +69,9 @@ require 'dataset/record/model'
module Dataset
def self.included(test_context) # :nodoc:
- if =~ /TestCase\Z/
+ if =~ /World\Z/
View metagrammar.peg
rules <- space? declaration_sequence space?
declaration_sequence <- head:declaration tail:(space declaration)*
declaration <- nonterminal space '<-' space parsing_expression
parsing_expression <- choice / sequence / primary
choice <- head:alternative tail:(space? '/' space? alternative)+
seancribbs / crazy-chef-recipe.erl
Created May 16, 2009
Sketch of what a Chef recipe might look like in Erlang. But it should never happen.
View crazy-chef-recipe.erl
not_if=fun() -> filelib:is_file("/usr/local/src/ruby-enterprise.tar.gz") end
name="expand REE tarball",
command="tar xzf ruby-enterprise-1.8.6-20090421.tar.gz",
View gist:113252
rm -f src/herml_scan.erl
rm -f src/herml_parse.erl
rm -f ebin/*
rm -f ebin_tests/*
erl -noshell -s init stop -eval 'leex:file("src/herml_scan.xrl", [{outdir, "src"}])'
erl -noshell -s init stop -eval 'yecc:file("src/herml_parse.yrl")'
cp src/ ebin
cd src;erl -make
Recompile: herml_scan
Recompile: herml_reader
seancribbs / sphinx_cucumber.rb
Created May 18, 2009
Runs a Sphinx search server during Cucumber features.
View sphinx_cucumber.rb
module SphinxCucumber
def start_sphinx!
ThinkingSphinx.tap do |sphinx|
# Don't show delta indexing output while running features,
# but enable deltas so we can find records we create
sphinx.deltas_enabled = true
sphinx.suppress_delta_output = true
# Build the sphinx config and start the server [cribbed from the plugin]
ThinkingSphinx::Configuration.instance.tap do |config|
View gist:115511
namespace :deploy do
task :default do
run "cd #{deploy_to} && git pull"
task :clear_cache do
# do something here to clear the cache
View gist:130453
additive <- multitive "+" additive / multitive;
multitive <- primary "*" multitive / primary;
primary <- "(" additive ")" / decimal;
decimal <- [0-9];
You can’t perform that action at this time.