A simple script to run asynchronous tasks with auto. Alternative to async.auto
npm i -S gist:bf5ff86a2a20f88f3b327872427598ab
{ | |
"id": "/reka-chat", | |
"name": "Reka.AI chat", | |
"short_name": "Reka.AI chat", | |
"description": "Chat with Reka", | |
"categories": ["utilities"], | |
"orientation": "portrait", | |
"display": "standalone", | |
"start_url": "https://chat.reka.ai/chat", | |
"scope": "https://chat.reka.ai/chat", |
{ | |
"id": "/lmsysChat", | |
"name": "LMSYS chat", | |
"short_name": "LMSYS chat", | |
"description": "Chat with Open Large Language Models", | |
"categories": [ | |
"utilities" | |
], | |
"orientation": "portrait", | |
"display": "standalone", |
{ | |
"id": "/c4ai-command-r-plus", | |
"name": "C4ai chat", | |
"short_name": "C4ai chat", | |
"description": "Chat c4ai-command-r-plus", | |
"categories": ["utilities"], | |
"orientation": "portrait", | |
"display": "standalone", | |
"start_url": "https://cohereforai-c4ai-command-r-plus.hf.space/", | |
"scope": "https://cohereforai-c4ai-command-r-plus.hf.space/", |
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; |