Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Working for @wix

Denys Dovhan denysdovhan

👨‍💻
Working for @wix
View GitHub Profile
View filtering-rules.txt
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
View gist:b5d8630564205ca7edf300f9fa63929b
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
View ad-guard.log
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
View keybase.md

Keybase proof

I hereby claim:

  • I am denysdovhan on github.
  • I am denysdovhan (https://keybase.io/denysdovhan) on keybase.
  • I have a public key ASAsVrM0k1lbh4HVegGJDnrOF7f6kfTjsncP0eSX55Taxwo

To claim this, I am signing this object:

@denysdovhan
denysdovhan / async-prompt.zsh
Last active Dec 18, 2019
Async prompt examples for Spaceship ZSH (zsh-async is required: https://github.com/mafredri/zsh-async)
View async-prompt.zsh
#!/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
@denysdovhan
denysdovhan / noncoercible.js
Created Feb 18, 2017 — forked from chicoxyzzy/noncoercible.js
Non-coercible objects
View noncoercible.js
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;
};
View kangax-es6-quiz-explained.md

@kangax's ES6 quiz, explained

@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:

Question 1:
(function(x, f = () => x) {
@denysdovhan
denysdovhan / gist:0080d1bdcf5a43d19265e3b7225618f1
Created Sep 13, 2016 — forked from aqualungdesign/gist:4612606
iterm / oh-my-zsh -> rm move to .trash
View gist:0080d1bdcf5a43d19265e3b7225618f1
#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
View package.json
{
"scripts": {
"build": "./scripts/build",
"test": "./scripts/test"
}
}
View package.json
{
"devDependencies": {
"better-npm-run": "~0.0.1"
},
"scripts": {
"build:dist": "better-npm-run build:dist",
"test": "better-npm-run test"
},
"betterScripts": {
"build:dist": {