This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Утилитарная функция для генерации случайного целого числа в заданном диапазоне. | |
| * @param {number} min - Минимальное возможное значение (включительно). | |
| * @param {number} max - Максимальное возможное значение (включительно). | |
| * @returns {number} Случайное целое число. | |
| */ | |
| function getRandomInt(min, max) { | |
| min = Math.ceil(min); | |
| max = Math.floor(max); | |
| return Math.floor(Math.random() * (max - min + 1)) + min; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Reddit RedGifs Dual Quality URL Extractor | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2025-03-13 | |
| // @description Extract direct URLs from RedGifs embedded in Reddit with HD/SD options | |
| // @author You | |
| // @match https://www.reddit.com/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com | |
| // @grant GM_setClipboard | |
| // @grant GM_xmlhttpRequest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt update | |
| sudo apt install apt-transport-https ca-certificates curl gnupg | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
| echo \ "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ | |
| $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| sudo apt update | |
| sudo apt install docker-ce docker-ce-cli containerd.io | |
| sudo curl -L "https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
| sudo chmod +x /usr/local/bin/docker-compose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "compilerOptions": { | |
| "target": "ESNext", | |
| "baseUrl": "./src", | |
| "module": "esnext", | |
| "lib": ["dom"], | |
| "esModuleInterop": true, | |
| "allowSyntheticDefaultImports": true, | |
| "noImplicitAny": true, | |
| "jsx": "react", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| parser: '@typescript-eslint/parser', | |
| extends: [ | |
| 'plugin:react/recommended', | |
| 'plugin:@typescript-eslint/recommended', | |
| 'plugin:prettier/recommended', | |
| 'prettier', | |
| 'plugin:import/errors', | |
| 'plugin:import/warnings', | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const path = require('path'); | |
| module.exports = env => { | |
| const mode = env.production ? 'production' : 'development'; | |
| const isProd = mode === 'production'; | |
| return ({ | |
| mode, | |
| entry: path.resolve(__dirname, 'src/testwebpack.ts'), | |
| target: 'node', |