Moved here: https://github.com/maranomynet/mithril-mu
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
/* | |
* jQuery UI Autocomplete HTML Extension | |
* | |
* Copyright 2010, Scott González (http://scottgonzalez.com) | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* | |
* http://github.com/scottgonzalez/jquery-ui-extensions | |
*/ | |
(function( $ ) { |
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
// returns a throttled function that never runs more than every `delay` milliseconds | |
// the returned function also has a nice .finish() method. | |
$.throttleFn = function (func, skipFirst, delay) { | |
if ( typeof skipFirst === 'number' ) | |
{ | |
delay = skipFirst; | |
skipFirst = false; | |
} | |
delay = delay || 50; | |
var throttled = 0, |
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
/* | |
array.sortISL.js -- (c) 2014 Hugsmiðjan ehf. - MIT/GPL | |
Written by Már Örlygsson - http://mar.anomy.net | |
Original at: https://gist.github.com/maranomynet/9972930 | |
Install via npm: | |
npm install gist:9972930 | |
Use with CommonJS: |
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
// https://gist.github.com/maranomynet/b3070a9aa08219566508 | |
var _sortRoutes = function ( routes ) { | |
var sortedRoutes = {}; | |
var tokens = {}; | |
var tokenize = function (str) { | |
var token = tokens[str]; | |
if ( token == null ) | |
{ | |
token = tokens[str] = str | |
// Sort order: ? < n < s < v < … |
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
// Usage: | |
// 1. Visit http://www.thisamericanlife.org/radio-archives | |
// 2. Paste this script into the developer console of your browser. | |
// 3. Wait... | |
// 4. Copy-paste the resulting XML into a file. | |
// | |
(function(){ | |
var jQuery = window.jQuery; | |
var doc = document; |
Copy of Tryggvi's Flow Examples gist demonstrating the Flow omment syntax (and one bug in flow)
Type comments. Bug fixed:
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
export default function isValidKennitala(kt) { | |
// Trim and remove optional "-" or " " separators | |
kt = kt.trim().replace(/\s|-/, ''); | |
// Alternatively only allow separator as 7th character | |
// kt = kt.replace(/^(.{6})[\s-]/, '$1'); | |
// Must be 10 digits, ending in either 0 or 9 (note Y2.1k problem!) | |
if ( kt.length !== 10 && !/^\d{9}[90]$/.test(kt) ) { | |
return false; | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer