A simple script to run asynchronous tasks with auto. Alternative to async.auto
npm i -S gist:bf5ff86a2a20f88f3b327872427598ab
class EventsEmitter { | |
constructor(){ | |
this.events = {}; | |
} | |
on(name, callback, context, once = false){ | |
if(name == null) throw new Error('No first argument passed'); | |
if(callback == null) throw new Error('No second argument passed'); | |
if(typeof callback !== 'function') throw new Error('Second argument must be a function'); | |
if(typeof context === 'boolean' && context === true && once === false){ |
import EventsEmitter from "0tis-eventemitter"; | |
class MultyLinesProcessLoader extends EventsEmitter{ | |
defaultOptions = { | |
el: null, | |
width: 150, | |
height: 150, | |
count: 8, | |
indent: 6, | |
textSize: '20px', |
let langToUp = 'Русский'; | |
settingsObserver = new MutationObserver((list, observer)=>{ | |
list.forEach(mutation=>{ | |
if(mutation.addedNodes.length){ | |
let node = [...mutation.addedNodes].find(node=>node.innerText.indexOf(langToUp)>-1); | |
if(node){ | |
setTimeout(()=>{ | |
let doc = document.querySelectorAll('.ytp-panel-menu')[0]; | |
if(!doc) return; | |
[...doc.children] |
server{ | |
#... | |
listen *:443 ssl http2; | |
listen [::]:443 ssl http2; | |
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot | |
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot | |
ssl_trusted_certificate /etc/letsencrypt/live/example.com/fullchain.pem; |
alias gs='git status ' | |
alias ga='git add ' | |
alias gap='git add --patch' | |
alias gaa='git add .' | |
alias gb='git branch ' | |
alias gba='git branch --all' | |
alias gbag='git branch --all | grep ' | |
alias gc='git commit' | |
alias gcm='git commit -m' | |
alias gacm='git commit -am' |
echo off | |
:: First change variables below | |
set ipv4router=no | |
set ipv6router=no | |
echo This script allow to add or remove routes into Windows ip routing table for Yandex services. If you using foreign VPN for example. | |
echo First change in code variables below, which you leave "no" will be skipped. | |
goto input |