Skip to content

Instantly share code, notes, and snippets.

View ayunami2000's full-sized avatar
👌
No u

ayunami2000

👌
No u
View GitHub Profile
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active October 20, 2025 01:43
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
@aamiaa
aamiaa / RevertNewLayout.md
Last active August 26, 2025 06:39
Revert New Discord Layout

The original snippet no longer works!

On 02/09/2024 at around 8pm UTC, Discord flipped an experiment (2023-09_mobile_redesign_override_toggles) which ignores the layout toggle that this script relied on.

If you want to continue using the old layout, you can either use a modded mobile client (such as Vendetta) to disable that experiment, or downgrade to an old version of the app.

Method 1 - Downgrading (Android)

Tip

Use this one if you want a fast, beginner-friendly solution and don't mind using a version from November 2023

  1. Download version 205.15 of Discord mobile app from ApkMirror
@zengxinhui
zengxinhui / convert2deb.sh
Last active August 27, 2025 07:45
Replace Oracle Cloud Linux with Debian remotely
[02/22/2025]
Refs:
1. http://mirror.cs.pitt.edu/archlinux/iso/2023.09.01/archlinux-bootstrap-2023.09.01-x86_64.tar.gz
2. https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-virt-3.18.0-x86_64.iso
3. https://wiki.alpinelinux.org/wiki/Replacing_non-Alpine_Linux_with_Alpine_remotely
4. https://www.debian.org/releases/bookworm/amd64/apds03.en.html
See also:
1. Convert to Debian https://gist.github.com/zengxinhui/ee0ad6b7c7f99e2ead6cd0d2bd6641fd

20 million digits of pi in under a minute with Julia

I recently discovered a relatively obscure algorithm for calculating the digits of pi: https://en.wikipedia.org/wiki/Gauss–Legendre_algorithm. Well, at least obscure compared to Chudnovsky's. Wikipedia notes that it is "memory-intensive" but is it really? Let's compare to the MPFR pi function:

function gauss_legendre(prec)
    setprecision(BigFloat, prec, base=10)
    GC.enable(false)
@Thespikedballofdoom
Thespikedballofdoom / YouTube Config Editor.user.js
Created October 26, 2022 23:08
YouTube Config Editor [Deal with youtube's new stupid experiments]
// ==UserScript==
// @name YouTube Config Editor
// @namespace goodtube.github.io
// @version 0.3.5
// @description Edits yt.config_
// @author GoodTube/Thespikedballofdoom
// @match *://*.youtube.com/*
// @exclude *studio.youtube.com/*
// @run-at document-start
// @grant none
@evg-zhabotinsky
evg-zhabotinsky / pressure-vent.sh
Created December 23, 2021 16:59
Steam "Pressure Vessel"-based runtime disabler
#!/bin/bash
# Steam "Pressure Vessel" runtime eliminator.
#
# Valve ships various pre-packaged runtime environments for games to use.
# They are cool, in a way: Most games "just work" with them.
# However, such convenience comes at the cost of performance and sometimes reliability.
#
# Normally, I disable any and all such runtimes and install all the required dependencies myself.
# However, running Windows games using Proton enforces use of a runtime.
# That runtime is shipped in a "Pressure Vessel" container, which is more isolated.
@zengxinhui
zengxinhui / convert2arch_arm.sh
Last active September 10, 2025 11:18
Replace Oracle Cloud Linux with Arch Linux ARM remotely
[02/25/2025]
Refs:
1. http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
2. https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/aarch64/alpine-virt-3.21.3-aarch64.iso
3. https://wiki.alpinelinux.org/wiki/Replacing_non-Alpine_Linux_with_Alpine_remotely
4. https://wiki.archlinux.org/index.php/installation_guide#Configure_the_system
5. https://archlinuxarm.org/platforms/armv8/generic
See also:
@UCIS
UCIS / gist:845eda1755d38eddfc3f0f99268c27da
Created June 17, 2020 18:50
Opus/WebM player in JavaScript
function OpusWebmPacker() {
var channels = 2;
var sample_rate = 48000;
var position = 0;
var packets = [];
var buffer = new Uint8Array(4 + 1275);
var buffer_offset = 0;
function Concat() {
@jacopocolo
jacopocolo / guide.md
Last active January 13, 2024 23:30
Making a Bitsy game compatible with the Nintendo 3ds browser

The Nintendo 3ds browser is capable of running Bitsy games! And it's a delightful Bitsy machine.

To make games compatible, we just need to teach the 3ds browser to speak the language Bitsy is written in: modern Javascript!

To do that we need two things:

  1. The html page that contains your game
  2. A <script> </script> html element we'll add at the top of the page that translates modern Javascript to somewhat Javascript.

The whole script element is here. Just select the whole thing and copy.