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
~/sites/css (master⚡) rails c | |
Loading development environment (Rails 3.1.3) | |
[1] pry(main)> whereami | |
Error: Cannot find local context. Did you use `binding.pry`? | |
[2] pry(main)> c = County.where("nam = ?", 'dek').first; | |
Error: Cannot find local context. Did you use `binding.pry`? | |
[3] pry(main)> c.nam | |
NameError: undefined local variable or method `c' for main:Object | |
from (pry):1:in `<main>' | |
[4] pry(main)> c = County.where("nam = ?", 'dek') |
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
// Run the vanilla "rvm install 1.9.2" command after setting your .rvmrc to include the line: rvm_archflags="-arch i386" | |
// After it fails, type: file ~/.rvm/src/ruby-1.9.2-p290/libruby.dylib | |
// On my system, "file" says: ==> libruby.dylib: Mach-O 64-bit dynamically linked shared library x86_64 | |
// even though "file" on the all the ".o" files says (correctly) "i386". | |
// So I cut-n-pasted the line below tagged <TYPE THIS BY HAND> from the ~/.rvm/log/ruby-1.9.2-p290/make.log file. | |
// After pasting it, but before hitting <RETURN>, I manually added the "-arch i386" bit. |
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
------------------------------------------------------------------------ | |
this 12-line file is "send.rb" | |
------------------------------------------------------------------------ | |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'socket' | |
sock = TCPSocket.new 'localhost', 9814 | |
t0 = Time.now |
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
class Feeder < EventMachine::Connection | |
def initialize(q) | |
@q = q | |
end | |
# Only the first and last lines will stay after this is debugged | |
# How can the send_data() or the remote's recvfrom() not complete | |
# until after the channel.push() subscriber gets done, 30 minutes from now? | |
def receive_data(cmd) | |
send_data cmd + '.'@(16 - cmd.size) # ack to the web app, padded to fill recvfrom(16) |
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
Bill, Pete, Matt, Paul & John | |
I just watched a "Sixty Symbols" video in which a British "Jet Engine Expert" claims that a USGS report showed that volcanic ash causes flame out by "blocking the airflow through the guide vanes and turbine" | |
So I found this USGS paper: , which .... | |
determined the following mechanisms that can affect aircraft performance due to exposure to a volcanic ash cloud: | |
(a) deposition of material on hot-section components, | |
(b) erosion of compressor blades and rotor-path components, | |
(c) blockage of fuel nozzles and cooling passages, |
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
class CreateDispos < ActiveRecord::Migration | |
def self.up | |
create_table :dispos do |t| | |
t.integer :property_id, :null => false # fk | |
t.string :state | |
t.string :first_name | |
t.string :middle_name | |
t.string :last_name | |
t.string :name_suffix |
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
Yes, adding Errno::EPIPE seems to have completely solved the problem! | |
(barring very unlikely coincidences) | |
Thank you ! | |
For reference, the line # was correct for my "remote_fetcher.rb" file from June 3, 2009 in rubygems 1.3.5 | |
My lines 337 - 340 are now: | |
# HACK work around EOFError bug in Net::HTTP | |
# NOTE Errno::ECONNABORTED raised a lot on Windows, and make impossible |