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 CACHE_NAME = 'my-cache-v1'; | |
| // هنگام نصب Service Worker، میتونیم فایلهای اولیه رو کش کنیم | |
| self.addEventListener('install', (event) => { | |
| console.log('[Service Worker] Installing...'); | |
| event.waitUntil( | |
| caches.open(CACHE_NAME).then((cache) => { | |
| console.log('[Service Worker] Pre-caching some assets'); | |
| return cache.addAll([ | |
| '/', // index.html |
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 Link Gopher Lite (Userscript) | |
| // @namespace https://gist.github.com/maanimis | |
| // @version 1.0 | |
| // @description Extract all links | |
| // @author You | |
| // @match *://*/* | |
| // @grant GM_registerMenuCommand | |
| // ==/UserScript== |
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 Heading Fragment Linker | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2.0 | |
| // @description Add clickable fragment links to all headings | |
| // @author maanimis | |
| // @match *://*/* | |
| // @grant none | |
| // @license MIT | |
| // ==/UserScript== |
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 WebSocket Connection Multiplier+Reconnect | |
| // @namespace http://tampermonkey.net/ | |
| // @version 3.1 | |
| // @description Intercepts WebSocket connections and creates multiple connections instead of one | |
| // @author maanimis | |
| // @match https://example.com/ | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=example.com | |
| // @grant none | |
| // @run-at document-start |
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 WebSocket Multi-Connection Hook | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Create multiple WebSocket connections instead of one | |
| // @author You | |
| // @match *://*/* | |
| // @grant none | |
| // ==/UserScript== |
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 Bundle.js Replacer | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Replace bundle.js script with custom URL | |
| // @author You | |
| // @match *://*/* | |
| // @grant none | |
| // @run-at document-start | |
| // ==/UserScript== |
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 TARGET_URL = "https://crypto.cloudflare.com/cdn-cgi/trace"; | |
| const METHOD = "GET"; | |
| const CONCURRENT_REQUESTS = 10; | |
| const PAYLOAD = {}; | |
| const HEADERS = {}; | |
| const START_AT_MS = Date.now() + 3000; | |
| const workerCode = ` |
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
| version: '3' | |
| services: | |
| mysql: | |
| image: mysql | |
| container_name: tutorial-mysql | |
| environment: | |
| - MYSQL_ROOT_PASSWORD=toor | |
| networks: | |
| - tutorial |
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
| FROM node:22.17-alpine3.21 | |
| RUN addgroup app && adduser -S -G app app | |
| USER app | |
| WORKDIR /app | |
| RUN mkdir log | |
| COPY package.json . | |
| RUN npm install | |
| COPY . . | |
| ENV API_URL=https://example.com/API_URL | |
| EXPOSE 3000 |
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
| import fs from 'fs'; | |
| import readline from 'readline'; | |
| // Utility to extract TradingView script URLs (with or without protocol) | |
| function extractTradingViewLinks(line) { | |
| const regex = /(?:https?:\/\/)?(?:[a-z]+\.)?tradingview\.com\/script\/[a-zA-Z0-9-_]+/g; | |
| return line.match(regex) || []; | |
| } | |
| // Main function to process files |