dylanahsmith’s gists · GitHub
Skip to content Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert Instantly share code, notes, and snippets. Dylan Thacker-Smith dylanahsmith 181 followers · 0 following Ottawa 09:52 (UTC -05:00) View GitHub Profile Recently created Least recently created Recently updated Least recently updated 4 files 0 forks 0 comments 0 stars dylanahsmith / "v8 vs process startup benchmark" Created July 8, 2021 15:07 gist title 5 files 0 forks 0 comments 0 stars dylanahsmith / "cgo benchmark" Created July 7, 2021 15:57 gist title 1 file 0 forks 0 comments 1 star dylanahsmith / test2.rb Last active January 15, 2019 12:46 mysql2 EINTR on connect prolonged timeout reproduction #!/usr/bin/env ruby require 'mysql2' require 'rbconfig' CONNECT_TIMEOUT = ARGV.empty? ? nil : ARGV.shift.to_i trap("USR2") {} HOST = case RbConfig::CONFIG["host_os"] 1 file 0 forks 0 comments 2 stars dylanahsmith / test.rb Last active January 15, 2019 12:46 mysql2 EINTR on connect error reproduction #!/usr/bin/env ruby require 'mysql2' trap("USR2") {} pid = fork do loop do client = Mysql2::Client.new client.close 1 file 0 forks 0 comments 0 stars dylanahsmith / 2.1.0-github Created January 30, 2014 17:57 ruby-build definition for github's patched ruby 2.1 install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl install_git "ruby-2.1.0-github" git@github.com:github/ruby.git 2.1 ldflags_dirs standard verify_openssl 2 files 0 forks 0 comments 0 stars dylanahsmith / rpoplpushn-benchmark.rb Created January 14, 2014 16:58 Batch redis atomic pop push benchmark #!/usr/bin/env ruby require 'benchmark' require 'redis' require 'wolverine' ITERATIONS = 200 BATCH_SIZE = 200 PROCESS_COUNT = 8 redis = Redis.new(:host => 'localhost') 1 file 1 fork 0 comments 4 stars dylanahsmith / tcp-no-delay-benchmark.rb Created January 9, 2014 23:04 Benchmarking Net::HTTP with and without keep-alive and TCP_NODELAY #!/usr/bin/env ruby require 'net/http' require 'net/http/persistent' require 'benchmark' class HttpNoTcpDelay < Net::HTTP def on_connect @socket.io.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) nil 1 file 0 forks 0 comments 1 star dylanahsmith / marshal-print.rb Last active January 18, 2019 20:55 Print contents of marshal dump for inspection and debugging #!/usr/bin/env ruby # frozen_string_literal: true filename = ARGV.shift class MarshalPrinter TYPE_NIL = '0' TYPE_TRUE = 'T' TYPE_FALSE = 'F' TYPE_FIXNUM = 'i' 1 file 0 forks 0 comments 0 stars dylanahsmith / boost_ignored_on_prefix_search.sh Created August 19, 2012 06:08 elasticsearch ignores boost on prefix search #!/bin/sh curl -XDELETE 'http://localhost:9200/foo' curl -XPUT 'http://localhost:9200/foo/?pretty=true' -d ' { "mappings" : { "bar" : { "properties" : { "title" : { 1 file 0 forks 0 comments 1 star dylanahsmith / qs-analyzed-wildcard-and-op-bug.sh Created August 17, 2012 03:09 elasticsearch query_string with analyze_wildcard default operator bug #!/bin/sh curl -XDELETE localhost:9200/test curl -XPUT 'http://localhost:9200/test/doc/1' -d '{ "message" : "apples oranges" }' curl -XPUT 'http://localhost:9200/test/doc/2' -d '{ "message" : "apples" Newer Older You can’t perform that action at this time.