Skip to content

Instantly share code, notes, and snippets.

View ItsWendell's full-sized avatar

Wendell Misiedjan ItsWendell

View GitHub Profile
@ItsWendell
ItsWendell / wait-until-after.tsx
Created October 29, 2024 15:38
`waitUntil` and `unstable_after` after support for @cloudflare/next-on-pages
import { getOptionalRequestContext } from "@cloudflare/next-on-pages";
import { workAsyncStorage } from "next/dist/server/app-render/work-async-storage.external";
export type AfterTask<T = unknown> = Promise<T> | AfterCallback<T>;
export type AfterCallback<T = unknown> = () => T | Promise<T>;
export function waitUntil(promise: Promise<unknown>) {
const cloudflareCtx = getOptionalRequestContext();
if (!cloudflareCtx) {
@ItsWendell
ItsWendell / r2-to-zip.ts
Created April 11, 2025 10:39
Zip multiple files in bulk from R2 in Cloudflare Workers
import { type DeflateOptions, Zip, ZipDeflate } from "fflate";
export interface R2ToZipOptions {
/**
* Maximum number of files to process concurrently.
*
* @default 2
*/
concurrency?: number;
/**
@ItsWendell
ItsWendell / fix_zenbook_audio.sh
Created May 23, 2025 10:41
ASUS Zenbook UX5406SA (Lunar Lake) audio fix
#!/bin/bash
# === WARNING: This script is AI generated and might not always work as expected ===
# ==============================================================================
# Script to fix audio on ASUS Zenbook UX5406SA (and similar models)
# with Lunar Lake CPUs on Fedora and other modern Linux distributions.
#
# This script automates the steps discussed, which involve:
# 1. Installing specific SOF (Sound Open Firmware) topology files.