Some snippets which are used by me.
- aka DC-Classes
- for tech. background and notes see gist mpj/classless.md
- my implementation
- inheritance example
- static methods example
npx serve [path]
- Import non-ESM libraries in ES Modules, with client-side vanilla JS – Lea Verou
- Lze importovat i
import "data:text/javascript,self.foo = 1"; document.body.textContent = self.foo;
;-)
- Responsive Web Design: Beyond Media Queries
- Responsible tables
- Stylus modularization test
- CSS variables / Something like mixins in CSS
- Hot tips CSS
filter: drop-shadow
- Even More CSS Secrets (Lea Verou)
This is in-browser JavaScript code which provide possibility to quick get information from Trello dashboard.
It was tested mainly on Firefox.
The Classes_GetTrelloStuff implementation is necessary pasted to browser console. The class has now two methods "toJSON" and "toMarkdown" (primary for GitHub).
The class allow to decide which cols schould be exported. In constructor use param "col_list_min" (indexing starts by 0) and "col_list_max" (the same as "col_list_min" or string like "rest" which represents rest cols).
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
/* | |
Final results 3 x test(258) + 3 x test(NodeList(length=258)) - Android7 WebView | |
Original: for 3x faster than forEach and 10% times is quicker | |
$iterable2=for inside function | |
Own vs for (only $iterable2 make sence): for 0.9x slower than $iterable2 and quicker in 3/10 vs 3.333/10 | |
=== All Results - Average === | |
Delays: [394.3333333333333, 43.166666666666664, 150.66666666666666, 38.333333333333336] | |
Winners: ["2.5times", "3times", "2times", "3.3333333333333335times"] |
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
// Based on a gist by @rwaldron | |
// https://gist.github.com/2897761 | |
function privatize() { | |
var map = new WeakMap(); | |
return function private(obj) { | |
var data = map.get(obj); | |
if (!data) { | |
map.set(obj, data = {}); | |
} |
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
/* jshint esversion: 6,-W097, -W040, browser: true, expr: true, undef: true, devel: true */ | |
/** | |
* Event info shared across multiple `publish` calls (e. g. topic name). | |
* | |
* @typedef pubsub_TopicInfo | |
* @property {string} [name] Event name/identification. | |
* */ | |
/** | |
* Topic(s) options and topic **refence** to be used in subscribe/publish/… functions. | |
* |
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
/* jshint esversion: 6,-W097, -W040, node: true, expr: true, undef: true */ | |
const /* utils */ | |
{ max, round }= Math, | |
{ spawn }= require('child_process'), | |
{ writeFileSync, readFileSync }= require("fs"); | |
const /* runtime arguments and cwd */ | |
[ cmd, ...cmd_arguments ]= process.argv.slice(2), | |
cwd= process.cwd(); | |
let iteration= -1; | |
const /* animation */ |
OlderNewer