If you are using this already, consider changes soon due the discussion around current ESX proposal.
Feel free to keep an eye on udomsay as that will be the implementation reference for consumers.
// now an npm package qith 100% code coverage: | |
// https://github.com/WebReflection/endow#endow--- | |
// (c) Andrea Giammarchi, @WebReflection (ISC) | |
const mix = Super => ({ | |
with: (...mixins) => | |
mixins.reduce( | |
(Class, Mixin) => { | |
Class = Mixin(Class); | |
if (!Mixin.hasOwnProperty(Symbol.hasInstance)) { |
If you are using this already, consider changes soon due the discussion around current ESX proposal.
Feel free to keep an eye on udomsay as that will be the implementation reference for consumers.
This gist summarizes the handleEvent(event)
pattern features, something standard, something described by me many times, written in my tiny book, tweeted about, and yet it's something most Web developers ignore.
┌---------------------------------┐
var handler = { | any object that inherits or |
Save this file as ai2svg
, make it executable via chmod +x ai2svg
then run it optionally passing the folder to look for.
It will convert in that folder, or the current one, all .ai files into .svg
#!/usr/bin/bash
createsvg() {
local margin="$1"
local d
If you're OK in having a node-esm
executable, please consider this solution.
#!/usr/bin/env sh
# the /usr/local/bin/node-esm executable
input_file=$1
shift
exec node --input-type=module - $@ <$input_file
Photo by Ricardo Gomez Angel on Unsplash
This gist is a collection of common patterns I've personally used here and there with Custom Elements.
These patterns are all basic suggestions that could be improved, enriched, readapted, accordingly with your needs.
a gist to recap the current status, also available as library picker!
do one thing only and do it well
Coming from this post, the solution is very simple and doesn't need jQuery.
This is the function that will disable multiple submits to any form that has such attribute
function disableMultipleSubmits() { // by Andrea Giammarchi - WTFPL
Array.prototype.forEach.call(
document.querySelectorAll('form[disablemultiplesubmits]'),
function (form) {
form.addEventListener('submit', this, true);
This is a personal reminder about few things I need to remember wheneve I install the most basic Gnome on ArchLinux.
bash <(curl -s https://archibold.io/install/gnome)
This will install automatically pamac-aur
, Firefox
, and many other common software so that the rest of this document could be ignore.
A very simple comparison table between these two libraries.
uce | lit-element | |
---|---|---|
version | 1.11.9 | 2.4.0 |
license | ISC (simplified MIT) | BSD-3-Clause License |
language | JS w/ TS definition | TS w/ JS transpilation |
size ( brotli ) | 9437b ES5 / 6811b ES2015+ | 8634b ES5 / 6708b ES2015+ |