This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# COWBOY CODING FTW! TESTING IS FOR WUSSIES. ;-) | |
require File.dirname(__FILE__) + '/test_helper' | |
class CowboyTest < Test::Unit::TestCase | |
def test_my_awesomeness | |
(0..12612).each { | |
assert :this_code_does_not_contain_bugs | |
} | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#================================================================================ | |
# /engineyard/bin/monit_merb_mpc | |
#================================================================================ | |
# This script controls the multi-process Merb 1.0 service | |
# | |
# Do not forget to ensure this script is executable: | |
# $ chmod a+x /engineyard/bin/monit_merb_mpc | |
#================================================================================ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#================================================================================ | |
# /engineyard/bin/monit_merb_mpc | |
#================================================================================ | |
# This script controls the multi-process Merb 1.0 service | |
# | |
# Do not forget to ensure this script is executable: | |
# $ chmod a+x /engineyard/bin/monit_merb_mpc | |
#================================================================================ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# taken from http://eigenclass.org/hiki.rb?ruby+live+process+introspection | |
################### | |
# #### RUBY STUFF | |
define eval | |
call(rb_p(rb_eval_string_protect($arg0,(int*)0))) | |
end | |
define redirect_stdout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Routing tables | |
Internet: | |
Destination Gateway Flags Refs Use Netif Expire | |
0/1 10.8.0.5 UGSc 3 0 tun0 | |
default 192.168.1.1 UGSc 10 0 en1 | |
10.8.0.1/32 10.8.0.5 UGSc 0 0 tun0 | |
10.8.0.5 10.8.0.6 UH 9 0 tun0 | |
10.37.129/24 link#8 UC 3 0 vnic1 | |
10.37.129.2 0:1c:42:0:0:9 UHLWI 2 7 lo0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( [4689]11 | *xxS0 | <:1>[2-9]xx[2-9]xxxxxxS0 | 1[2-9]xx[2-9]xxxxxxS0 | 011xxxxxxx. | [#*x][#*x][#*x][#*x]. ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'benchmark' | |
require 'yaml' | |
require 'zaml' | |
require 'json' | |
yaml_str = <<-eos | |
yaml goes here | |
eos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] | |
-------------------------------------------------------------------- | |
YAML.load: 0.7924 | |
Marshal.load: 0.0742 | |
to_yaml: 5.1661 | |
ZAML.dump: 1.4574 | |
to_json: 0.1152 | |
Marshal.dump: 0.0845 | |
ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.4.0], MBARI 0x6770, Ruby Enterprise Edition 2010.02 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fixes broken UTF8 strings as instructed at http://ruby.runpaint.org/encoding | |
def self.sanitize_string(str, request_charset=nil) | |
return str unless str.is_a?(String) | |
ic = Iconv.new('UTF-8//IGNORE', 'UTF-8') | |
dest = ic.iconv(str + ' ')[0..-2] | |
dest = encode_from_request_charset(str, request_charset) unless dest.valid_encoding? | |
dest | |
end |
OlderNewer