Public Gists by defunkt

Gravatar
Tue Oct 20 19:16:06 -0700 2009
1
$woot->print();
Gravatar
Fri Oct 16 14:01:05 -0700 2009
1
2
3
require 'rubygems'
require 'typhoeus'
require 'yajl/json_gem'
Gravatar
Thu Oct 15 19:43:55 -0700 2009
1
2
3
public static V GetValueOrDefault<K, V>(this Dictionary<K, V> dic, K key, V defaultVal)
{
    V ret;
Gravatar
Thu Oct 15 17:45:07 -0700 2009
1
2
3
# Used to graph results from autobench
#
# Usage: ruby autobench_grapher.rb result_from_autobench.tsv
Gravatar
Wed Oct 14 19:05:20 -0700 2009

      
Gravatar
Wed Oct 14 10:04:36 -0700 2009

      
Gravatar
Tue Oct 13 11:21:36 -0700 2009
1
2
3
yui3-571
yui3-309
yui3-1405
Gravatar
Tue Oct 13 11:21:19 -0700 2009
1
2
3
require 'version_sorter'
require 'test/unit'
 
Gravatar
Mon Oct 12 11:03:06 -0700 2009
1
2
3
# This will ride alongside god and kill any rogue memory-greedy
# processes. Their sacrifice is for the greater good.
 
Gravatar
Mon Oct 12 10:57:02 -0700 2009
1
2
3
# http://unicorn.bogomips.org/SIGNALS.html
 
rails_env = ENV['RAILS_ENV'] || 'production'
Gravatar
Mon Oct 12 10:18:35 -0700 2009
1
2
3
Sinatra+Mustache Partial Madness
================================
 
Gravatar
Fri Oct 09 14:13:24 -0700 2009
1
2
3
setup_socket
fork {
  accept_connection
Gravatar
Fri Oct 09 11:56:50 -0700 2009
1
2
3
# unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D
 
rails_env = ENV['RAILS_ENV'] || 'production'
Gravatar
Fri Oct 09 11:17:37 -0700 2009
1
2
3
# port 3000 is haproxy
upstream github {
    server 127.0.0.1:3000;
Gravatar
Thu Oct 08 10:04:24 -0700 2009

      
gist: 204222 ERB and Mustache side-by-side
Gravatar
Wed Oct 07 10:08:13 -0700 2009
1
2
3
<h1><%= header %></h1>
<% if not item.empty? %>
  <ul>
Gravatar
Wed Oct 07 01:26:28 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
`git shortlog -s -n --no-merges`.split("\n").each do |person|
Gravatar
Mon Oct 05 11:07:31 -0700 2009
1
2
def hello():
  print "hello world!"
Gravatar
Mon Oct 05 10:35:41 -0700 2009
1
2
3
$ COUNT=100000 ruby benchmarks/speed.rb
Rehearsal ---------------------------------------------------
ERB w/o caching 86.080000 0.790000 86.870000 (104.722846)
Gravatar
Sun Oct 04 12:30:16 -0700 2009
1
2
3
desc "Build sdoc documentation"
task :doc do
  File.open('README.html', 'w') do |f|