Skip to content

Instantly share code, notes, and snippets.

View maanimis's full-sized avatar
💬

Meisam Maani maanimis

💬
View GitHub Profile
@sanonz
sanonz / proxy.js
Last active January 17, 2025 13:13
CloudFlare Workers
/**
* @typedef {Object} Env
*/
export default {
/**
* @param {Request} request
* @param {Env} env
* @param {ExecutionContext} ctx
* @returns {Promise<Response>}
@ahbanavi
ahbanavi / script.sh
Last active December 9, 2024 20:27
Dcoker Bind NIC (Network Interface)
# Interface to bind in this example
# ID: wlan0, IP: 192.168.10.183, Gateway: 192.168.10.1
docker network create -d bridge --subnet=172.18.0.0/16 --gateway=172.18.0.1 -o com.docker.network.bridge.enable_ip_masquerade=false -o com.docker.network.bridge.name=docker_binded docker_binded
echo '1 docker_binded' >> /etc/iproute2/rt_tables
ip rule add from 172.18.0.0/16 tab docker_binded
ip route add 172.18.0.0/16 dev wlan0 tab docker_binded
// ==UserScript==
// @name Allow IG Likes to be opened in new tab
// @namespace Violentmonkey Scripts
// @match https://www.instagram.com/*
// @grant none
// @version 1.0
// @author retrievaaaa
// @description Allows you to open your likes on the my activity page in a new tab by middle clicking / scroll wheel clicking
// ==/UserScript==
@AlexAdasCca
AlexAdasCca / win8hooklogoncore.cpp
Created November 23, 2024 16:22
A hook for winlogon processes, specifically for windows 8 or earlier
#include "pch.h"
#include "detours.h"
#include <winuser.h>
#include <WtsApi32.h>
#pragma comment(lib, "detours.lib")
#pragma comment(lib, "user32.lib")
#pragma comment(lib, "WtsApi32.lib")
void StartHookingFunction();
@AlexAdasCca
AlexAdasCca / dllmain.cpp
Last active January 30, 2025 13:19
A hook to the winlogon process that intercepts some logon-related operations for us...
#include "pch.h"
#include <WtsApi32.h>
#include <string>
#include "rpc.h"
#include "detours/detours.h"
#pragma comment(lib, "detours.lib")
#pragma comment(lib, "WtsApi32.lib")
#pragma comment(lib, "Rpcrt4.lib")
@TwoXTwentyOne
TwoXTwentyOne / TwitterUnfolllowUnverifiedAccount-GreaseMonkey.txt
Last active March 28, 2025 00:59
TamperMonkey - Unfollow Unverified Account
// ==UserScript==
// @name X (Twitter) - v1.18 + Verified-No-Followback + Start/Stop Toggle + Dark Mode (All Text White)
// @namespace http://tampermonkey.net/
// @version 1.18
// @description Contextual counters, S=Start, A=Abort, P=Pause, E=Export, ignore list, plus an option to unfollow verified if they don’t follow back, with Start/Stop toggles and Dark Mode (all text white)
// @match https://x.com/*
// @grant none
// ==/UserScript==
(function() {
@the-pesar
the-pesar / script.js
Created September 13, 2024 10:56
To bypass airdrop Telegram miniapps preventation on computer
const el = document.createElement("iframe")
el.src = document.getElementsByTagName('iframe')[0].src.replace(/(tgWebAppPlatform=)[^&]+/, "$1android")
document.querySelector("iframe").remove()
el.height = "100%"
el.width = "100%"
document.querySelector(".web-app-body").appendChild(el)
@DarrenSem
DarrenSem / DLasMD - DOWNLOAD contents as MarkDown.js
Last active March 8, 2025 18:14
console.save.js + DOWNLOAD contents as MarkDown.js -- download your JavaScript objects from your web browser's F12 Dev Tools console! (also Bookmarklet click defaults to saving prompt text data or body.innerText as `DL-[date].md`)
// DLasMD - DOWNLOAD contents as MarkDown.js
// old as of 15Jan2025; start using DLasMD-console.save.js
// 27Dec2024 1053am NEW promptData rules (Blank or Empty or =FILENAME.EXT defaults to document.body.innerText)
// 477 char javascript:void function(){let a=document,b=(b,c=`DL-${+new Date}.md`,d="octet-stream")=>{let e=URL.createObjectURL(new Blob([b],{type:d}));Object.assign(a.createElement("a"),{href:e,download:c}).click(),URL.revokeObjectURL(e)},c=prompt("Enter data to download...\n\n(Blank or Empty or =FILENAME.EXT defaults to document.body.innerText)")?.trim();if(null!=c){let d=c.startsWith("=")&&c.slice(1);b(c.length&&!d?c:a.body.innerText,d?`${d}${d.includes(".")?"":".md"}`:void 0)}}();
let doc=document;
let saveDataAsFilenameMime = (
@nfarina
nfarina / worker.js
Created August 8, 2024 17:44
Our solution for hosting and transforming images stored in Firebase Storage, using Cloudflare Image Transformations. It's fast (~11ms per request for us) and cheap ($0.50 per million images served through Cloudflare). Modify as needed.
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request))
})
// Our images are immutable, so we can cache them forever.
const ONE_YEAR = 31536000;
const CACHE_CONTROL = `public, max-age=${ONE_YEAR}, immutable`
// One way (the most efficient way) to get the raw images is to fetch them
// directly from the underlying Google Cloud Storage bucket. But that requires
@NabiKAZ
NabiKAZ / hamster_on_computer.js
Last active September 18, 2024 08:43
Running Hamster Telegram game on computer
// Programmer: @NabiKAZ (https://twitter.com/NabiKAZ) and Thanks for Erfan (https://github.com/ErfanBahramali)
// To run Hamster Telegram game on computer. Enter Telegram from this link https://web.telegram.org/k/
// Then open the game. When the "Play on your mobile" error appeared. Copy and paste this code in
// your browser console. Both the game is run in the opened window and the address written in the console
// can be run in a separate and full-screen browser.
// Caution: You are responsible for possible risks such as banning.
// The game link: https://t.me/Hamster_kombat_bot/start?startapp=kentId101554083
console.log("Use this address in your browser:", document.getElementsByTagName('iframe')[0].src = document.getElementsByTagName('iframe')[0].src.replace(/(tgWebAppPlatform=)[^&]+/, "$1android"));