Skip to content

Instantly share code, notes, and snippets.

View tombruijn's full-sized avatar

Tom de Bruijn tombruijn

View GitHub Profile
fn color(text: String) -> String {
format!("\x1B[0;31m{}\x1B[0m", text)
}
@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

source "https://rubygems.org"
gemspec
@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'\'' -'
@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 / 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 / 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:

echo 'source "$HOME/.cargo/env"' >> "$HOME/.bashrc"
source "$HOME/.bashrc"