Skip to content

Instantly share code, notes, and snippets.

View bb's full-sized avatar

Benjamin Bock bb

View GitHub Profile
(function() {
const labels = [
// Platform
{ name: "typescript", color: "#BFD4F2" },
{ name: "javascript", color: "#BFD4F2" },
// Problems
{ name: "bug", color: "#EE3F46" },
{ name: "security", color: "#EE3F46" },
{ name: "production", color: "#F45D43" },
// Mindless
@glebm
glebm / README.md
Last active May 10, 2026 21:27
Rails Link Preload Headers

This lets you set the preload headers for your assets, so that the browser can start fetching them before it begins parsing HTML.

@ankurk91
ankurk91 / mac-apps.md
Last active October 8, 2024 06:45
Mac OS 10.15 Apps and configs

macOS Apps

⚠️ No longer maintained! ⚠️

# Install x-code command line tools 
xcode-select --install

# Install homebrew itself

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active June 12, 2026 11:57
set -e, -u, -o, -x pipefail explanation
@bazzel
bazzel / README.md
Last active May 26, 2021 04:20
Rails 6 and Bootstrap 4

This blogpost shows how to setup Rails 6 with Bootstrap 4.

This snippet shows a somehow different and less customized approach.

$ rails new rails6-bootstrap4
$ bundle --binstubs
$ yarn add bootstrap jquery popper.js expose-loader
require "onnxruntime"
require "mini_magick"
img = MiniMagick::Image.open("bears.jpg")
pixels = img.get_pixels
model = OnnxRuntime::Model.new("model.onnx")
result = model.predict({"inputs" => [pixels]})
p result["num_detections"]
@leastbad
leastbad / action_mailbox.md
Last active January 11, 2026 04:08
Action Mailbox: The Missing Manual

This is all you really need to know in order to make Action Mailbox work in development.

  1. Fire up ngrok http 3000 and make note of your subdomain for steps 3 and 8.
  2. Create a Mailgun account because they offer sandbox addresses; grab your domain from the Dashboard.
  3. Go into Receiving and create a catch-all route pointing to: https://XXX.ngrok.io/rails/action_mailbox/mailgun/inbound_emails/mime
  4. Add your Mailgun API key to your credentials:
action_mailbox:
 mailgun_api_key: API KEY HERE
@fernandoaleman
fernandoaleman / mysql2-catalina.md
Last active July 11, 2023 02:11
Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Catalina with MySQL 5.7.

Solution

Make sure openssl is installed on Mac via Homebrew.

brew install openssl
@KevinBatdorf
KevinBatdorf / add-alpine-js-to-tailwind-ui.js
Last active October 23, 2024 09:21
Auto copy the Alpine code from Tailwind UI's copy button
// ==UserScript==
// @name Add AlpineJs to Tailwind UI
// @namespace http://tampermonkey.net/
// @version 3.0
// @description Add Alpine JS code to Tailwind Ui copy/paste
// @author https://gist.github.com/KevinBatdorf/8bd5f808fff6a59e100dfa08a7431822
// @match https://tailwindui.com/components/*
// @grant none
// ==/UserScript==