Skip to content

Instantly share code, notes, and snippets.

View patrickml's full-sized avatar

Patrick Lewis patrickml

View GitHub Profile
@patrickml
patrickml / Log.txt
Created April 22, 2016 20:51
MeteorJS Application Production Build Time - 4/22/16
START CAPTURE 0 undefined took NaN
| (#1) Profiling: ProjectContext prepareProjectForBuild
START 1 preparing project
START 2 reading project metadata
DONE 2 reading project metadata took 9
START CAPTURE 2 undefined took NaN
START 3 scanning local packages
START 4 looking for packages
DONE 4 looking for packages took 13
START 4 initializing packages

Breath

So you are taking on the adventure of creating your first real hackathon experiment, a blood pressure monitor. You have decided to use Meteor JS for you're contribution to the system, the web ui, great choice! I know you will do well. Here are some quick tips and thoughts in order to help bring your blood pressure down. Nothing in this tip list is rock solid, meaning you don't need to follow every bit down to the end. You can write your application how ever you want, just breath, think about what your objective is and let the code flow.

const ProxyStore = (values={}, options={}) => new Proxy(
{
__registry: {},
subscribe: function(key, fn) {
this.__registry[key] = [...(this.__registry[key] || []), fn];
},
unsubscribe: function(key, fn) {
this.__registry[key] = this.__registry[key].filter(fn);
},
...values,
@patrickml
patrickml / javascript.filters.js
Created April 22, 2022 11:18
Javascript Remove Matching Objects from list with .filter()
/**
Problem Statement
Javascript does not have a built in function that removes objects {} from an array with negitive conditions i.e. !=
*/
/* Example of problem */
const myArray = [ { a: 'b', 'b': 'c' }, { a: 'b', 'b': 'd' }];
const filter = { a: 'b', b: 'c'}