Skip to content

Instantly share code, notes, and snippets.

View jperras's full-sized avatar
💨
what what is this where am I

Joël Perras jperras

💨
what what is this where am I
View GitHub Profile
@jperras
jperras / .gitconfig
Created July 31, 2010 18:03
.gitconfig
[color]
diff = auto
status = auto
branch = auto
[color "branch"]
current = yellow reverse
local = yellow
[color "diff"]
meta = yellow
frag = magenta bold
@jperras
jperras / .gitconfig
Created November 4, 2010 15:22
Tralalalala
[alias]
ci = commit -a
st = status -sb
@jperras
jperras / bip.conf
Created November 24, 2010 19:00
A bare-bones bip configuration file.
# Remember to change out $HOME for your home directory (e.g. `/home/joel`) below.
ip = "0.0.0.0";
port = 6667;
log_level = 2;
log_root = "$HOME/.bip/logs";
log_sync_interval = 5;
# Network definition, a name and server info
network {
# This all assumes you have the process running in
# a terminal screen and you're on Linux-like system.
# First off, suspend the process and background it
ctrl-z # suspend the process
bg # restart/continue the process in the background
# Now create files to log to. They can be called anything,
# Personally I would end the in .log. E.g. could be
# /var/logs/myprocess-stdout.log,
@jperras
jperras / post-commit.sh
Created February 21, 2011 15:56
Pivotal Tracker SVN Post-Commit Hook
#!/bin/sh
set -e
REPO="$1"
REV="$2"
AUTHOR=`/usr/bin/svnlook author $REPO -r $REV`
MESSAGE=`/usr/bin/svnlook log $REPO -r $REV`
# You must HTML-escape the XML post data
%.d : %.c
@set -e; rm -f $@; $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; rm -f $@.$$$$
@jperras
jperras / xUnit_format.xml
Created March 22, 2011 20:42
xUnit format
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="nosetests" tests="1" errors="1" failures="0" skip="0">
<testcase classname="path_to_test_suite.TestSomething"
name="test_it" time="0">
<error type="exceptions.TypeError" message="oops, wrong type">
Traceback (most recent call last):
...
TypeError: oops, wrong type
</error>
</testcase>

10 Ways to improve Github Issues

I love the new GitHub issues, here are some ideas to make it perfect, ordered by priority:

1. I should be able to pick the assignee and milestone via keyboard when creating a new ticket

2. Keyboard shortcuts should work everywhere. For example when viewing an existing issue, 'c' will not create a new one.

3. After creating an issue, the assigned user / milestone should be pre-filled when creating the next issue.

4. When commenting, I should also be able to assign a different user. Right now this deletes my half-typed comment.

5. When typing the @ symbol to mention somebody, it should auto-complete the name.

6. This might just be me, but things feel a little sluggish right now, any improvements would be very welcome.

@jperras
jperras / programmer_prayer.txt
Created April 18, 2011 20:41
The programmer's prayer.
Our root,
who art in Unix,
hallowed be thy shell.
Thy kernel come.
Thy commands be run
@localhost as they are in iNet.
Give us this day our daily updates,
And forgive us for our four-oh-threes,
as we forgive those who 403 against us.
And lead us not into segfaults,
@jperras
jperras / imap.py
Created April 29, 2011 21:21
Did imaplib just tell me to go fuck myself?
import getpass, imaplib
# The following snippet will fetch all emails from an IMAP server.
M = imaplib.IMAP4()
M.login(getpass.getuser(), getpass.getpass())
M.select()
typ, data = M.search(None, 'ALL')
for num in data[0].split():
typ, data = M.fetch(num, '(RFC822)')