Public Gists by seancribbs

Gravatar
Wed Nov 25 17:53:15 -0800 2009
1
2
app/views/home/show.html.haml:61: syntax error, unexpected kENSURE, expecting kEND
app/views/home/show.html.haml:63: syntax error, unexpected $end, expecting kEND
Gravatar
Tue Nov 24 06:30:11 -0800 2009
1
2
3
<p><strong>J.D. Lafrance</strong><br /><script type="text/javascript">
<script type="text/javascript"><br />
&lt;![<span class="caps">CDATA</span>[</p>
Gravatar
Fri Nov 13 07:49:42 -0800 2009
1
2
3
alias ga='git add'
alias gb='git branch'
alias gci='git commit'
gist: 216992 A simple way to load your C...
Gravatar
Fri Oct 23 08:47:12 -0700 2009
1
2
3
# CouchApp is busted. Let's do it ourselves.
module CouchRest
  class Design < Document
Gravatar
Fri Oct 16 11:41:53 -0700 2009
1
2
3
insert (small, no index)....................................6776
insert (medium, no index)...................................1459
insert (large, no index)....................................1038
Gravatar
Fri Oct 16 08:12:50 -0700 2009
1
2
3
The C oid generation uses bare C types and casting to get around the pack/unpack inefficiencies.
Here's 100_000.times { Mongo::ObjectID.new } with each algorithm (using Benchmark.bmbm).
 
Gravatar
Thu Oct 15 09:53:21 -0700 2009
1
2
3
# After Array#pack optimizations
 
insert (small, no index)....................................7398
Gravatar
Wed Oct 14 18:37:02 -0700 2009
1
2
3
require 'benchmark'
require 'rubygems'
require 'mongo'
Gravatar
Thu Sep 10 06:47:15 -0700 2009
1
2
3
result = Spreedly.post("/subscribers.xml", :body => "<subscriber><screen-name></screen-name><customer-id>1</customer-id><email></email></subscriber>")
=> {}
>> result.code
Gravatar
Fri Sep 04 15:48:16 -0700 2009
1
2
3
  def timezone=(value)
    # Normalizes TZInfo names into their Rails equivalents
    Time.use_zone(value) do
Gravatar
Fri Sep 04 10:02:44 -0700 2009
1
2
3
# From webrat/selenium/application_servers/base.rb
TCPSocket.wait_for_service_with_timeout \
              :host => "0.0.0.0",
Gravatar
Wed Jul 22 19:03:56 -0700 2009
1
2
3
require 'digest/md5'
 
# A little HTTP Digest authentication calculator, based on the C code in RFC2617
gist: 134930 Definition and library for ...
Gravatar
Tue Jun 23 17:11:27 -0700 2009
1
2
3
module Autoconf
  extend self
 
Gravatar
Tue Jun 16 06:12:29 -0700 2009
1
2
3
1> Parse = fun(File) ->
1> {ok, Bin} = file:read_file(File),
1> metagrammar:parse(binary_to_list(Bin))
Gravatar
Mon Jun 15 17:46:36 -0700 2009
1
2
3
additive <- multitive "+" additive / multitive;
multitive <- primary "*" multitive / primary;
primary <- "(" additive ")" / decimal;
Gravatar
Thu May 21 08:13:39 -0700 2009
1
2
3
namespace :deploy do
  task :default do
    run "cd #{deploy_to} && git pull"
gist: 113549 Runs a Sphinx search server...
Gravatar
Mon May 18 08:24:35 -0700 2009
1
2
3
module SphinxCucumber
  def start_sphinx!
    ThinkingSphinx.tap do |sphinx|
Gravatar
Sun May 17 18:01:50 -0700 2009
1
2
3
rm -f src/herml_scan.erl
rm -f src/herml_parse.erl
rm -f ebin/*
gist: 112545 Sketch of what a Chef recip...
Gravatar
Fri May 15 19:34:20 -0700 2009
1
2
3
#remote_file{
  name="/usr/local/src/ruby-enterprise-1.8.6-20090421.tar.gz",
  url="http://rubyforge.org/frs/download.php/55511/ruby-enterprise-1.8.6-20090421.tar.gz",
Gravatar
Sat May 09 18:40:59 -0700 2009
1
2
3
rules <- space? declaration_sequence space?
 
declaration_sequence <- head:declaration tail:(space declaration)*