Scoped mutex with timeouts and transaction convenience wrapper
It uses vercel/ms package to parse timeout
npm i ms @types/ms
Use it anywhere you want to serialize your code:
Scoped mutex with timeouts and transaction convenience wrapper
It uses vercel/ms package to parse timeout
npm i ms @types/ms
Use it anywhere you want to serialize your code:
| // Функция форматирования поля для ввода валюты | |
| const setupCurrencyInput = (inputElement, options = {}) => { | |
| // Определение конфигурации с валютой, разделителями и прочими параметрами | |
| const config = { | |
| currency: '₽', // Символ валюты | |
| thousandsSeparator: ' ', // Разделитель тысяч | |
| decimalSeparator: ',', // Разделитель десятичных | |
| decimalPlaces: 0, // Количество десятичных знаков | |
| hideZero: true, // Скрывать ноль, если значение 0 | |
| maxDigits: 9, // Максимальное количество цифр |
Relevant PR: grammyjs/menu#4
generator gets triggered at least two times per menu render (could be potentially fixed with caching by update_id)generator has to load all of the items each time.
Should instead pass range information to the builder and fetch only required items.
This would also require a different method to fetch total count.| #!/bin/bash | |
| input="" | |
| prefix="" | |
| bucket="" | |
| while [[ "$#" -gt 0 ]]; do | |
| case $1 in | |
| -p | --prefix) | |
| shift |
| #!/bin/zsh | |
| # | |
| # Purpose: run speficied command with specified arguments and cache result. If cache is fresh enough, don't run command again but return cached output. | |
| # Also cache exit status and stderr. | |
| # Copyright (c) 2019-2020 András Korn; License: GPLv3 | |
| # Use silly long variable names to avoid clashing with whatever the invoked program might use | |
| RUNCACHED_MAX_AGE=${RUNCACHED_MAX_AGE:-300} | |
| RUNCACHED_IGNORE_ENV=${RUNCACHED_IGNORE_ENV:-0} | |
| RUNCACHED_IGNORE_PWD=${RUNCACHED_IGNORE_PWD:-0} |
| #!/bin/bash | |
| # REQUIREMENTS TO RUN THIS SCRIPT: | |
| # - ffmpeg | |
| # - python | |
| # HOW TO RUN: | |
| # - `cd` into the directory with `source.mp4` | |
| # - Run this script |
| .asciinema-player-wrapper { | |
| position: relative; | |
| text-align: center; | |
| outline: none; | |
| } | |
| .asciinema-player-wrapper .title-bar { | |
| display: none; | |
| top: -78px; | |
| transition: top 0.15s linear; | |
| position: absolute; |
| fastcgi_cache_path /dev/shm levels=1:2 keys_zone=laravel:100m; | |
| fastcgi_cache_key "$scheme$request_method$host$request_uri$query_string"; | |
| server { | |
| listen 80 default_server; | |
| server_name laravel.info; | |
| root /usr/share/nginx/html/; | |
| index index.php index.html; |