Skip to content

Instantly share code, notes, and snippets.


Jim Montgomery jimmont

View GitHub Profile
spiralx / computed-property.js
Created Jan 26, 2016
Use ES6 Proxy to attach computed properties
View computed-property.js
'use strict';
const VALUE = Symbol.for('value')
function addComputedProperty(obj, name, func) {
let _computed = func(obj)
return new Proxy(obj, {
get(target, key, receiver) {
if (key === name) {
paulmillr /
Created Dec 22, 2015
Turn off spy cams in airbnb rentals
# Detect and Disconnect the DropCam and Withings devices some people are using to
# spy on guests in their home, especially in AirBnB rentals. Based on
# This script was named by Adam Harvey (, who also
davestevens /
Last active Dec 22, 2020
Let’s Encrypt setup for Apache, NGINX & Node.js

Let's Encrypt

Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.

Obtain certificates

I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running

git clone
cd letsencrypt
View css-system-fonts.css
/* */
font-family: -apple-system, ".SFNSText-Regular", "San Francisco", "Oxygen", "Ubuntu", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
paulirish /
Last active Jan 16, 2021
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
ebidel / object-observe-proxy-polyfill.js
Last active Dec 17, 2020
Object.observe() polyfill using ES6 Proxies (POC)
View object-observe-proxy-polyfill.js
// An `Object.observe()` "polyfill" using ES6 Proxies.
// Current `Object.observe()` polyfills [1] rely on polling
// to watch for property changes. Proxies can do one better by
// observing property changes to an object without the need for
// polling.
// Known limitations of this technique:
// 1. the call signature of `Object.observe()` will return the proxy
// object. The original object needs to be overwritten with this return value.
mbbx6spp / ALTERNATIVES.adoc
Last active Jan 15, 2021
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
remy / peek.js
Last active Aug 29, 2015
Is this okay? The peek will just act as a benign through stream letting us see the first item. Would this add much overhead to the time do you think?
View peek.js
var peek = module.exports = function (fn) {
var peeked = false;
return through(function write(data) {
this.emit('data', data);
if (peeked) {
peeked = true;
var stream = this;
var cont = function (end) {
hallahan /
Last active May 8, 2016
I'm going through the code execution of `featuresAt` in Mapbox GL JS. This is to take notes and understand how all of this works.

How FeaturesAt Works in MapboxGL JS

I'm going through the code execution of featuresAt in Mapbox GL JS. This is to take notes and understand how all of this works.


Initiating the feature search based on the example on Mapbox GL API Docs...

map.on('click', function(e) {
View es6mixin.js
var Bar1 = base => class extends base {
var Bar2 = base => class extends base {
You can’t perform that action at this time.