Skip to content

Instantly share code, notes, and snippets.

View tombruijn's full-sized avatar

Tom de Bruijn tombruijn

View GitHub Profile
@tombruijn
tombruijn / README.md
Last active January 16, 2024 16:14
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.

Usage

echo 'source "$HOME/.cargo/env"' >> "$HOME/.bashrc"
source "$HOME/.bashrc"
@tombruijn
tombruijn / ginit.vim
Created October 9, 2021 14:31
neovim-qt macOS config
" macOS config used for neovim-qt, as far I tested to reproduce some basic behavior: https://github.com/equalsraf/neovim-qt
" Enable Mouse
set mouse=a
" Set Editor Font
if exists(':GuiFont')
" Use GuiFont! to ignore font errors
" GuiFont {font_name}:h{size}
GuiFont Meslo\ LG\ M\ for\ Powerline:h16
@tombruijn
tombruijn / README.md
Last active October 12, 2022 12:01
AppSignal for Node.js version 3 beta install instructions

Node.js OpenTelemetry install instructions

Thank you for trying out our new AppSignal for Node.js version 3 release. This release is powered by OpenTelemetry instrumentation. Please try it out and let us know if you run into any issues.

New installation

Follow these steps to install AppSignal for Node.js in your new app:

@tombruijn
tombruijn / appsignal.js
Created October 11, 2022 08:25
AppSignal for Node.js version 3 beta example appsignal.js/ts files
const { Appsignal } = require("@appsignal/nodejs");
export default new Appsignal({
active: true,
name: "Your app name",
pushApiKey: "YOUR-PUSH-API-KEY"
});
@tombruijn
tombruijn / oldest-ancestor-alias.sh
Created October 3, 2021 18:42 — forked from jdforsythe/oldest-ancestor-alias.sh
GIT find commit where branched off
#!/bin/bash
# "master" is the name of your main branch you'll be comparing to, or you can pass the "parent" branch as an argument
# it compares against the current branch by default, but you can pass a second argument to specify a child branch
# this creates a permanent alias so you can use `git oldest-ancestor` to get the oldest ancestor of the current branch at any time
git config --global alias.oldest-ancestor '!zsh -c '\''diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "${1:-master}") <(git rev-list --first-parent "${2:-HEAD}") | head -1'\'' -'
source "https://rubygems.org"
gemspec
fn color(text: String) -> String {
format!("\x1B[0;31m{}\x1B[0m", text)
}
@tombruijn
tombruijn / Dockerfile
Created July 10, 2020 15:54
CentOS 7.8.2003 + Ruby 2.3.0 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 https://github.com/postmodern/ruby-install/archive/v0.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
/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(compiler_builtins-874d313336916306.compiler_builtins0-efdbf1bd2f3b1e3c9741f8dcfa1f7012.rs.rcgu.o):/checkout/src/rustc/compiler_builtins_shim/../../libcompiler_builtins/src/float/conv.rs:89: first defined here
collect2: error: ld returned 1 exit status