I hereby claim:
- I am ilyaigpetrov on github.
- I am ilyaigpetrov (https://keybase.io/ilyaigpetrov) on keybase.
- I have a public key whose fingerprint is 7EF4 ED7C 6C9E 54A5 F1FE 74F0 B7E2 70A4 199F 1EC2
To claim this, I am signing this object:
const https = require('https') | |
/* | |
const argv = require('yargs') | |
.option('token', { | |
alias: 't', | |
describe: 'api token', | |
demand: true, | |
type: 'string', | |
}) |
I hereby claim:
To claim this, I am signing this object:
This document is a part of RPI0 review: https://git.io/ilyaigpetrov-rpi0.
$ kodi-standalone --version
18.2 Git:20190428-a94ccc8ba5 Media Center Kodi
Copyright (C) 2005-2018 Team Kodi - http://kodi.tv
$ lsb_release -a
No LSB modules are available.
# File: /etc/X11/xorg.conf.d/30-keyboard.conf | |
Section "InputClass" | |
Identifier "keyboard-all" | |
Driver "evdev" | |
Option "XkbLayout" "us,ru" | |
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll,compose:rwin,terminate:ctrl_alt_bksp" | |
MatchIsKeyboard "on" | |
EndSection |
Extension for handling requests according to lists added by user (e.g. lists may be hosted on github, npm -- any url will work. Maybe there even will be a special support for popular tabular data editors like google docs/spreadsheets).
The internal workings of the extension are based on PAC scripts.
You just click a specially formed url (e.g. request-kitchen.appspot.com/add-list=https://raw.github.com/foo/bar)
and extension hijacks your click and shows user a big WARNING page, e.g. "You are about to conceive a child by installing this list named 'POOP' which purpose is 'Throw some poops in your browser'. Are you sure?"
'use strict'; | |
(async function() { | |
const apiPrefix = 'https://matrix.org' | |
let access_token; | |
const myFetch = (url, { query, params } = { query: '&', params: {} }) => { |
This note/example shows 3 different ways of handling promise rejections in JavaScript.
Before we start you may want to refresh in your mind that:
.then(...)
takes two arguments: MDN..catch(...)
is a syntactic surgar around .then(...)
with two arguments: MDN.Exceptions that are thrown in the callbacks of then() and catch() are passed on to the next error handler, as rejections
Short link: https://git.io/hapi-style
npm install --save-dev eslint
npm install --save-dev eslint-plugin-hapi
npm install --save-dev eslint-config-hapi
vim .eslintrc.json
{
$ time node --expose-gc --trace-gc --trace-gc-verbose for-nodejs.js 13231 | |
[1776:0x3153a50] Heap growing factor 4.0 based on mu=0.970, speed_ratio=-nan (gc=0, mutator=0) | |
[1776:0x3153a50] Grow: old size: 3897 KB, new limit: 16598 KB (4.0) | |
[1776:0x3153a50] 145 ms: Mark-sweep 4.7 (10.8) -> 4.3 (11.8) MB, 11.6 / 0.0 ms Isolate::RequestGarbageCollection GC in old space requested | |
[1776:0x3153a50] Memory allocator, used: 12068 KB, available: 1454300 KB | |
[1776:0x3153a50] New space, used: 534 KB, available: 473 KB, committed: 2048 KB | |
[1776:0x3153a50] Old space, used: 1219 KB, available: 0 KB, committed: 1944 KB | |
[1776:0x3153a50] Code space, used: 738 KB, available: 0 KB, committed: 2048 KB | |
[1776:0x3153a50] Map space, used: 131 KB, available: 0 KB, committed: 1108 KB | |
[1776:0x3153a50] Large object space, used: 1807 KB, available: 1453259 KB, committed: 1848 KB |