Skip to content

Instantly share code, notes, and snippets.

View mathieujobin's full-sized avatar

Mathieu Jobin mathieujobin

  • Tokyo, Japan
View GitHub Profile
@mathieujobin
mathieujobin / benchmark_json_parsing.rb
Created February 7, 2025 11:03 — forked from wspurgin/benchmark_json_parsing.rb
Simple benchmark comparing Oj and JSON::Ext (core ruby)
#! /usr/env ruby
require "benchmark"
require "oj"
require "json"
require "rbconfig"
puts "Host OS: #{RbConfig::CONFIG['host_os']}"
puts "Ruby Version #{RUBY_VERSION}"
puts "OJ version #{Oj::VERSION}"
@mathieujobin
mathieujobin / skcluster.rb
Created November 13, 2019 06:34 — forked from stympy/skcluster.rb
Sidekiq cluster control script and systemd service
#!/usr/bin/env ruby
require 'sidekiq'
require 'sidekiq/cli'
# Default to running one process per core
def process_count
return ENV['SK_PROCESS_COUNT'].to_i unless ENV['SK_PROCESS_COUNT'].to_i == 0
case RbConfig::CONFIG['host_os']