Skip to content

Instantly share code, notes, and snippets.

jasonroelofs / Timings.txt
Created Nov 29, 2012
Using Go for embarrassingly parallel scripts
View Timings.txt
] wc -l domains.txt
783 domains.txt
] time go run domain_lookup_parallel.go
real 0m5.743s
user 0m0.359s
sys 0m0.355s
] time go run domain_lookup_sequential.go
jasonroelofs / cli_plea.rb
Last active Feb 7, 2018
Is there any Ruby Command Line Parsing library out there that JUST DOES PARSING?
View cli_plea.rb
# The ones I've tried (almost all from
# OptParse -- Doesn't support commands
# Commander -- Everything is about procs
# Trollop -- Doesn't support commands
# GLI -- Relies on calling a proc
# Methadone -- See GLI
# Main -- Seems to require the use of a #run method or proc
# Thor -- Focused on running methods, resulting code very difficult to read
# CRI -- Requires #run method or proc (seeing a pattern here...)
jasonroelofs / dupefinder.js
Last active Dec 27, 2017 — forked from mattslack/dupefinder.js
Find duplicate IDs in a document.
View dupefinder.js
(function () {
"use strict";
var find_dupes = function () {
var identified = document.querySelectorAll('[id]'),
found = {},
for (idx = 0; idx < identified.length; idx++) {
id = (identified[idx]).getAttribute('id');
if(found[id]) {
jasonroelofs / database_cleaner.rb
Created Oct 6, 2017
Configuring DatabaseCleaner for transaction and truncation
View database_cleaner.rb
require "capybara/rspec"
RSpec.configure do |config|
config.use_transactional_fixtures = false
config.before(:suite) do
if config.use_transactional_fixtures?
Delete line `config.use_transactional_fixtures = true` from rails_helper.rb
(or set it to false) to prevent uncommitted transactions being used in
View gist:30b7efef4c8c38f38f689b7314b38b32
Browserify: /Users/jroelofs/Development/browserify-rails/test/dummy/node_modules/.bin/browserifyinc -d --list --cachefile=/Users/jroelofs/Development/browserify-rails/test/dummy/tmp/cache/browserify-rails/browserifyinc-cache.json -o "/Users/jroelofs/Development/browserify-rails/test/dummy/tmp/cache/browserify-rails/output20170222-67719-sza12e" -
Browserify: /Users/jroelofs/Development/browserify-rails/test/dummy/node_modules/.bin/browserifyinc -d --cachefile=/Users/jroelofs/Development/browserify-rails/test/dummy/tmp/cache/browserify-rails/browserifyinc-cache.json -o "/Users/jroelofs/Development/browserify-rails/test/dummy/tmp/cache/browserify-rails/output20170222-67719-1ga4zhp" -
Exorcist: /Users/jroelofs/Development/browserify-rails/test/dummy/node_modules/.bin/exorcist /Users/jroelofs/Development/browserify-rails/test/dummy/app/assets/javascripts/ -b /Users/jroelofs/Development/browserify-rails/lib


I believe you misunderstood the message I was trying to convey in my reply, but that's understandable as Twitter does not really provide a usable framework for such discussions. As such, I'm not going to try to reply in Twitter as I can't make that work but instead will line out my thoughts here.

To preface my original tweet: The Ruby community is oft known for arrogance, egotism, and shaming. Rubyists have not been a very welcoming bunch. I myself have readily partook in such discussions and joined the echo chamber far more often than I probably realize. As such, I've met many developers who refuse to touch the language in fear or disgust of having to deal with what has been a toxic community. I do believe that we as a Ruby community are better today but the damage has been done and won't quickly be forgotten.

As such, this is the last thing I want to happen to the budding and fantastic Elixir community. While a simple website like "" is in itself harmless, it cannot be taken on

jasonroelofs /
Created Jan 27, 2014
Simple Snitching in Java
// Using raw*
URL obj = new URL("[snitch code]?m=[message]");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
// Apache HttpComponents
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpGet httpGet = new HttpGet("[snitch code]?m=[message]");
CloseableHttpResponse response1 = httpclient.execute(httpGet);
jasonroelofs /
Created Jan 23, 2014
Simple Recurly.js. For when you want the "transparent redirect" but none of the form generation.
# Ripped from recurly.js
createObject = (o) ->
F = ->
F.prototype = o
return new F()
$ ->
$(".recurly-form").submit (e) ->
$form = $(this)
View test_actor.rb
require 'celluloid'
class TestActor
include Celluloid
def initialize
@handlers = []
def add_handler(&block)
View fix_refute.rb
class Minitest::Test
alias assert_not_nil refute_nil
alias assert_not refute
You can’t perform that action at this time.