Skip to content

Instantly share code, notes, and snippets.

View es's full-sized avatar
🐢
waiting for the cache to expire

Emil Stolarsky es

🐢
waiting for the cache to expire
View GitHub Profile
@stephancasas
stephancasas / macos-modifier-keys-dec-map.json
Last active January 1, 2025 14:59
macOS Modifier Keys Decimal Values Map
{
"65536": [
"alphashift"
],
"131072": [
"shift"
],
"196608": [
"alphashift",
"shift"
@sj26
sj26 / activerecord-lifetime.rb
Created March 3, 2022 01:38
ActiveRecord Connection Lifetime controls for using postgres with an autoscaling pgbouncer service safely
# frozen_string_literal: true
# Connection lifetime for ActiveRecord
#
# Make sure that connections to the database can only live for a certain number
# of seconds. Once lifetime is reached, the underlying connection will be
# reconnected. This is enforced when checking out a connection for use from the
# pool. Use in combination with idle_timeout to enforce connection lifetime on
# idle connections as well.
#
@SivaDotRender
SivaDotRender / CCS.md
Created February 8, 2019 14:02
Climbing Cheat Sheet
@YumaInaura
YumaInaura / BIGQUERY.md
Last active February 9, 2023 01:28
BigQuery — Nested WITH clause ( WITH is like a Subquery )

BigQuery — Nested WITH clause ( WITH is like a Subquery )

Query Example

WITH result AS (
   WITH example AS ( SELECT * FROM `dataset.table` )
   SELECT * FROM example
)
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 30, 2025 02:57
set -e, -u, -o, -x pipefail explanation
@acolyer
acolyer / jessfraz.md
Created November 19, 2017 13:39
Containers, operating systems and other fun things from The Morning Paper
@gdamjan
gdamjan / notes.md
Last active August 20, 2018 17:32
X1 Carbon (5th gen) notes
@marick
marick / about_those_lava_lamps.md
Last active June 22, 2022 21:08
About Those Lava Lamps

Around 2006-2007, it was a bit of a fashion to hook lava lamps up to the build server. Normally, the green lava lamp would be on, but if the build failed, it would turn off and the red lava lamp would turn on.

By coincidence, I've actually met, about that time, (probably) the first person to hook up a lava lamp to a build server. It was Alberto Savoia, who'd founded a testing tools company (that did some very interesting things around generative testing that have basically never been noticed). Alberto had noticed that people did not react with any urgency when the build broke. They'd check in broken code and go off to something else, only reacting to the breakage they'd caused when some other programmer pulled the change and had problems.

@vsouza
vsouza / .bashrc
Last active April 20, 2025 21:15
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@patio11
patio11 / annual-prepay.md
Last active February 23, 2024 11:16
Appointment Reminder Annual Pre-pay copy (2014)

Notes

This is the latest version of an email which I send periodically, offering customers the opportunity to pre-pay for SaaS in return for a discount. The benefits to the SaaS company are better cash flow and reduced churn rate. The benefits to the customer are, well, in the email. This genre of email has produced hundreds of thousands of dollars in pre-pays for some companies I work with, and it rarely requires any more work than this example.

I've put $79 is as a placeholder for the cost of the user's plan. We calculate that for each account, naturally, along with the billing contact's name.

Subject: Save $79 on Appointment Reminder (and get a tax write-off) Formatting: 100% plain text. Gmail automatically links up the central link. From: Patrick McKenzie (Appointment Reminder) [email protected]