Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Recommended sort: -k2,2 -k1,1
REMOTE='origin'
BRANCHES=$(git branch -r | grep $REMOTE | grep -v 'HEAD -> ')
for BRANCH in $BRANCHES ; do
git log -n 1 --pretty="%C(yellow)%ci%Creset %x00 %C(cyan)%an%Creset %x00 %C(blue)<%ae>%Creset %x00 %Cred${BRANCH:7}%Creset" $BRANCH
done | sort -t '\0' $@
echo `echo $BRANCHES | wc -w` "remote ($REMOTE) branches found."
@glyphobet
glyphobet / circle.py
Last active August 29, 2015 13:56
This script demonstrates a problem with PostgreSQL set-up on http://circleci.com's test machines.
#!/usr/bin/env python
'''
The only dependencies for this script are SQLAlchemy 0.9.2, psycopg2
2.5.2, and Postgres 9.3.2, so you should be able to use it for debugging
yourselves. Also, those are the exact same versions that are being used
in all our other environments, so this problem isn't caused by a slight
version mismatch anywhere.
This test script connects to the Postgres DB, creates a table with a
text column, and then tries to write a Python dictionary object to the
(*
Copyright (c) 2013, Richard Emile Sarkis <rich@sarkis.info>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
#!/usr/bin/env python3.4
# A response to http://nbviewer.ipython.org/url/norvig.com/ipython/Fred%20Buns.ipynb
# Read more about it at https://blog.glyphobet.net/essay/2770
import itertools
from collections import Counter
lock_size = 10
WORDS = set(w.lower() for w in open('words4.txt').read().split())
norvig_improved_wordlock = ['spcmthdlfb', 'leyhwruoai', 'enmlrtacso', 'dsnpaylkte']