Skip to content

Instantly share code, notes, and snippets.

@eta66
eta66 / t.user.js
Last active April 8, 2025 21:46
sooplive.co.kr p2p bypass (deprecated)
// ==UserScript==
// @name soop-bypass
// @author eta66 ([email protected])
// @match https://play.sooplive.co.kr/*
// @grant GM_xmlhttpRequest
// @grant unsafeWindow
// @run-at document-start
// ==/UserScript==
(async()=>{let e="u">typeof unsafeWindow?unsafeWindow:window,[t,n]=location.href.split("/").slice(3,5),r="",a=()=>new Promise(e=>GM_xmlhttpRequest({anonymous:!1,method:"POST",url:atob("aHR0cHM6Ly9hcGkubS5zb29wbGl2ZS5jby5rci9icm9hZC9hL3dhdGNo"),headers:{"Content-Type":"application/x-www-form-urlencoded","User-Agent":"kr.co.nowcom.mobile.afreeca/8.4.3 (Android 9) Sooplive API/8.4.3; store/P;"},data:`broad_no=${n}&bj_id=${t}&password=${r}&confirm_adult=1`,onload(t){console.log(r),e(JSON.parse(t.responseText).data?.chromecast_authentication_key)}}));e.XMLHttpRequest=new Proxy(e.XMLHttpRequest,{construct(e,t){let n=new e(...t),a=n.send.bind(n);return n.send=function(e){if(e&&"string"==typeof e)try{let t=new URLSearchParams(e);t.has("pwd")&&(r=t.get("pwd"))}catch{}ret
@eta66
eta66 / y.user.js
Last active April 8, 2025 21:46
chzzk.naver.com p2p bypass
// ==UserScript==
// @name chzzk-bypass
// @author eta66 ([email protected])
// @match https://chzzk.naver.com/*
// @match https://*.chzzk.naver.com/*
// @grant none
// @require https://unpkg.com/xhook@latest/dist/xhook.min.js
// ==/UserScript==
xhook.after(function(t,e){if(-1!==t.url.indexOf("live-detail"))try{let n=JSON.parse(e.text);n.content&&n.content.p2pQuality&&(n.content.p2pQuality=[],Object.defineProperty(n.content,"p2pQuality",{configurable:!1,writable:!1})),e.text=JSON.stringify(n)}catch(r){console.error(r)}});
@kafene
kafene / ifsetor.md
Created August 2, 2014 15:35
PHP 5.6+ ifsetor/coalesce userspace implementation

Ref: https://wiki.php.net/rfc/ifsetor

So I found out something sad: the variadics RFC implementation was altered so that ...$arg can only come last.

And since we can't pass a non-variable default value by reference, it can go first, just kind of confusing looking, unfortunately.

<?php

function coalesce($default, &amp;...$args) {
@zfwf
zfwf / polyglot-python.cmd
Created January 29, 2017 23:21
polyglot to run python in windows batch
@SETLOCAL ENABLEDELAYEDEXPANSION & CALL "%~f0" & (IF NOT ERRORLEVEL 1 (python -x "%~f0" %*) ELSE (ECHO No python environment found on path)) & PAUSE & EXIT /B !ERRORLEVEL!
#%0 is the command itself. So %~f0 expands to the full path of the batch file. %* stands for all command line parameters except %0.
#do something in python
@brucebentley
brucebentley / iOS Shortcuts Catalog.md
Last active April 8, 2025 21:38
This is a public resource designed to help people get started with Siri Shortcuts & the Shortcuts app. It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Bruce's iOS Shortcut Catalog

Hello and welcome to my Shortcuts Catalog!

This is a public resource designed to help people get started with Siri Shortcuts and the Shortcuts app.

It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Enjoy!

@lambdaxyzt
lambdaxyzt / image.jsx
Last active April 8, 2025 21:37
Remix Image Component ( use cache 'cacashe library' , stream base , sharp library )
// resource route component
import React from "react";
import { PassThrough } from "node:stream"
import fs from "node:fs"
import {createReadableStreamFromReadable} from "@remix-run/node"
import { defaultQuality,widths,mainImageReadStream,generatedImageReadstream, isThereImage,BadImageResponse } from "../../util/image.server"
export const loader = async ({ request }) => {
const url = new URL(request.url);
const src = url.searchParams.get("src");
@DusanBrejka
DusanBrejka / ffmpeg-format-to-mimetype.js
Last active April 8, 2025 21:26
FFMPEG - map of formats to default mime types
// INCOMPLETE
// This command will give you list of available FFMPEG formats and their default Mime types
// ffmpeg -formats -hide_banner | tail -n +5 | cut -c5- | cut -d' ' -f1 | xargs -i{} ffmpeg -hide_banner -h demuxer={} | pcregrep -o2 -o4 -M '(Muxer (\w+) )|(Mime type:( .*).)'
// And then parse the output with regex to JSON format in JavaScript for example:
// str.match(/(.*)\n (.*)/gm).map(m => `"${m.replace(/\n /, '": "')}"`).join(',\n');
// Combine the output with MDN - Common MIME types
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
// And with IANA:
@Velocet
Velocet / Unlock-PowerCfg.ps1
Last active April 8, 2025 21:25
Unlock/Unhide all Power Plan Settings/Options on Windows 10/11
#Requires -RunAsAdministrator
# Unlock-PowerCfg - v22.05.11
# Disable "Connected Standby"
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power' -Name 'CSEnabled' -Value 0 -Force
# Get Power Settings entries and add/set 'Attributes' to 2 to unhide
$PowerCfg = (Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerSettings' -Recurse).Name -notmatch '\bDefaultPowerSchemeValues|(\\[0-9]|\b255)$'
foreach ($item in $PowerCfg) { Set-ItemProperty -Path $item.Replace('HKEY_LOCAL_MACHINE','HKLM:') -Name 'Attributes' -Value 2 -Force }
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active April 8, 2025 21:16
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh