Skip to content

Instantly share code, notes, and snippets.

@chadwhitacre
chadwhitacre / fsl-fcl.diff
Created August 12, 2024 15:22
Differences between the FSL and FCL
--- fsl 2024-08-12 11:19:17
+++ fcl 2024-08-12 11:21:28
@@ -1,8 +1,8 @@
-# Functional Source License, Version 1.1, MIT Future License
+# Fair Core License, Version 1.0, MIT Future License
## Abbreviation
-FSL-1.1-MIT
+FCL-1.0-MIT
#!/usr/bin/env zsh
# frame foo.webp bar.png
rm -rf framed
mkdir framed
for img in ${@:1}; do
magick "$img" \
-fuzz 1% -trim -bordercolor white -border 100 \
-resize "1024x576" \
-background "#EEE" -compose Copy -gravity center -extent "1600x900" \
"framed/$img"
@chadwhitacre
chadwhitacre / sq
Last active February 24, 2021 21:24
sq - squash git commits easily
#!/usr/bin/env zsh
#
# https://gist.github.com/chadwhitacre/5d2ff5f46cd0bc981b3f3b76cf891b97
#
# Squash the N most recent git commits together (default: 2), using the oldest
# one's commit message.
N=${1:-2}
msg="$(git log --format=%B -n 1 HEAD~$(( $N - 1 )))"
git reset --soft HEAD~$N && git commit -nm "$msg"
@chadwhitacre
chadwhitacre / charts.json
Created May 11, 2018 16:10
Gittip/Gratipay History
[
{
"date": "2017-12-28",
"nteams": "95",
"nusers": "295",
"volume": "476.44",
"xTitle": "2017-12-28"
},
{
"date": "2017-12-21",

Keybase proof

I hereby claim:

  • I am whit537 on github.
  • I am whit537 (https://keybase.io/whit537) on keybase.
  • I have a public key whose fingerprint is C328 C24F 685E 8D29 13C1 0A4C 6EE1 8A8D C479 77C2

To claim this, I am signing this object:

"""Here's how you implement Foo(pkid) with postgres.orm 2.1.x.
Discovered at PyTennesse with @wlphoenix @PederSchacht et al.
"""
class Foo(Model):
typname = 'foo'
def __new__(cls, pkid_or_record):
# Given this List of Songs, Construct Arrays by Artist and Album
# Hint: Make use of the split() String Method
# http://www.ruby-doc.org/core-1.9.3/String.html#method-i-split
# Simple Example of Data Parsing
songs = [
"The Magnetic Fields - 69 Love Songs - Parades Go By",
"The Magnetic Fields - Get Lost - Smoke and Mirrors",
"Neutral Milk Hotel - In An Aeroplane Over the Sea - Holland 1945",
"The Magnetic Fields - Get Lost - You, Me, and the Moon",
@chadwhitacre
chadwhitacre / gittip-yc-application.md
Last active December 24, 2015 01:19
Gittip's YC Application (W14).
PERSONAL_API_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxx
REPO=www.gittip.com
HEAD=issue-1426
ISSUE=1426
curl https://api.github.com/repos/gittip/$REPO/pulls \
-u $PERSONAL_API_TOKEN: \
-X POST \
-d"{\"issue\": \"$ISSUE\", \"head\": \"$HEAD\", \"base\": \"master\"}"
# This adds tab completion of git branch names (including remotes) to several
# git-related bash aliases I have set up:
#
# co git checkout
# gb git branch
# gm git merge
#
#
# Bugs:
#