Skip to content

Instantly share code, notes, and snippets.

View bb's full-sized avatar

Benjamin Bock bb

View GitHub Profile
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active June 22, 2026 01:19
set -e, -u, -o, -x pipefail explanation

Effective Engineer - Notes

What's an Effective Engineer?

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

Adopt the Right Mindsets

@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
@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.

(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
@jameslafa
jameslafa / debug.rake
Created July 11, 2016 12:58
Easily debug rake task
desc "switch rails logger to stdout"
task :verbose => [:environment] do
Rails.logger = Logger.new(STDOUT)
end
desc "switch rails logger log level to debug"
task :debug => [:environment, :verbose] do
Rails.logger.level = Logger::DEBUG
end
// +build windows
package screen
import (
"fmt"
"image"
"reflect"
"syscall"
"unsafe"
@olih
olih / jq-cheetsheet.md
Last active June 12, 2026 09:46
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@tlowrimore
tlowrimore / set_operations.rb
Created March 10, 2016 17:41
Extends the functionality set forth in union_scope.rb, to include EXCEPT and INTERSECT operations
module ActiveRecord
module Scopes
module SetOperations
extend ActiveSupport::Concern
class_methods do
def union_scope(*scopes)
apply_operation 'UNION', scopes
end
# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*