Public Gists by ntalbott

Gravatar
Wed Sep 02 01:55:43 -0700 2009
1
2
3
--- old/scripts/mysqld_safe.sh 2009-09-02 04:10:39.000000000 -0400
+++ new/scripts/mysqld_safe.sh 2009-09-02 04:52:55.000000000 -0400
@@ -383,7 +383,7 @@
Gravatar
Tue Mar 17 21:27:20 -0700 2009
1
2
3
ntalbott@joshua:~/git/spreedly-gem$ rake
(in /Users/ntalbott/git/spreedly-gem)
/opt/local/bin/ruby -w -Ilib:ext:bin:test -e 'require "rubygems"; require "test/unit"; require "test/spreedly_gem_test.rb"'
Gravatar
Thu Feb 19 16:26:31 -0800 2009
1
2
3
#!/usr/bin/env ruby
 
command = '/usr/bin/passenger-memory-stats'
Gravatar
Fri Jan 23 13:51:20 -0800 2009
1
2
3
# Copyright 2009 Michael Ivey, released to public domain
# Disqus guts lifted from http://github.com/squeejee/disqus-sinatra-importer/tree/master
# I wanted it to run from MySQL and command line, instead of a Sinatra app
Gravatar
Tue Dec 16 14:11:23 -0800 2008
1
2
3
def parse_headers
  request = "GET /remote/path/img.gif HTTP/1.1\r\nAccept-Language: en-us,en;q=0.5\r\nCache-Control: max-age=0\r\nIf-None-Match: \"58dc30c-216-3d878fe2\"-gzip\r\nX-Forwarded-For: 127.0.0.1\r\nAccept: image/png,image/*;q=0.8,*/*;q=0.5\r\nConnection: Keep-Alive\r\nX-Forwarded-Server: www.example.com\r\nAccept-Encoding: gzip,deflate\r\nUser-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4\r\nCookie: cookie1=YWJj; cookie2=ZGVm\r\nReferer: http://www.example.com/posts/\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nHost: localhost:4001\r\nX-Forwarded-Host: www.example.com\r\nIf-Modified-Since: Tue, 17 Sep 2002 20:26:10 GMT\r\n\r\n"
  request.split("\r\n")[1..-1].inject({}) do |h,e|
Gravatar
Thu Dec 11 12:17:19 -0800 2008
1
2
3
def manager(&lam)
  SNMP::Manager.open(@manager_config, &lam)
end
Gravatar
Sat Aug 09 11:40:29 -0700 2008
1
2
3
class WeatherBot
  def name; self.class.name; end
  def play(last=nil)