Skip to content

Instantly share code, notes, and snippets.

View harboe's full-sized avatar

Dennis Harboe Christensen harboe

View GitHub Profile
@joelnet
joelnet / example.html
Created June 3, 2011 18:03
Unobtrusive Knockout support library for jQuery
Choose a ticket class: <select id="tickets"></select>
<p id="ticketOutput"></p>
<script id="ticketTemplate" type="text/x-jquery-tmpl">
{{if chosenTicket}}
You have chosen <b>${ chosenTicket().name }</b>
($${ chosenTicket().price })
<button data-bind="click: resetTicket">Clear</button>
{{/if}}
@andyedinborough
andyedinborough / jquery.oauth.js
Created June 7, 2011 19:30
Introduces $.oauth() to make using OAuth from jQuery as easy as using $.ajax()
(function (window, document, $, undefined) {
if (!$.Deferred) throw 'jQuery 1.5 is required to use the jQuery.oauth script!';
function require(name, url) {
if (window[name] === undefined)
return $.ajax({ type: 'GET', cache: true, dataType: 'script', url: url });
}
$.oauth = function (options) {
var d = $.Deferred();
@llavin
llavin / HashMapAdapter.java
Last active August 17, 2016 00:19
This is a generic hash map adapter that I made in a project for an android view.
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
public abstract class HashMapAdapter<K, V> extends BaseAdapter{