Skip to content

Instantly share code, notes, and snippets.

moving rectangles around browser windows

Nicolai Süper nicolaisueper

moving rectangles around browser windows
View GitHub Profile
ahtcx / deep-merge.js
Last active Oct 21, 2021
Deep-Merge JavaScript objects with ES6
View deep-merge.js
// ⚠ IMPORTANT: this is old and not doesn't work for many different edge cases but I'll keep it as-is for any of you who depend on it
// ⚠ IMPORTANT: you can find more robust versions in the comments or use a library implementation such as lodash's `merge`
// Merge a `source` object to a `target` recursively
const merge = (target, source) => {
// Iterate through `source` properties and if an `Object` set property to merge of `target` and `source` properties
for (const key of Object.keys(source)) {
if (source[key] instanceof Object) Object.assign(source[key], merge(target[key], source[key]))
mauriciosoares / doubleclick.js
Created Oct 19, 2015
rxjs double click example
View doubleclick.js
let clickStream = Rx.Observable.fromEvent(document.getElementById('link'), 'click');
.map(list => list.length)
.filter(x => x === 2)
.subscribe(() => {
phillipgreenii /
Last active Nov 10, 2021
Running NPM Scripts through maven

I am in the process of introducing single page applications to where I work. For development, using node based build tools is much easier for the single page applications. However, the build process for our organization is based upon maven. Our solution started with the maven plugin frontend-maven-plugin. It worked great at first, but then we ran into a situation that I couldn't make work with it.

As stated before, at our organization, we have the older ecosystem which is maven and the newer ecosystem which is node. Our goal was to keep the hacking to a minimum. We did this by putting all of the hacks into a single super node based build file. This is what maven calls and the reason frontend-maven-plugin wasn't sufficient. The super node based build script calls all of the other build scripts by spawning npm run. Try as I might, I could not figure out how to make the spawn work. front-end-maven-plugin downloads npm