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
diff --git a/lib/spring/application.rb b/lib/spring/application.rb | |
index 6e241a8..c726a24 100644 | |
--- a/lib/spring/application.rb | |
+++ b/lib/spring/application.rb | |
@@ -20,11 +20,11 @@ module Spring | |
@watcher = watcher | |
@setup = Set.new | |
- @stdout = IO.new(STDOUT.fileno) | |
- @stderr = IO.new(STDERR.fileno) |
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
diff --git a/lib/spring/application.rb b/lib/spring/application.rb | |
index 6e241a8..614f5f5 100644 | |
--- a/lib/spring/application.rb | |
+++ b/lib/spring/application.rb | |
@@ -62,6 +62,8 @@ module Spring | |
def serve(client) | |
redirect_output(client) do | |
+ stdin = client.gets.chomp | |
+ |
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
diff --git a/lib/spring/application.rb b/lib/spring/application.rb | |
index 6e241a8..c1e9f66 100644 | |
--- a/lib/spring/application.rb | |
+++ b/lib/spring/application.rb | |
@@ -62,6 +62,8 @@ module Spring | |
def serve(client) | |
redirect_output(client) do | |
+ stdin = client.recv_io | |
+ |
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
diff --git a/lib/spring/application.rb b/lib/spring/application.rb | |
index 6e241a8..2e60965 100644 | |
--- a/lib/spring/application.rb | |
+++ b/lib/spring/application.rb | |
@@ -62,6 +62,8 @@ module Spring | |
def serve(client) | |
redirect_output(client) do | |
+ stdin = client.recv_io | |
+ |
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 "active_record" | |
require "logger" | |
puts ActiveRecord::VERSION::STRING | |
$rails4 = ActiveRecord::VERSION::MAJOR > 3 | |
# ActiveRecord::Base.logger = Logger.new(STDERR) | |
ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:' |
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 "active_record" | |
require "logger" | |
puts ActiveRecord::VERSION::STRING | |
$rails4 = ActiveRecord::VERSION::MAJOR > 3 | |
ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:' | |
ActiveRecord::Schema.define do |
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
page = require("webpage").create() | |
page.open("http://www.jonathanleighton.com", function() { | |
var date = new Date() | |
date.setTime(date.getTime() + 100000000) | |
date = date.toUTCString() | |
phantom.addCookie({ | |
name: "omg", | |
value: "lol", |
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 "active_record" | |
require "logger" | |
puts ActiveRecord::VERSION::STRING | |
# ActiveRecord::Base.logger = Logger.new(STDERR) | |
ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:' | |
ActiveRecord::Schema.define do | |
create_table :people |
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
[7] pry(main)> c = DL.dlopen "/lib64/libc.so.6" | |
=> #<DL::Handle:0x00000002c43478> | |
[8] pry(main)> f = Fiddle::Function.new(c['getsid'], [Fiddle::TYPE_INT], Fiddle::TYPE_INT) | |
=> #<Fiddle::Function:0x00000002d19e38 | |
@abi=2, | |
@args=[4], | |
@ptr=263015086048, | |
@return_type=4> | |
[9] pry(main)> f.(Process.pid) | |
=> 29496 |
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 -I jgrapht-0.8.3/lib graph.rb | |
NameError: cannot load Java class org.jgrapht.graph.SimpleGraph | |
get_proxy_or_package_under_package at org/jruby/javasupport/JavaUtilities.java:54 | |
method_missing at /home/turnip/.rbenv/versions/jruby-1.6.7.2/lib/ruby/site_ruby/shared/builtin/javasupport/java.rb:51 | |
(root) at graph.rb:4 |