Skip to content

Instantly share code, notes, and snippets.

View Vap0r1ze's full-sized avatar
🤍

Justice Almanzar Vap0r1ze

🤍
  • 15:11 (UTC -05:00)
View GitHub Profile
@Vap0r1ze
Vap0r1ze / audio.ua
Last active December 30, 2023 16:30
uiua minimal trackerish thing
LoadSong ← &i "song.ua" "LoadSong"
SampleSong ← &i "song.ua" "SampleSong"
Bpm ← 150
GetFreq ← (
++⊓(⊗:"A BC D EF G"|-1⊗:"b-#"|×12-@0) °[⊙⊙∘]
×55 ⁿ:2 ÷12
)
# Waves
@Vap0r1ze
Vap0r1ze / parse.ts
Created June 16, 2023 22:49
Vue 2 decompiler, probably incomplete, i made it and gave up same-day when i realized brilliant.org sourcemaps are public.
import * as acorn from 'acorn';
import { generate } from 'astring';
import type {
ConditionalExpression,
Expression,
FunctionExpression,
Literal,
Node,
Property,
ObjectExpression,
@Vap0r1ze
Vap0r1ze / LinkedList.ts
Last active January 28, 2023 06:20
doubley linked list implementation in typescript/javascript
const clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);
/* eslint-disable consistent-return */
export type ListNode<T = any> = {
value: T;
next: ListNode<T> | null;
prev: ListNode<T> | null;
};
export type ListHead<T = any> = ListNode<T> & {
@Vap0r1ze
Vap0r1ze / tracklist_apple_music.js
Last active December 2, 2021 10:25
Rip tracklist from various stores for MusicBrainz
$$('.songs-list-row').map((e, i) => `${i + 1}. ${$('.songs-list-row__song-name', e).innerText} - ${$('.songs-list-row__by-line', e).innerText} (${$('.songs-list-row__length', e).innerText})`).join('\n')
#!/usr/bin/moon
-- Imports
{ energy_device: cell, :gpu } = require('component')
event = require('event')
os = require('os')
-- Constants
running = true
width, height = gpu.getResolution()
data =
@Vap0r1ze
Vap0r1ze / lineto-circular.js
Last active October 11, 2023 00:34
get circular fonts
const fs = require('fs')
const { queue } = require('async')
const request = require('superagent')
async function main() {
const fonts = []
const page = await request
.get('https://lineto.com/typefaces/circular/')
.set('user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36')
fontCutsIndices = []
@Vap0r1ze
Vap0r1ze / discord_oauth2.md
Last active April 7, 2024 14:54
Discord OAuth2 Flow

Discord OAuth2

Step 1

You: Redirect User to https://discordapp.com/api/oauth2/authorize

Query Params
name value
client_id Your application's Client ID
scope A list of scopes, delimited by spaces
redirect_uri The uri to send the user after authorization
/\b([^ ]+) (\1)\b/gi $1 <strong>$2</strong>
/^(1\d{3}|200\d|201[0-2])\/(0[1-9]|1[0-2])\/(0[1-9]|[1-2]\d|3[0-2]) ([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/
/^(?:\d{1,3}(,\d{3})*(\.\d+)?|\d{1,3}( \d{3})*(,\d+)?)$/
/^\*( +)(.+)(\n)\*( +)(\2)$/gim *$1$2$3*$4**$5**