Skip to content

Instantly share code, notes, and snippets.

View MoKhajavi75's full-sized avatar
:electron:

Mohamad Khajavi MoKhajavi75

:electron:
View GitHub Profile
// Link to main question ==> https://twitter.com/Loc0m0/status/1508697606716764162?s=20&t=Ziozpzj6KIznNArdT9n3xQ
const splicer = function () {
let accumulator = "";
for (let i = 1; i <= 100_000; i++) {
accumulator = accumulator + "0" + i.toString();
}
let arrayOfStrings = accumulator.split("0");
let arrayOfNumbers = arrayOfStrings.map(Number);
let result = arrayOfNumbers.reduce((sum, current) => sum + current, 0);
console.log(result);
@mahmoud-eskandari
mahmoud-eskandari / README.md
Last active January 7, 2026 10:37
Install v2ray on Bridge:(Ubuntu +18 via systemd) - Upstream (Ubuntu +18/CentOS +7 via docker)

پنل x-ui

پنل تحت وب مدیریت V2ray و ساخت کاربر و مدیریت سرور

mkdir x-ui && cd x-ui
docker run -itd --network=host \
    -v $PWD/db/:/etc/x-ui/ \
 -v $PWD/cert/:/root/cert/ \
@electro0nes
electro0nes / hook.js
Created July 5, 2025 17:38
logs all URLs loaded and requested on any webpage in real-time, displaying them in a neat bottom panel!
javascript:(()=>{if(window.__urlHookInjected)return;window.__urlHookInjected=!0;const t=/https?:\/\/[^\s"%27<>]+/gi,e=new Set,o=o=>{const c=o.match(t);c&&c.forEach((t=>{e.has(t)||(e.add(t),function(t){const e=document.createElement("div");e.textContent=t,n.appendChild(e),n.scrollTop=n.scrollHeight}(t),console.log(`[URL Hook] ${o}`))}))},n=document.createElement("div");n.style.position="fixed",n.style.bottom="0",n.style.left="0",n.style.width="100%",n.style.maxHeight="150px",n.style.overflowY="auto",n.style.backgroundColor="rgba(0,0,0,0.85)",n.style.color="lime",n.style.fontFamily="monospace",n.style.fontSize="12px",n.style.zIndex="9999999999",n.style.padding="5px 10px",n.style.borderTop="3px solid lime",n.innerHTML="<strong>URL Hook Panel</strong><br>",document.body.appendChild(n);const c=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(t,e){return o(`[XHR] ${t}: ${e}`),c.apply(this,arguments)};const r=window.fetch;window.fetch=function(t,e){const n="string"==typeof t?t:t&&t.url;return n&&