Skip to content

Instantly share code, notes, and snippets.

vagrant@natty:/vagrant/ofa_call_tool$ ab -n 1000 -c 50 -C "caller_session_id=698ed412374494433b8aee1a070e2e31" http://localhost:3030/campaigns/BROOXRULES
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 localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
jQuery.validator.addMethod('state_filled', function(value) {
return $("#person_address_state").val() != "";
}, jQuery.format('State cannot be blank'));
undefined
$.validator.addMethod('state_filled', function(value) {
return $("#person_address_state").val() != "";
}, 'State cannot be blank');
undefined
log public rake_routes.rb script tmp
vagrant@natty:/vagrant/ofa_call_tool$ bundle exec rails server -p 3030
=> Booting Thin
=> Rails 3.2.2 application starting in development on http://0.0.0.0:3030
=> Call with -d to detach
=> Ctrl-C to shutdown server
Statsd disabled
Narwhal server: http://0.0.0.0:3000
Login server: http://0.0.0.0:3004
>> Thin web server (v1.3.1 codename Triple Espresso)
Sun Apr 15 10:58:54 [initandlisten] connection accepted from 127.0.0.1:53542 #1
Sun Apr 15 10:58:54 [initandlisten] connection accepted from 127.0.0.1:53543 #2
Sun Apr 15 10:58:54 [conn1] end connection 127.0.0.1:53542
Sun Apr 15 10:58:56 [conn2] end connection 127.0.0.1:53543
undle exec rails console -p 9292
/home/vagrant/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.11/lib/rails/commands/console.rb:23:in `block in start': invalid option: -p (OptionParser::InvalidOption)
from /home/vagrant/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.11/lib/rails/commands/console.rb:18:in `new'
from /home/vagrant/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.11/lib/rails/commands/console.rb:18:in `start'
from /home/vagrant/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.11/lib/rails/commands/console.rb:8:in `start'
from /home/vagrant/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/railties-3.0.11/lib/rails/commands.rb:23:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
@patelc75
patelc75 / gist:2297084
Created April 4, 2012 01:53
panic report when macbook pro crashes
Interval Since Last Panic Report: 239870 sec
Panics Since Last Report: 2
Anonymous UUID: 884153AB-61B5-49B3-B87E-567024BFE2ED
Tue Apr 3 20:50:35 2012
panic(cpu 0 caller 0xffffff80002c266d): Kernel trap at 0xffffff7f817342b1, type 14=page fault, registers:
CR0: 0x0000000080010033, CR2: 0xffffff822aa735dc, CR3: 0x00000000331f8032, CR4: 0x00000000000606e0
RAX: 0x0000000000000000, RBX: 0x0000000000000000, RCX: 0x0000000000000000, RDX: 0x0000000000000000
RSP: 0xffffff812e453770, RBP: 0xffffff812e453880, RSI: 0x0000000000000001, RDI: 0x0000000000000001
R8: 0x0000000000000009, R9: 0x0000000000000180, R10: 0x0000000000000080, R11: 0x0000000000000180
Error Details:
Offending URL:
http://gremln.com/Dashboard.aspx
Source:
.Net SqlClient Data Provider
Message:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Stack trace:
id | device_id | created_at | priority | user_id
-------+-----------+----------------------------+----------+---------
33498 | 419 | 2012-02-22 20:46:39.435003 | | 149
select * from devices_by_user_id(149);
device_id | serial_number | user_id | login
-----------+---------------+---------+--------
5976 | H200000512 | 149 | linear
419 | H100000303 | 149 | linear
(2 rows)
@patelc75
patelc75 / gist:1819764
Created February 13, 2012 20:07
History response
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body><History xmlns="http://tempuri.org/">
<sessionNum>1030948</sessionNum>
<sessionPassword>cr19KsJ3oaE=</sessionPassword>
<SiteNum>3008151</SiteNum>
</soap:Body>
</soap:Envelope>
</History>
def self.send(dest_url, content)
url = URI.parse(dest_url)
# Code snippet on how to use Net:HTTP: http://snippets.aktagon.com/snippets/305-Example-of-how-to-use-Ruby-s-NET-HTTP
http_endpoint = Net::HTTP.new(url.host, url.port)
if url.scheme == 'https'
http_endpoint.use_ssl = true
http_endpoint.verify_mode = OpenSSL::SSL::VERIFY_NONE
#http_endpoint.verify_mode = OpenSSL::SSL::VERIFY_PEER #verify the certificate -- not working with Avantguard, getting "OpenSSL::SSL::SSLError: certificate verify failed"
end