Public Gists by spraints

Gravatar
Fri Oct 02 09:48:29 -0700 2009
1
2
3
// ragel -A Ajp13Protocol.cs.rl
 
%%{
Gravatar
Thu Oct 01 11:40:49 -0700 2009
1
2
3
require 'albacore'
require 'rexml/document'
 
Gravatar
Wed Sep 30 13:28:01 -0700 2009
1
2
3
def printable(c)
  c.sub!(/\d/) { |d| "_#{d}" }
  {
Gravatar
Thu Aug 20 07:28:30 -0700 2009
1
2
require 'zlib'
print Zlib::GzipReader.new($<).read
gist: 158795 Ruby's inspect for .NET
Gravatar
Thu Jul 30 10:29:41 -0700 2009
1
2
3
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
Gravatar
Wed Jul 15 08:42:14 -0700 2009
1
2
3
# This is a really simple Sinatra extension to make it easy to use compass.
# Its configuration isn't all that great, but its usage is:
#
Gravatar
Wed Jun 24 07:57:02 -0700 2009
1
2
3
# Takes an OPML file from google reader and spits out a set of <li>s for
# each unique blog in the list, sorted by name, with the tags in ()s.
require 'rubygems'
Gravatar
Fri Jun 05 14:43:31 -0700 2009
1
2
3
class Thing
  # ...
 
Gravatar
Sun May 24 22:44:24 -0700 2009
1
2
3
# From http://www.indy500.com/images/news/2009/2009_Indianapolis_500_Unofficial_Box_Score.pdf
# final place, start position, name
results = <<END_RESULTS
Gravatar
Thu May 21 13:20:14 -0700 2009
1
2
3
# To run this script, you need to install ruby, rubygems, the httparty gem,
# and any of the json gems.
require 'rubygems'
gist: 103443 Finds .cs files that aren't...
Gravatar
Tue Apr 28 15:34:28 -0700 2009
1
2
3
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Verify" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="SomeProject.csproj" />
Gravatar
Tue Apr 21 07:10:00 -0700 2009
1
2
3
# feature:
# Then I should see the following records:
# |row1|thing|
Gravatar
Wed Feb 11 13:31:49 -0800 2009
1
2
3
# Use like this:
# ruby ~/src/ext/rails/railties/bin/rails APP -m ~/src/misc/mabrails.rb
 
Gravatar
Fri Dec 05 06:37:47 -0800 2008
1
2
3
def set(x)
  Thread.current[:x] = x
end
Gravatar
Thu Dec 04 13:44:49 -0800 2008
1
2
3
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# <machine> 16:44:41 (0) [master*] >>> # dirty working directory