My Recent Pastes (450 and counting)

Pastes by ezmobius (450 and counting)

Pages:

Below are the 15 most recent pasties by ezmobius.

November 27, 2007
1:54AM EDT
by ezmobius

I have dealt with some clients in the past, got screwed a couple of
times, etc. Yes I have contracts, etc. Some of these jobs are so small
that they are not really worth taking legal action. I want to develop a
plugin that can self destruct an application. Is this possible?
Basically I could access a URL with a password, other identification,

October 29, 2007
4:07PM EDT
by ezmobius

envs = {}
lines = File.readlines('ey00.txt').reject{|l| l.chomp.size == 0}

lines.each do |line|
  tags, name, int_ip, *rest = line.split(/,/).map{|m| m.strip }

October 11, 2007
6:11PM EDT
by ezmobius

  # Frequently used constants when constructing requests or responses.  Many times
  # the constant just refers to a string with the same contents.  Using these constants
  # gave about a 3% to 10% performance improvement over using the strings directly.
  # Symbols did not really improve things much compared to constants.

October 11, 2007
2:45PM EDT
by ezmobius

Release candidates for Mongrel 1.0.2 and its dependencies are now
available. Note that gems are now signed, so please add the Mongrel
public certificate via:

  $ wget http://rubyforge.org/frs/download.php/25325/mongrel-public_cert.pem

September 25, 2007
9:05PM EDT
by ezmobius

# responder.rb line 162~

        def to_sym
          TYPES.select{|k,v| 
            v == synonyms || v[0] == synonyms[0]}.flatten.first

September 25, 2007
8:18PM EDT
by ezmobius

## config/merb_init.rb
Merb::ResponderMixin::Rest::TYPES[:txt] = %w[text/plain]

puts Merb::ResponderMixin::Rest::TYPES.inspect

September 25, 2007
4:52PM EDT
by ezmobius

StrinIO
 #write
 #truncate
 #close
 #rewind

September 24, 2007
10:42PM EDT
by ezmobius

hi,

I rewrote escape, unescape, and query_parse in a C extension.
http://s3.amazonaws.com/four.livejournal/20070922/http_helpers.tar.bz2

September 24, 2007
9:57PM EDT
by ezmobius

# edge rails, event driven mongrel

~/_merb/merb/trunk > ab -n 2000 -c 20 http://localhost:3000/bench/hello 
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/

September 24, 2007
9:53PM EDT
by ezmobius

# edge rails
~/bench-rails > ab -n 2000 -c 20 http://localhost:3000/bench/hello 
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

September 24, 2007
5:42PM EDT
by ezmobius

Merb::Router.prepare do |r|
   #routes
   MyPlugin.routes(r)
  #more routes
end

September 23, 2007
5:00PM EDT
by ezmobius


I need to run some cron jobs that clean up a table T which is used and
created by the foreground rails controller.  This could naturally lead
to synchronization issues/race conditions etc

September 23, 2007
3:38PM EDT
by ezmobius

ey01-s00200 data # ab -n  100000 -c 200 http://localhost/foo.html
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

September 23, 2007
3:34PM EDT
by ezmobius

ey01-s00200 data # ab -n  100000 -c 100 http://localhost/foo.html
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

September 23, 2007
2:41PM EDT
by ezmobius

    I made an interesting observation using webservers (not just mongrel) under red hat enterprise
linux ES release 4 (Nahant Update 5). Maybe this is helpful or somebody with deeper networking
expertise can comment on this.

Once client said that 1-2% of the response of our server were unacceptably slow (really huge 3s-21s). 

Next page

Previous page