Skip to content

Instantly share code, notes, and snippets.

View knickers's full-sized avatar

Nick Cox knickers

  • The Desert
View GitHub Profile
@knickers
knickers / pull-requests.md
Last active August 16, 2020 18:55
How to make multiple pull requests to a forked repository.

How to make multiple pull requests to a forked repository.

One-time preparation

From inside the forked repository, add a new remote pointing to the upstream repository.

$ git remote add upstream git://github.com/upstream/repo.git
$ git pull upstream master
@jlbruno
jlbruno / ordinal.js
Last active July 28, 2022 14:58
Javascript Ordinal Numbers
// found here http://forums.shopify.com/categories/2/posts/29259
var getOrdinal = function(n) {
var s=["th","st","nd","rd"],
v=n%100;
return n+(s[(v-20)%10]||s[v]||s[0]);
}