Skip to content

Instantly share code, notes, and snippets.

@maanimis
maanimis / ws.multi.connection.userscript.js
Created July 26, 2025 10:53
Here's a userscript that hooks WebSocket connections and creates multiple connections instead of one. This script intercepts the WebSocket constructor and automatically creates additional connections when a new WebSocket is initiated
// ==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==
@maanimis
maanimis / script-replacer.userscript.js
Created July 23, 2025 14:00
Replace bundle.js script with custom URL
// ==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==
@maanimis
maanimis / concurrent-xhr-workers.js
Created June 29, 2025 15:41
This script sends a specified number of concurrent HTTP requests using Web Workers at a scheduled future time.
{
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 = `
@maanimis
maanimis / docker-compose.yml
Created June 28, 2025 08:39
for mysql and phpmyadmin
version: '3'
services:
mysql:
image: mysql
container_name: tutorial-mysql
environment:
- MYSQL_ROOT_PASSWORD=toor
networks:
- tutorial
@maanimis
maanimis / Dockerfile
Created June 28, 2025 08:33
for nodejs
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
@maanimis
maanimis / extract-urls.js
Created May 26, 2025 23:23
Utility to extract TradingView script URLs
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
@maanimis
maanimis / TradingView-Script-Downloader.js
Created May 26, 2025 23:04
Complete TradingView script downloading solution with batch processing and status tracking
// ==UserScript==
// @name TradingView Script Downloader
// @namespace http://tampermonkey.net/
// @version 5.0
// @description Complete TradingView script downloading solution with batch processing and status tracking
// @author You
// @match https://www.tradingview.com/script/*
// @match https://www.tradingview.com/*
// @grant GM_setValue
// @grant GM_getValue
@maanimis
maanimis / Backup GitHub Repository.userscript.js
Created April 10, 2025 16:47
Backup GitHub repositories directly from user profile page
// ==UserScript==
// @name Backup GitHub Repository
// @namespace Violentmonkey Scripts
// @version 2.1
// @description Backup GitHub repositories directly from user profile page
// @author maanimis
// @match https://github.com/*?tab=repositories
// @grant GM_registerMenuCommand
// @grant GM_download
// @run-at document-end
@maanimis
maanimis / GithubMultiView.user.js
Last active July 1, 2025 16:57
Redirect GitHub repositories to Gitingest, GitDiagram, or DeepWiki with a single click.
// ==UserScript==
// @name GithubMultiView
// @namespace Violentmonkey Scripts
// @match https://github.com/*
// @grant none
// @version 5.0
// @author maanimis
// @description Redirect GitHub repositories to Gitingest, GitDiagram, or DeepWiki with a single click.
// @grant GM_registerMenuCommand
// @run-at document-end
@maanimis
maanimis / Path-Notes-userscript.js
Created March 17, 2025 20:52
Add and save notes for different website paths
// ==UserScript==
// @name Path Notes
// @namespace Violentmonkey Scripts
// @version 2.0
// @description Add and save notes for different website paths
// @author maanimis
// @match *://*/*
// @grant GM_registerMenuCommand
// @run-at document-end
// @license MIT