Skip to content

Instantly share code, notes, and snippets.

View kraih's full-sized avatar

Sebastian Riedel kraih

View GitHub Profile
@kraih
kraih / pr.md
Created August 23, 2012 15:57 — forked from piscisaureus/pr.md
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 = [email protected]: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:

@kraih
kraih / a.pl
Created June 9, 2012 22:07 — forked from tempire/a.pl
use Mojo::UserAgent;
use Modern::Perl;
my $ua = Mojo::UserAgent->new;
my $delay = Mojo::IOLoop->delay;
$delay->begin;
$ua->get(
'tempi.re/ip' => sub {
warn Mojo::UserAgent->new->get('tempi.re/ip')->res->body;