Skip to content

Instantly share code, notes, and snippets.

View edthrn's full-sized avatar

ed edthrn

View GitHub Profile
@edthrn
edthrn / pw.sh
Last active November 20, 2019 20:31
Put a password stored in `1password` to clipboard
# Usage: ./pw.sh Github.com
op get item $1 | jq -r '.details.fields[] | select(.designation=="password").value' | xclip -selection c
@edthrn
edthrn / remove-from-git.sh
Created February 10, 2021 20:15
Remove old data from Git repo and Git history
# Taken from https://docs.github.com/en/github/authenticating-to-github/removing-sensitive-data-from-a-repository
# Warning:
# --------
# All stashes may be lost!
PATH_TO_REMOVE=big-folder/commited/by/error
# 1. Force Git to process, but not check out, the entire history of every branch and tag
# 2. Remove the specified file, as well as any empty commits generated as a result
@edthrn
edthrn / redis.clj
Created February 20, 2021 16:27 — forked from ragnard/redis.clj
Using Redis for persistent memoization of Clojure functions
(ns util.redis
(:refer-clojure :exclude [memoize])
(:require [taoensso.carmine :as car]))
;; boilerplate stuff that is not in Carmine
(def ^:dynamic ^:private *pool*)
(def ^:dynamic ^:private *spec*)
(defmacro with-redis
@edthrn
edthrn / Strong_Opinions_Weakly_Held.md
Created November 30, 2024 12:29
Paul Saffo's Essay / Strong Opinions weakly held

Strong Opinions weakly held

Orginally posted on 07.26.02008 by Paul Saffo, at https://saffo.com

The point of forecasting is not to attempt illusory certainty, but to identify the full range of possible outcomes. Try as one might, when one looks into the future, there is no such thing as “complete” information, much less a “complete” forecast. As a consequence, I have found that the fastest way to an effective forecast is often through a sequence of lousy forecasts. Instead of withholding judgment until an exhaustive search for data is complete, I will force myself to make a tentative forecast based on the information available, and then systematically tear it apart, using the insights gained to guide my search for further indicators and information. Iterate the process a few times, and it is surprising how quickly one can get to a useful forecast.

Since the mid-1980s, my mantra for this process is “strong opinions, weakly held.” Allow your intuition to guide you to a conclusion, no matter how imperfec