Skip to content

Instantly share code, notes, and snippets.

@hyle
hyle / ko.utils.signatures.js
Last active May 14, 2022 21:15
KnockoutJS utils (ko.utils) signatures
// knockout 2.2.1
ko.utils.arrayFilter = function (array, predicate) { /* .. */ }
ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ }
ko.utils.arrayForEach = function (array, action) { /* .. */ }
ko.utils.arrayGetDistinctValues = function (array) { /* .. */ }
@hyle
hyle / getagist.py
Created July 30, 2011 18:50
fetch files from a public gist
#!/usr/bin/env python
__license__ = 'http://www.opensource.org/licenses/mit-license.php (MIT)'
__author__ = 'Andrea Baresi'
from urllib2 import Request, urlopen
import sys
import json
METADATA_URL = 'http://gist.github.com/api/v1/json/%s'