Deriving a new Array from an existing Array:
['■','●','▲'].slice(1, 3) ⟼ ['●','▲']
['■','●','■'].filter(x => x==='■') ⟼ ['■','■']
['▲','●'].map(x => x+x) ⟼ ['▲▲','●●']
['▲','●'].flatMap(x => [x,x]) ⟼ ['▲','▲','●','●']
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.TL;DR enough of this kind of nonsense
I've been in the field for ~20 years and started as BE developer, and this is a reference for people thinking that because they are on the BE side, they're somehow entitled to:
/** | |
* We use this workaround to detect the Chromecast device generation. | |
* Unfortunately the Cast Application Framework (CAF) does not have an API for that. | |
* | |
* cc-1: Chromecast 1st Gen. | |
* cc-2: Chromecast 2nd Gen. | |
* cc-3: Chromecast 3rd Gen. | |
* cc-ultra: Chromecast Ultra | |
* cc-builtin: Android TV with Chromecast built-in | |
*/ |
Browser | ES2017 | ES5 | runtime polyfills |
---|---|---|---|
Chrome 64+ | ✅ | ||
Firefox 57+ | ✅ | ||
Opera 42+ | ✅ | ||
Edge 15+ | ✅ | ||
iOS/Safari 11+ | ✅ | ||
Chrome 54-63 | ✅ | ||
Firefox 48-56 | ✅ | ||
Opera 41 | ✅ |
// create a bookmark and use this code as the URL, you can now toggle the css on/off | |
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
javascript: (function() { | |
var elements = document.body.getElementsByTagName('*'); | |
var items = []; | |
for (var i = 0; i < elements.length; i++) { | |
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
items.push(elements[i]); | |
} | |
} |
by Tatiana Mac
Last updated 14 April 2021
As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.
😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.
''' | |
Based on https://gist.github.com/enjalot/2904124 (in Python 2) -> quick-migrated to Python 3 | |
Usage: python server-cors | |
''' | |
import http.server as httpserver | |
class CORSHTTPRequestHandler(httpserver.SimpleHTTPRequestHandler): | |
def send_head(self): | |
"""Common code for GET and HEAD commands. |
Данный FAQ был специально создан для телеграм сообщества https://t.me/WebAssembly_ru.
Он базируется на статье от Andre Weissflog, но так же содержит множество моих дополнений и мыслей, которые могут быть уже не слишком актуальны на момент прочтения. Прошу это учитывать.