Skip to content

Instantly share code, notes, and snippets.

@w00kie
w00kie / index.ts
Last active July 21, 2024 17:48
Cloudflare Worker that bundles R2 objects in a Zip file
import { z } from 'zod';
import { ZipWriter, BlobReader, configure } from '@zip.js/zip.js';
// Without this, we get uncaught error due to Workers runtime bug
// See: https://github.com/gildas-lormeau/zip.js/discussions/514
configure({
useCompressionStream: false,
});
// Payload schema that lists the files to be bundled, their filenames and the archive filename
#! /bin/bash
# Modified to run both (redudantly, yes, I know, I am paranoid, you should be too) checks
#
set -eu
# find path to liblzma used by sshd
path="$(ldd $(which sshd) | grep liblzma | grep -o '/[^ ]*')"
echo 'Check one: does it even exist?'
# does it even exist?
if [ "$path" == "" ]
@eggplants
eggplants / enable_jit_and_nogil_on_python_3130a5_with_pyenv.md
Last active June 23, 2024 22:09
Enable JIT and NOGIL on Python 3.13.0a5 with pyenv (--enable-experimental-jit / --disable-gil)

Enable JIT and NOGIL on Python 3.13.0a5 with pyenv

Environment

$ uname -vorm
6.5.0-25-generic #25-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb  7 14:58:39 UTC 2024 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
import colorsys
import csv
from datetime import datetime
from pathlib import Path
import matplotlib.colors as mcolors
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import markers
from matplotlib.path import Path as pPath
@LightArrowsEXE
LightArrowsEXE / getfscaler.py
Last active December 15, 2023 15:57
getfscaler: getscaler with frac descaling support
"""
Minimum Python version required: 3.10.
Minimum required VapourSynth version: R63
This is an unofficial "companion" script to getfnative <https://github.com/YomikoR/GetFnative>.
Note that the results of this are **NOT** conclusive on their own!
When using this script, be extra mindful that results may be inaccurate,
and that you should always double-check yourself!
@pree62
pree62 / PCA Assignment.ipynb
Created August 3, 2023 10:05
!excelR/assignments/Gists/PCA Assignment.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bambooGHT
bambooGHT / asmrDownload.user.js
Last active July 3, 2024 15:13
筛选文件下载脚本
// ==UserScript==
// @name filterDownFile
// @namespace https://github.com/bambooGHT
// @version 1.3.2
// @description dom改了,改一下代码
// @author bambooGHT
// @match https://www.asmr.one/*
// @match https://asmr.one/*
// @match https://asmr-100.com/*
// @match https://www.asmr-100.com/*
@gbraad
gbraad / README.md
Last active June 7, 2024 15:23
Cloudflare for Teams enrollment

Cloudflare for Teams enrollment (headless)

$ curl -fsSl https://pkg.cloudflareclient.com/cloudflare-warp-ascii.repo | sudo tee /etc/yum.repos.d/cloudflare-warp.repo
$ dnf install warp cloudflare-warp
  1. open the browser to https://.cloudflareaccess.com/warp
@Areha11Fz
Areha11Fz / gs
Last active April 28, 2023 06:46
HoYoLab Auto Sign In
const token = "ltoken=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; ltuid=xxxxxxxx;"
const genshin = false
const honkai_star_rail = true
const honkai_3 = false
const discord_notify = false
const myDiscordID = "xxxxxxxxxxxxxxxxxxxxxxxxxx"
const myDiscordName = "xxxxxxxxxx"
const discordWebhook = "https://discord.com/api/webhooks/xxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
@KrammyGod
KrammyGod / autocollect.md
Last active March 19, 2024 02:34
Ayaka Autocollector Cookie extraction

Instructions for retrieving cookies

Note: Make sure to reset your cookies if they are exposed (you see unauthorized logins) by logging out of the device where you retrieved the cookie!!

Step 1:

Navigate to hoyolab and sign in.

Step 2a: For PC ONLY!

Open developer tools (Right click + "Inspect Element" OR CTRL + SHIFT + I).
Click the 'Console' tab in the newly opened sidebar.