Skip to content

Instantly share code, notes, and snippets.

View MarcCote's full-sized avatar

Marc-Alexandre Côté MarcCote

View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@jaygooby
jaygooby / git_notes.md
Last active January 26, 2026 10:45
Git, you bloody git

Case Insensitive search all commit messages

git log -i --grep='weavils'

Add --all if you also want to check all branches, not just the current one.

Alias for recently edited branches

git lb

31 minutes ago: fun-branch

2 days ago: remove-things

@schlamar
schlamar / processify.py
Last active December 4, 2025 10:37
processify
import os
import sys
import traceback
from functools import wraps
from multiprocessing import Process, Queue
def processify(func):
'''Decorator to run a function as a process.
Be sure that every argument and the return value