This file contains 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
g++ -Wall -O3 -ldb -I/usr/local/include \ | |
-I/usr/local/include/db44 \ | |
-L/usr/local/lib/db44 \ | |
-L/usr/local/lib \ | |
-o dumpHTTP dumpHTTP.cpp | |
In file included from dumpHTTP.cpp:10: | |
address.hpp: In function ‘std::string ethernetToText(const char*)’: | |
address.hpp:36: error: ‘memcpy’ was not declared in this scope | |
address.hpp: In function ‘std::pair<unsigned int, unsigned int> cidrToRange(std::string)’: | |
address.hpp:72: error: ‘strtoul’ was not declared in this scope |
This file contains 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
a bunch of qa1s before this... | |
qa1 199ms | |
qa1 227ms | |
qa1 196ms | |
qa1 203ms | |
qa1 195ms | |
qa1 184ms | |
qa1 201ms | |
qa1 180ms |
This file contains 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
$ irb -r rubygems -r sequel | |
irb(main):001:0> db = Sequel.connect("mysql://root@localhost/vertuoconseil?encoding=utf8") | |
=> #<Sequel::MySQL::Database: "mysql://root@localhost/vertuoconseil"> | |
irb(main):002:0> db.tables |
This file contains 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 'rubygems' | |
gem 'data_objects', '= 0.9.11' | |
gem 'dm-core', '= 0.9.11' | |
require 'myapp' | |
run Sinatra::Application |
This file contains 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'sequel' | |
@db = Sequel.connect("postgres://postgres@localhost/mydb") |
This file contains 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
/usr/local/lib/ruby/gems/1.8/gems/thin-1.0.0/lib/thin/server.rb:51: uninitialized constant Thin::Server::Forwardable (NameError) |
This file contains 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 'rubygems' | |
require 'main' | |
run Sinatra::Application |
This file contains 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 'thread' | |
require 'benchmark' | |
N = 200000 | |
def competition(&block) | |
t1 = Thread.new { | |
for i in 1..N | |
block.call | |
end |
This file contains 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
task :environment do | |
require File.dirname(__FILE__) + '/lib/all' | |
end | |
require 'benchmark' | |
namespace :bench do | |
task :write => :environment do | |
puts Benchmark.realtime { | |
1000.times { |x| c = Counting.new; c.num = x; c.save; } | |
} |
This file contains 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
def cmd_receive_data | |
puts "Receiving data" | |
tables_with_counts, record_count = fetch_remote_tables_info | |
puts "#{tables_with_counts.size} tables, #{format_number(record_count)} records" | |
tables_with_counts.each do |table_name, count| | |
table = db[table_name.to_sym] | |
chunksize = default_chunksize |
OlderNewer