This file contains 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
#!/usr/local/bin/ruby | |
require 'yaml' | |
require 'pp' | |
yaml = %~--- | |
db_drive: | |
local_drive: "F:" | |
shared_drive: "F:" | |
db_names: |
This file contains 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
Going through the Lisperati haskell tutorial (http://www.lisperati.com/haskell/ht1.html) | |
There is one page that has me stumped: http://www.lisperati.com/haskell/ht6.html | |
In particular, this line: | |
where clip g = concatMap ((uncurry $ clipTriangle i).(partition g)) t | |
Here's what I think is happening, from assorted Googling: |
This file contains 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
A ruby WTF ... | |
***************************************************************** | |
UPDATE: See http://redmine.ruby-lang.org/issues/show/1735#note-2 | |
A bug in an optimization setting does this. | |
***************************************************************** | |
irb(main):003:0* x = 0.05 |
This file contains 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
/home/james/.rvm/gems/ruby-1.8.7-p249/gems/yard-0.5.5/lib/yard/handlers/ruby/legacy/class_condition_handler.rb:46:in `parse_condition': (eval):1:in `parse_condition': compile error (SyntaxError) | |
(eval):1: syntax error, unexpected ')', expecting $end | |
defined? ::Encoding) and String.method_defined?(:force_encoding | |
^ | |
from /home/james/.rvm/gems/ruby-1.8.7-p249/gems/yard-0.5.5/lib/yard/handlers/ruby/legacy/class_condition_handler.rb:6:in `process' | |
from /home/james/.rvm/gems/ruby-1.8.7-p249/gems/yard-0.5.5/lib/yard/handlers/processor.rb:71:in `process' | |
from /home/james/.rvm/gems/ruby-1.8.7-p249/gems/yard-0.5.5/lib/yard/handlers/processor.rb:69:in `each' | |
from /home/james/.rvm/gems/ruby-1.8.7-p249/gems/yard-0.5.5/lib/yard/handlers/processor.rb:69:in `process' | |
from /home/james/.rvm/gems/ruby-1.8.7-p249/gems/yard-0.5.5/lib/yard/handlers/processor.rb:73:in `each_with_index' |
This file contains 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
[error]: Exception occurred while generating 'OpenSSL/PKey/DH.html' | |
[error]: Exception occurred while generating 'OpenSSL/PKey/EC.html' | |
[error]: Exception occurred while generating 'OpenSSL/PKey/EC/Group.html' | |
[error]: Exception occurred while generating 'OpenSSL/PKey/EC/Point.html' | |
[error]: Exception occurred while generating 'OpenSSL/PKey/DSA.html' | |
[error]: Exception occurred while generating 'OpenSSL/PKey/RSA.html' | |
[error]: Exception occurred while generating 'OpenSSL/SSL/Session.html' |
This file contains 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
ab -n500 -c10 http://www.ruby-doc.org/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking www.ruby-doc.org (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
This file contains 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
james@james11:~/data/vhosts/ruby-doc-regen-tools/ruby_source/ruby_1_9_3$ yardoc -o ydocumentation . | |
[warn]: Cannot parse `lib/mkmf.rb': bad value for range | |
[warn]: Cannot parse `lib/rdoc.rb': bad value for range | |
[warn]: Cannot parse `lib/rss/0.9.rb': bad value for range | |
[warn]: Cannot parse `lib/rss/2.0.rb': bad value for range | |
[warn]: in YARD::Handlers::Ruby::MethodHandler: Undocumentable method defined on object instance | |
[warn]: in file 'sample/test.rb':1953: | |
1953: def foo.test |
This file contains 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
def machine_name | |
`hostname` | |
end | |
puts machine_name |
This file contains 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 'open-uri' | |
def require_gist2 raw_id | |
uri = "https://gist.github.com/raw/#{raw_id}/gistfile1.txt" | |
result = open(uri, "UserAgent" => "ruby::require_gist").read | |
eval result | |
end | |
gid = '4351053/a9feffd0835737b938ba4d1c7a0b3bd0248d3c15' |
This file contains 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 "java" | |
$:.unshift "#{ENV['LEAP_SDK_HOME']}/lib/" | |
require 'LeapJava.jar' | |
import java.io.IOException | |
import java.lang.Math | |
module LeapMotion |