Se hai cliccato lascia un TUO commento nel muro della vergogna
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
const {isArray} = Array; | |
const sync = async values => { | |
for (let {length} = values, i = 0; i < length; i++) { | |
const value = await values[i]; | |
values[i] = isArray(value) ? await sync(value) : value; | |
} | |
return values; | |
}; |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# memoize support for plone.subrequest subrequests. | |
# usage: | |
# >>> import ./memoize | |
# >>> from ./memoize import instance_memoize | |
# >>> @memoize.parent_request_memoize | |
# >>> def _results(self): | |
# >>> return "expensive calculation" | |
# >>> |
This file contains hidden or 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
function CopyButton({ value }) { | |
let [copied, setCopied] = React.useState(); | |
let hydrated = usePageIsHydrated(); | |
React.useEffect(() => { | |
let id = setTimeout(() => setCopied(false), 2000); | |
return () => clearTimeout(id); | |
}, [copied]); | |
return ( | |
<button |
uce vs lit-element
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+ |
This file contains hidden or 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
let currentColor = '#ebedf0'; | |
let clicking = false; | |
const boxes = document.querySelectorAll('.js-calendar-graph-svg rect'); | |
const graph = document.querySelector('.js-calendar-graph-svg'); | |
// code for switching the current color | |
function handleColorChange(e) { | |
const el = e.currentTarget; | |
currentColor = el.style['background-color']; | |
console.log(currentColor) |
This file contains hidden or 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
""" | |
LICENSE: MIT | |
Example of using unix socket in SOCK_DGRAM mode. | |
""" | |
import socket | |
import socketserver | |
import time |
a gist to recap the current status, also available as library picker!
do one thing only and do it well
- µhtml (HTML/SVG auto-keyed and manual keyed render)
- augmentor (hooks for anything)
- wickedElements (custom elements without custom elements ... wait, what?)
This file contains hidden or 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
#!/bin/bash | |
# | |
# Changes the wallpaper hourly and displays a projection of the earth with | |
# a semi-realistic rendered sunglight mapping. | |
# | |
# This script will download hourly the "World Sunlight Map" by die.net. | |
# You can choose the world_sunlight_wallpaper.jpg picture as background image for your Desktop. | |
# Gnome recognizes file changes and updates the background accordingly. | |
# | |
# See: |
NewerOlder