Skip to content

Instantly share code, notes, and snippets.

View quantum-noise's full-sized avatar

Aliaksandr Klimau quantum-noise

View GitHub Profile
@quantum-noise
quantum-noise / steam-wishlist-helpers.js
Created January 8, 2026 10:56
steam wishlist search and scroll to
(() => {
const FIRST_ELEMENT_SELECTOR = ".Panel[data-index]";
const ROOT_ELEMENT_SELECTOR = "[data-index]";
const DATA_ID_NAME = "data-rfd-draggable-id";
const DATA_ID_SELECTOR = `[${DATA_ID_NAME}]`;
const WAIT_FOR_TIME = 500;
async function waitForElementLoaded(parent, selector) {
await new Promise((resolve) => {
const observer = new MutationObserver((mutations) => {
type UnionToIntersection<U> = (
U extends never ? never : (arg: U) => never
) extends (arg: infer I) => void
? I
: never;
type UnionToTuple<T> = UnionToIntersection<
T extends never ? never : (t: T) => T
> extends (_: never) => infer W
? [...UnionToTuple<Exclude<T, W>>, W]
@quantum-noise
quantum-noise / TypeScript Compose
Last active January 13, 2022 16:48
TypeScript Compose
A set of typescript compose fucntions.
// Event loop:
Promise.resolve().then(() => {console.log('a')})
setTimeout(() => {console.log('b')},0);
console.log('c');
// Temporal dead zone:
var a = 10;
{
console.log(a);
const a = 20;
@quantum-noise
quantum-noise / hb_all_books_dl.js
Last active January 18, 2020 12:33 — forked from fsteffek/hb_all_books_dl.js
Humble bundle book bundles - download all books and md5sums
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
*/
function windowsNormalize(path) {
return path.replace( /[<>:"\/\\|?*]/g, '_' );
}
function getTitle() {