Skip to content

Instantly share code, notes, and snippets.

View tony-0tis's full-sized avatar
📈
Lets grow

Tony Outis tony-0tis

📈
Lets grow
View GitHub Profile
@tony-0tis
tony-0tis / README.md
Last active June 24, 2024 10:01
A simple script to run asynchronous tasks with auto. Alternative to async.auto

0tis-autotasks

A simple script to run asynchronous tasks with auto. Alternative to async.auto

Install

npm i -S gist:bf5ff86a2a20f88f3b327872427598ab
@tony-0tis
tony-0tis / EventEmitter.mjs
Last active June 24, 2024 10:01
Simple es6 eventEmitter
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){
@tony-0tis
tony-0tis / README.md
Last active June 24, 2024 10:00
A simple script to run asynchronous tasks sequentially. Alternative to async.waterfall

0tis-waterfall

A simple script to run asynchronous tasks sequentially. Alternative to async.waterfall

Install

npm i -S gist:81cb708f0ef01ed2d3ecf6e6aae43013
@tony-0tis
tony-0tis / MultyLinesProcessLoader.mjs
Last active June 24, 2024 10:02
js module for load indication
import EventsEmitter from "0tis-eventemitter";
class MultyLinesProcessLoader extends EventsEmitter{
defaultOptions = {
el: null,
width: 150,
height: 150,
count: 8,
indent: 6,
textSize: '20px',
@tony-0tis
tony-0tis / README.md
Last active June 24, 2024 10:02
UUID generator provides good uniqueness guarantees

0tis-uuid4

UUID generator provides good uniqueness guarantees

Install

npm i -S gist:816bc579e30c134e388478ca36ece750
@tony-0tis
tony-0tis / youtube-langs-sort.js
Last active May 8, 2023 15:53
Youtube. Move your lang to top of the list of translate languages
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]
@tony-0tis
tony-0tis / example.com.conf
Last active March 1, 2022 19:34
Nginx SSL parameters for A+ rating on https://www.ssllabs.com/ with letsencrypt
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;
@tony-0tis
tony-0tis / .profile
Last active March 23, 2023 09:12
Short git aliases for .profile or .bashrc or .bash_profile or /etc/bash_profile
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'
@tony-0tis
tony-0tis / yandexIpRoutesWindows.bat
Last active April 12, 2019 18:42
Add\remove Yandex ranges ip's into\from windows ip routing table. Might be useful if you using foreign VPN(in Russia) and listening to the Yandex music.
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