Skip to content

Instantly share code, notes, and snippets.


Tom de Bruijn tombruijn

View GitHub Profile
View Gemfile
source ""
tombruijn /
Last active Sep 6, 2020
Retry until fail script

Until fail

Retry a command until it fails.

Debugging brittle specs is annoying and time consuming work. Let's automate finding those brittle specs by retrying them until they fail.

Accompanying blog post.


fn color(text: String) -> String {
format!("\x1B[0;31m{}\x1B[0m", text)
tombruijn / Dockerfile
Created Jul 10, 2020
CentOS 7.8.2003 + Ruby 2.3.0 Dockerfile
View Dockerfile
FROM centos:centos7.8.2003
RUN yum install -y git gcc gcc-c++ make openssl-devel bzip2 wget && \
cd ~/ && mkdir tmp && cd tmp && \
wget -O ruby-install-0.7.0.tar.gz && \
tar -xzvf ruby-install-0.7.0.tar.gz && \
cd ruby-install-0.7.0/ && \
make install
RUN ruby-install ruby 2.3.0
View elixir_linking_error_3
/app/_build/prod/lib/elixir_package/priv/libelixir_package_extension.a(floatdisf.o): In function `__floatdisf':
floatdisf.c:(.text.__floatdisf+0x0): multiple definition of `__floatdisf'
/app/_build/prod/lib/elixir_package/priv/libelixir_package_extension.a( first defined here
collect2: error: ld returned 1 exit status
View elixir_linking_error_2
/app/_build/prod/lib/elixir_package/priv/libelixir_package_extension.a(divdf3.o): In function `__divdf3':
divdf3.c:(.text.__divdf3+0x0): multiple definition of `__divdf3'
/app/_build/prod/lib/elixir_package/priv/libelixir_package_extension.a(compiler_builtins-a6b6fad6cc543169.compiler_builtins0.rcgu.o):/checkout/src/rustc/compiler_builtins_shim/../../libcompiler_builtins/src/ first defined here
/app/_build/prod/lib/elixir_package/priv/libelixir_package_extension.a(divsf3.o): In function `__divsf3':
divsf3.c:(.text.__divsf3+0x0): multiple definition of `__divsf3'
/app/_build/prod/lib/elixir_package/priv/libelixir_package_extension.a(compiler_builtins-a6b6fad6cc543169.compiler_builtins0.rcgu.o):/checkout/src/rustc/compiler_builtins_shim/../../libcompiler_builtins/src/ first defined here
/app/_build/prod/lib/elixir_package/priv/libelixir_package_extension.a(muldf3.o): In function `__muldf3':
muldf3.c:(.text.__muldf3+0x0): multiple definition of `__muldf3'

Keybase proof

I hereby claim:

  • I am tombruijn on github.
  • I am tombruijn ( on keybase.
  • I have a public key ASAWMmghMGGNT9nCA0asFbiezsQiCiiCqDytMjE8qiTGwAo

To claim this, I am signing this object:

View appsignal_custom_add_exception.rb
# Custom method to track exceptions regardless if an AppSignal transaction is
# currently active.
# When an AppSignal transaction is already active for this thread, it will add
# the exception to the currently active transaction. Note that only one
# exception can be added a transaction.
# When no AppSignal transactions are active for this thread it will create one
# temporarily, add the exception to the temporary transaction and send it to
# AppSignal.
tombruijn / config_application.rb
Last active May 5, 2017
AppSignal Rails 5.1 workaround
View config_application.rb
# config/application.rb
# Workaround for making the AppSignal gem work on Rails 5.1.
# Put this after your Rails app module is defined.
# E.g. `module TestApp; class Application < Rails::Application`.
# Safest location being at the end of the `config/application.rb` file.
# Create a new middleware class with a different name so that when the original
# middleware is deleted the newly added one isn't deleted as well, since Rails
tombruijn / capybara_ip_stub.rb
Created Nov 23, 2016
Fake an ip address on a capybara request
View capybara_ip_stub.rb
around do |example|
# Set custom IP address
original_app = = lambda do |env|"REMOTE_ADDR" => ""))
end = original_app