Skip to content

Instantly share code, notes, and snippets.

View marcelklehr's full-sized avatar

Marcel Klehr marcelklehr

View GitHub Profile
@marcelklehr
marcelklehr / philosophy.js
Created November 21, 2021 15:29
Philosophy in a nutshell
const adjectives = [
'predictive',
'symbolic',
'abstract',
'performative',
'demonstrative',
'destructive',
'constructive',
'implicit',
'explicit',
@marcelklehr
marcelklehr / mock-everything.js
Last active July 27, 2021 18:44
mock-everything.js
const mock = new Proxy(() => mock, {
get: (target, prop) => {
if (
prop === 'valueOf' ||
prop === 'toString' ||
prop === Symbol.toPrimitive
) {
return () => '';
}
return mock
{"0":{"type": "line", "x":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,1,-1,-3,-5,-5,-9,-13,-14,-17,-20,-23,-26,-29,-31,-32,-33,-34,-36,-31,-26,-21,-16,-11,-6,-1,4,9,14,19,24,25,29,33,37,41,43,47,51,55,59,59,63,67,71,72,75,78,81,84,87,90,93,96,99,102,105,108,111,114,117,120,123,126,129,132,135,138,141,144,147,150,156,152,148,144,140,136,135,131,127,123,122,117,112,107,102,97,93,84,75,66,57,48,39,30,21,12,3,-6,-15,-24,-33,-42,-51,-60,-69,-78,-83,-90,-97,-104,-111,-118,-121,-124,-127,-130,-131,-135,-139,-143,-147,-151,-155,-159,-163,-163,-170,-177,-184,-191,-193,-199,-205,-211,-217,-218,-219,-220,-221,-222,-223,-222,-221,-220,-219,-214,-209,-204,-201,-196,-191,-186,-181,-176,-171,-166,-161,-156,-151,-146,-141,-136,-131,-134,-126,-118,-110,-106,-98,-90,-82,-74,-66,-58,-50,-42,-34,-25,-19,-13,-7,-1,5,9,15,21,27,33,39,45,51,57,59,59,59,59,59,58,58,54,53,51,49,47,46,41,36,31,28,24,20,19,14,9,8,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,16],"y":[0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-
@marcelklehr
marcelklehr / AudioResponseView.vue
Last active May 6, 2020 22:29
Magpie in Vue.js
<template>
<View @mousemove="mouseMove">
<template slot:content="{nextView, response}">
<div class="top-left" @mouseover="hoverFish">fish</div>
<div class="top-right" @mouseover="hoverMammal">mammal</div>
<button v-if="isButtonVisible" @click="clickButton"></button>
<audio src="example.wav" playing="isPlaying" />
</template>
</view>
</template>
@marcelklehr
marcelklehr / index.json
Last active December 9, 2023 18:46
Floccus benchmark stats
This file has been truncated, but you can view the full file.
{"a103f80654a02abb60355e39c3c30cba61c36af3":{"fake test firefox nc@20 bm@stable":{"testSuiteTime":0.18333333333333332},"fake-noCache test firefox nc@20 bm@stable":{"testSuiteTime":0.13333333333333333},"fake benchmark root firefox nc@20 bm@stable":{"testSuiteTime":5.2},"webdav test firefox nc@20 bm@stable":{"testSuiteTime":9.516666666666667},"webdav benchmark root firefox nc@20 bm@stable":{"testSuiteTime":14.4},"google-drive benchmark root firefox nc@20 bm@stable":{"testSuiteTime":22.633333333333333},"nextcloud-bookmarks-old test firefox nc@20 bm@stable":{"testSuiteTime":24.066666666666666},"nextcloud-bookmarks test firefox nc@17 bm@v1.1.2":{"testSuiteTime":42.9},"nextcloud-bookmarks test firefox nc@18 bm@stable3":{"testSuiteTime":45.63333333333333},"nextcloud-bookmarks test firefox nc@20 bm@master":{"testSuiteTime":47.43333333333333},"nextcloud-bookmarks test firefox nc@19 bm@stable3":{"testSuiteTime":47.38333333333333},"nextcloud-bookmarks test firefox nc@18 bm@v2.3.4":{"testSuiteTime":49.56666666666667},"ne
const completable = {
_: 'pending',
pending: {
on: {
COMPLETE: 'completed'
}
},
completed: {
on: {
REASSIGN: 'pending'
@marcelklehr
marcelklehr / createDummyBookmarks.js
Last active May 13, 2018 22:08
Create 30,000 dummy bookmarks neatly organized into a hierarchy of folders. useful for testing. Or for frying your devices. (DON'T DO THIS AT HOME!)
function tree(start, end, indent) {
if (!indent) indent = ''
if (end-start <= 5) {
for (var i=start; i < end; i++) {
console.log(indent+'<DT><A HREF="http://url'+i+'.net/" TAGS="tag'+ (i % 100) +'">Description '+i+'</A>')
}
return
}
var step = Math.round((end-start) / 5)
for (var i=start; i < end; i+=step) {
@marcelklehr
marcelklehr / npm-cli.js
Created July 30, 2016 16:31
Nodist's umbrella against the WebStorm.
/**
This is a shim for the npm binary shim of Nodist.
It exists, so that WebStorm is happy.
See https://github.com/marcelklehr/nodist/issues/158
Instructions:
1. Create the following directory: `Nodist\bin\bin`
2. Place this file in the new directory
*/
var child_process = require('child_process')
npm install
npm install is-color # Only installs is-color
npm install cldr-data # second level dep (of rxaviers-foo-bar)
npm install is-color # Installs is-color + re-installs cldr-data
@marcelklehr
marcelklehr / README.md
Last active July 10, 2017 05:39
gulf-contenteditable example

Simple gulf-contenteditable example

Clone this gist and open index.html in your browser.

git clone https://gist.github.com/marcelklehr/0430be7e3fb45a83189b.git

Check out the source in index.js.