Skip to content

Instantly share code, notes, and snippets.

Avatar
☘️
afk until Monday, September 25

Chad Whitacre chadwhitacre

☘️
afk until Monday, September 25
View GitHub Profile
@chadwhitacre
chadwhitacre / sq
Last active February 24, 2021 21:24
sq - squash git commits easily
View sq
#!/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
View charts.json
[
{
"date": "2017-12-28",
"nteams": "95",
"nusers": "295",
"volume": "476.44",
"xTitle": "2017-12-28"
},
{
"date": "2017-12-21",
View keybase.md

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:

View pkid_init.py
"""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):
View gist:6723135
# 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).
View PRomote.sh
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\"}"
View complete-git-branches
# 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:
#
View aspen_pjax.py
"""This is an Aspen hook for supporting PJAX.
Install it in your project's configure-aspen.py like so:
website.hooks.outbound += [aspen_pjax.outbound]
"""
from pyquery import PyQuery as pq # http://pythonhosted.org/pyquery/
View gist:5538382
[12:28am] elliottcable: To describe what I'm doing: To anonymize my identity away from my private “savings” address, from which I'm drawing funds,
[12:28am] elliottcable: I'm preforming a “shared send.” This uses a third-party anonymizing service that forwards the money through hundreds of transactions, that “mix” the money with other peoples', making it virtually impossible to trace the transaction back through the public block-chain.
[12:28am] elliottcable: (Basically, it's socially-acceptable money laundering. Standard practice.)
[12:29am] elliottcable: This is going to trickle money out onto a new address of my own I've generated for this purpose; once it's full, I'll be generating two transactions. One to the address you just signed for me, a private transaction to yourself. You will then be able to draw on that money (publically), or launder it back to your own anonymous savings account, as you please.
[12:30am] elliottcable: The second will go to a public gittip.com address, which I'll help you generat