/girls

ls -a /girls | grep 'chill'
Posted on June 26, 2008 at 6:36 pm

$blog

if($blog->lastUpdate > '2 months') { 
echo 'DUDE WTF';
else {
echo 'n_n';
}
Posted on June 20, 2008 at 10:47 pm

You just gotta see this..

ruby -le '33.times{|y|print" "*(32-y),(0..y).map{|x|~y&x>0?" .":" A"}}'
Posted on April 23, 2008 at 1:11 pm

Benchmarking RadiantCMS on ModRails

After initially testing ModRails with my supreme hosting partner, I decided to try out a common application on the system. I still amazed at how fast this system is.. see for yourself:

zscott@Lian:~$ ab -n 1000 http://zak.railsplayground.net/
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
 
Benchmarking zak.railsplayground.net (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests
 
 
Server Software:        Apache/2.0.59
Server Hostname:        zak.railsplayground.net
Server Port:            80
 
Document Path:          /
Document Length:        47 bytes
 
Concurrency Level:      1
Time taken for tests:   176.54368 seconds
Complete requests:      1000
Failed requests:        2
(Connect: 0, Length: 2, Exceptions: 0)
Write errors:           0
Total transferred:      481156 bytes
HTML transferred:       85390 bytes
Requests per second:    5.68 [#/sec] (mean)
Time per request:       176.054 [ms] (mean)
Time per request:       176.054 [ms] (mean, across all concurrent requests)
Transfer rate:          2.66 [Kbytes/sec] received
 
Connection Times (ms)
min  mean[+/-sd] median   max
Connect:       64   82  16.9     78     191
Processing:    65   92  72.8     80    1251
Waiting:       64   90  59.9     79    1164
Total:        135  175  75.4    161    1324
 
Percentage of the requests served within a certain time (ms)
50%    161
66%    170
75%    180
80%    186
90%    206
95%    236
98%    290
99%    401
100%   1324 (longest request)
Posted on April 16, 2008 at 7:42 pm

Benchmarking ModRails

Today Joe set-up beta testing for modrails on railsplayground, and a test account for me to play around with.

I quickly setup a basic Contact manager using Rails 2.02 scaffolding and added some test data. After the initial bump of forgetting to configure for production we were under way.

These are the results of benchmarking the application under 1,000 requests, looks good so far.

zscott@Lian:~$ ab -n 1000 http://zak.railsplayground.net/contacts
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
 
Benchmarking zak.railsplayground.net (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests
 
Server Software:        Apache/2.0.59
Server Hostname:        zak.railsplayground.net
Server Port:            80
 
Document Path:          /contacts
Document Length:        2357 bytes
 
Concurrency Level:      1
Time taken for tests:   151.627619 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      3060000 bytes
HTML transferred:       2357000 bytes
Requests per second:    6.60 [#/sec] (mean)
Time per request:       151.628 [ms] (mean)
Time per request:       151.628 [ms] (mean, across all concurrent requests)
Transfer rate:          19.71 [Kbytes/sec] received
 
Connection Times (ms)
min  mean[+/-sd] median   max
Connect:       55   69  13.8     66     288
Processing:    60   81  36.4     75     739
Waiting:       59   77  29.2     71     586
Total:        118  151  39.2    144     808
 
Percentage of the requests served within a certain time (ms)
50%    144
66%    151
75%    156
80%    160
90%    174
95%    191
98%    222
99%    264
100%    808 (longest request)
Posted on April 13, 2008 at 1:23 pm

Are you sure?

def are_you_sure?
  while true
    print "Are you sure? [y/n]: "
    response = gets
    case response
      when /^[yY]/
      return true
      when /^[nN]/
      return false
    end
  end
end

I’m rather enjoying this.. ;)

Posted on April 11, 2008 at 8:01 pm