This file contains 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
const feature1 = { | |
"type": "Feature", | |
"geometry": { | |
"type": "Polygon", | |
"coordinates": [ | |
[ | |
[-85.42358091, 41.76872876], | |
[-85.42358054, 41.76871738], | |
[-85.42343269, 41.76871941], | |
[-85.42342892, 41.7687873], |
This file contains 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
#!/bin/sh | |
# extend non-HiDPI external display on DP* above HiDPI internal display eDP* | |
# see also https://wiki.archlinux.org/index.php/HiDPI | |
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949 | |
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319 | |
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1` | |
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1` | |
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'` |
This file contains 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
// Depends on lodash.cloneDeepWith | |
// This example assumes excludeKeys is an array | |
function omitDeep(collection, excludeKeys) { | |
function omitFn(value) { | |
if (value && typeof value === 'object') { | |
excludeKeys.forEach((key) => { | |
delete value[key]; |
This file contains 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($,sr){ | |
// debouncing function from John Hann | |
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ | |
var debounce = function (func, threshold, execAsap) { | |
var timeout; | |
return function debounced () { | |
var obj = this, args = arguments; | |
function delayed () { |
This file contains 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 ($, window) { | |
var intervals = {}; | |
var removeListener = function(selector) { | |
if (intervals[selector]) { | |
window.clearInterval(intervals[selector]); | |
intervals[selector] = null; | |
} |