Skip to content

Instantly share code, notes, and snippets.

@konradzdunczyk
konradzdunczyk / pr.md
Created August 15, 2017 11:30 — 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 = 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:

@konradzdunczyk
konradzdunczyk / introrx.md
Created April 22, 2017 20:14 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@konradzdunczyk
konradzdunczyk / JaSON.swift
Created November 10, 2016 00:14 — forked from jarsen/JaSON.swift
JSON Value Extraction in Swift. Blog post here http://jasonlarsen.me/2015/10/16/no-magic-json-pt3.html
import Foundation
//
// MARK: - JSONError Type
//
public enum JSONError: ErrorType, CustomStringConvertible {
case KeyNotFound(key: JSONKeyType)
case NullValue(key: JSONKeyType)
case TypeMismatch(expected: Any, actual: Any)