Ensure that you have a WebGL-capable browser to view this gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install requests | |
| import requests | |
| import json | |
| url_template = 'https://api.foursquare.com/v2/users/self/checkins?limit=250&oauth_token={}&v=20131026&offset={}' | |
| # If you navigate to https://developer.foursquare.com/docs/explore, Foursquare | |
| # will generate an OAuth token for you automatically. Cut and paste that token | |
| # below. | |
| token = "" |
From http://www.somethingorothersoft.com/2012/05/22/pulling-github-pull-requests-with-git/
Just execute the following commands and you'll be able to fetch all pull requests by simply executing git fetch pr. Pull requests will be stored in a remote as individual remote branches. So a pull request 123 will be accessible as 'pr/123':
git remote add pr https://github.com/upstream/repo.git
git config --local --unset remote.pr.fetch
git config --local --add remote.pr.fetch "+refs/pull/*/head:refs/remotes/pr/*"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require('gulp'), | |
| gutil = require('gulp-util'), | |
| sass = require('gulp-sass'), | |
| csso = require('gulp-csso'), | |
| uglify = require('gulp-uglify'), | |
| jade = require('gulp-jade'), | |
| concat = require('gulp-concat'), | |
| livereload = require('gulp-livereload'), // Livereload plugin needed: https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei | |
| tinylr = require('tiny-lr'), | |
| express = require('express'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require('gulp'), | |
| gutil = require('gulp-util'), | |
| stylus = require('gulp-stylus'), | |
| uglify = require('gulp-uglify'), | |
| jade = require('gulp-jade'), | |
| concat = require('gulp-concat'), | |
| livereload = require('gulp-livereload'), | |
| tinylr = require('tiny-lr'), | |
| express = require('express'), | |
| app = express(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Include gulp | |
| var gulp = require('gulp'), | |
| gutil = require('gulp-util'), | |
| sass = require('gulp-sass'), | |
| prefix = require('gulp-autoprefixer'), | |
| coffee = require('gulp-coffee'), | |
| coffeelint = require('gulp-coffeelint'), | |
| concat = require('gulp-concat'), | |
| plumber = require('gulp-plumber'), | |
| changed = require('gulp-changed'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface UIView (MPAdditions) | |
| @end | |
| @implementation UIView (MPAdditions) | |
| - (id)debugQuickLookObject { | |
| if (self.bounds.size.width < 0.0f || self.bounds.size.height < 0.0f) { | |
| return nil; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //! Chain macro in Rust | |
| //! | |
| //! A typical usage is to avoid nested match expressions. | |
| //! | |
| //! Supports: | |
| //! - Pattern matching | |
| //! - Or expressions (A | B => ...) | |
| //! - Guarded statements (x if <cond> => ...) | |
| //! - Implicit else (requires all arms to return same type) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol ISubscriber { | |
| typealias Element | |
| func disposable() -> RACCompoundDisposable | |
| func sendNext(e: Element) | |
| func sendError(e: NSError) | |
| func sendCompleted() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol Monad { | |
| typealias F | |
| typealias U | |
| class func bind<M : Monad where M.U == U>(Self, F -> M) -> M | |
| class func `return`(F) -> Self | |
| } | |
| extension Array : Monad { | |
| typealias F = T |