Skip to content

Instantly share code, notes, and snippets.

Avatar

Kris Borchers kborchers

  • Microsoft
  • Dallas, TX
View GitHub Profile
View gist:40dd6b6a34f69450e473
<style> blockquote { border-left: none; color: inherit; } </style>

JQUERY FOUNDATION, INC.

SECOND AMENDED BYLAWS

EFFECTIVE AS OF: _____________, 2014

View paging-usage-comparison.md

AbstractPageRequestHandler.java

abstact class AbstractPageRequestHandler() {
    public List<Pair<String, String>>  getPagingHeaders(ReadFilter filter){
       List<Pair<String, String>> toReturn = new ArrayList<>();
       return toReturn;
    }
    
    public byte[] appendToBody(ReadFilter filter, byte[] body){
      return body;
View paging-usage-comparison.md

Below is a comparison of the method usage proposed by each lib for handling paged resources.

AG-Controller Pipe Setup

Android

iOS

View gist:4164763
var pipeline = AeroGear.Pipeline({
name:"capitals",
recordId: "name",
settings:{
baseURL:'/rs/'
}
});
var capitals = pipeline.pipes['capitals'];
@kborchers
kborchers / gist:3833435
Created Oct 4, 2012 — forked from matzew/gist:3832056
FAQ or Wiki or ...
View gist:3833435
  • What is a pipeline ?

A pipeline represents a set of n connections to a server. The pipeline class offers some simple 'management' APIs to work with containing 'pipe' objects. Basically it allows you to add or remove new connections to the pipeline.

  • What is a pipe ?

A pipe represents one connection to a server. The pipe API is basically an abstraction layer for any server side connection, which all allows you to simply 'read' from, or 'write' to a server connection. However, technical details like RESTful APIs (e.g. HTTP PUT or HTTT GET) are not exposed on the pipeline and pipe APIs. In the future you can have different type of pipe objects (-> connections). The default (and CURRENTLY only supported) type is a REST connection.

Below is an example from our JavaScript lib:

View gist:2763581
jQuery.noConflict();
(function($) {
$(function() {
setInterval( "slideSwitch()", 5000 );
});
})(jQuery);
View github-pull-request-number.user.js
// ==UserScript==
// @name GitHub - Show pull request numbers
// @match https://github.com/*/*/pulls
// @match https://github.com/*/*/pulls/*
// ==/UserScript==
[].slice.call( document.querySelectorAll( ".listings h3" ) ).forEach(function( elem ) {
var anchor = elem.getElementsByTagName( "a" )[ 0 ],
id = anchor.href.match( /(\d+)$/ )[ 0 ],
span = document.createElement( "span" ),
@kborchers
kborchers / LICENSE.txt
Created Sep 28, 2011 — forked from p01/LICENSE.txt
Sudoku Solver in 140bytes
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri <http://www.p01.org/releases/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE