Skip to content

Instantly share code, notes, and snippets.

View JTBrinkmann's full-sized avatar

Jan-T. Brinkmann JTBrinkmann

  • Stralsund, Germany
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:

@bkeepers
bkeepers / .gitconfig
Created February 19, 2013 14:12
Git aliases to make new commits that fixup or are squashed into previous commits
[alias]
fixup = !sh -c 'REV=$(git rev-parse $1) && git commit --fixup $@ && git rebase -i --autosquash $REV^' -
squash = !sh -c 'REV=$(git rev-parse $1) && git commit --squash $@ && git rebase -i --autosquash $REV^' -
@willurd
willurd / web-servers.md
Last active July 23, 2024 17:12
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@goto-bus-stop
goto-bus-stop / get-rcs.sh
Created September 21, 2015 19:24
RCS deobf
#!/bin/sh
mkdir rcs/$(date '+%m%d')
curl https://code.radiant.dj/rs.min.js -o rcs/$(date '+%m%d')/rs.min.js
node unobfuscate rcs/$(date '+%m%d')/rs.min.js
@ylt
ylt / get-rcs.sh
Last active February 24, 2016 02:44 — forked from goto-bus-stop/get-rcs.sh
RCS deobf
#!/bin/sh
mkdir rcs/$(date '+%m%d')
curl https://code.radiant.dj/rs.min.js -o rcs/$(date '+%m%d')/rs.min.js
node unobfuscate rcs/$(date '+%m%d')/rs.min.js
@barneycarroll
barneycarroll / mithril-wormhole.js
Last active December 22, 2016 20:43
Mithril wormhole: a component whose content is appended to the body instead of rendering in place
import m from 'mithril'
// This dependency resides here:
// https://gist.github.com/barneycarroll/4144b93b6221f419bf7dcb5e847f8a22
import events from 'mithril-events'
// A hash of registered wormholes with values indicating status
const cache = Object.create( null )
// At the beginning of every draw, set the value of each to false,
// to indicate it hasn't registered this draw