@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).
Here we go with the explanations:
(function(x, f = () => x) {
{ | |
"devDependencies": { | |
"better-npm-run": "~0.0.1" | |
}, | |
"scripts": { | |
"build:dist": "better-npm-run build:dist", | |
"test": "better-npm-run test" | |
}, | |
"betterScripts": { | |
"build:dist": { |
{ | |
"scripts": { | |
"build": "./scripts/build", | |
"test": "./scripts/test" | |
} | |
} |
#add script to .oh-my-zsh/lib/functions.zsh | |
function rm () { | |
local path | |
for path in "$@"; do | |
# ignore any arguments | |
if [[ "$path" = -* ]]; then : | |
else | |
local dst=${path##*/} | |
# append the time if necessary |
@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).
Here we go with the explanations:
(function(x, f = () => x) {
function nonCoercible(val) { | |
if (val == null) { | |
throw TypeError('nonCoercible shouldn\'t be called with null or undefined'); | |
} | |
const res = Object(val); | |
res[Symbol.toPrimitive] = () => { | |
throw TypeError('Trying to coerce non-coercible object'); | |
} | |
return res; | |
}; |
#!/usr/bin/env zsh | |
# zsh-async is required: | |
# https://github.com/mafredri/zsh-async | |
source $PWD/async.zsh | |
async_init | |
# cache variable | |
typeset -Ag prompt_data |
I hereby claim:
To claim this, I am signing this object:
System: HassOS 3.13 (armv7 / raspberrypi4) | |
Home Assistant Core: 0.109.6 | |
Home Assistant Supervisor: 222 | |
----------------------------------------------------------- | |
Please, share the above information when looking for help | |
or support in, e.g., GitHub, forums or the Discord chat. | |
----------------------------------------------------------- | |
[cont-init.d] 00-banner.sh: exited 0. | |
[cont-init.d] 01-log-level.sh: executing... | |
Log level is set to DEBUG |
connection.id: my-network | |
connection.uuid: d667788a-27b8-403e-b369-087868ba0102 | |
connection.stable-id: -- | |
connection.type: 802-11-wireless | |
connection.interface-name: -- | |
connection.autoconnect: yes | |
connection.autoconnect-priority: 0 | |
connection.autoconnect-retries: -1 (default) | |
connection.multi-connect: 0 (default) | |
connection.auth-retries: -1 |
hmarochos.kiev.ua##.mainPageAdvRightBlock | |
hmarochos.kiev.ua###donate | |
hmarochos.kiev.ua##.lybidbanner | |
hmarochos.kiev.ua###enhancedtextwidget-14 | |
hmarochos.kiev.ua##.bannernews | |
hmarochos.kiev.ua###hmarochos_logo_bw | |
pravda.com.ua##.container_sub_adv_content |