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
| // geo-location shim | |
| // currentely only serves lat/long | |
| // depends on jQuery | |
| // doublecheck the ClientLocation results because it may returning null results | |
| ;(function(geolocation){ | |
| if (geolocation) return; |
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
| !function() { | |
| var doc = document, | |
| htm = doc.documentElement, | |
| lct = null, // last click target | |
| nearest = function(elm, tag) { | |
| while (elm && elm.nodeName != tag) { | |
| elm = elm.parentNode; | |
| } | |
| return elm; | |
| }; |
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
| // find out what prefix this browser supports. | |
| // usage: gimmePrefix('transform') // 'WebkitTransform' | |
| // returns false if unsupported. | |
| function gimmePrefix(prop){ | |
| var prefixes = ['Moz','Khtml','Webkit','O','ms'], | |
| elem = document.createElement('div'), | |
| upper = prop.charAt(0).toUpperCase() + prop.slice(1); |
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
| /*! | |
| * isVis - v0.5.5 Aug 2011 - Page Visibility API Polyfill | |
| * Copyright (c) 2011 Addy Osmani | |
| * Dual licensed under the MIT and GPL licenses. | |
| */ | |
| (function () { | |
| window.visibly = { | |
| b: null, | |
| q: document, |
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
| { | |
| "ad": [ | |
| "42.5000", | |
| "1.5000" | |
| ], | |
| "ae": [ | |
| "24.0000", | |
| "54.0000" | |
| ], | |
| "af": [ |
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
| // Combine Latest | |
| var obs1 = Rx.Observable.returnValue(1), | |
| obs2 = Rx.Observable.returnValue(2), | |
| obs3 = Rx.Observable.returnValue(3); | |
| // From Observable with splat | |
| Rx.Observable.combineLatest(obs1, obs2, obs3, function(o1, o2, o3) { | |
| return o1 + o2 + o3; | |
| }).subscribe(function(result) { | |
| console.log(result); // 6 |
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
| /* | |
| * Minimal classList shim for IE 9 | |
| * By Devon Govett | |
| * MIT LICENSE | |
| */ | |
| if (!("classList" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') { | |
| Object.defineProperty(HTMLElement.prototype, 'classList', { | |
| get: 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
| #!/usr/bin/env ruby -w | |
| # brew-services(1) - Easily start and stop formulas via launchctl | |
| # =============================================================== | |
| # | |
| # ## SYNOPSIS | |
| # | |
| # [<sudo>] `brew services` `list`<br> | |
| # [<sudo>] `brew services` `restart` <formula><br> | |
| # [<sudo>] `brew services` `start` <formula> [<plist>]<br> |
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
| // Lists of countries with ISO 3166 codes, presented in various formats. | |
| // Last Updated: July 30, 2020 | |
| // If you're using PHP, I suggest checking out: | |
| // https://github.com/thephpleague/iso3166 | |
| // or Laravel: https://github.com/squirephp/squire | |
| // | |
| // JS developers can check out: | |
| // https://www.npmjs.com/package/iso3166-2-db | |
| // |
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
| // Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
| // Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
| var FORMAT_ONELINE = 'One-line'; | |
| var FORMAT_MULTILINE = 'Multi-line'; | |
| var FORMAT_PRETTY = 'Pretty'; | |
| var LANGUAGE_JS = 'JavaScript'; | |
| var LANGUAGE_PYTHON = 'Python'; |
OlderNewer