Skip to content

Instantly share code, notes, and snippets.

View ZoomTen's full-sized avatar
🤔
Rabble rabble tech blabble

Zumi ZoomTen

🤔
Rabble rabble tech blabble
View GitHub Profile

step one

This is a function

thingdoer(a, b, c)

Move the opening bracket over to the beginning

@ZoomTen
ZoomTen / r206.asm
Created January 18, 2026 09:33
Route 206
; Route206
; generated by mml2pret.py on 2024-04-10 17:26:58
Music_Route206:
; G/S/C header
channel_count 4
channel 1, Music_Route206_Ch1
channel 2, Music_Route206_Ch2
channel 3, Music_Route206_Ch3
@ZoomTen
ZoomTen / 00_Closure_Crash.nim
Last active February 15, 2025 18:44
The thing Nim tries to warn me about when using closures
proc b(x: ptr seq[int]): auto =
proc a(): seq[int] =
x[].add(10)
return x[]
a
proc ax(): auto =
# allocate a sequence manually
# will be GC'd at the first opportunity
var k = @[1, 2, 3]
@ZoomTen
ZoomTen / .macro.output.nim
Last active February 15, 2025 14:28
a router
proc route(reqType: string, path: string): void =
proc notFound(
reqType: string, pathOnly: string, getParams: string, pathParams: StringTableRef
): void =
stderr.writeLine "default"
proc methodNotAllowed(
reqType: string, pathOnly: string, getParams: string, pathParams: StringTableRef
): void =
stderr.writeLine "method not allowed"
@ZoomTen
ZoomTen / list_tags.sh
Created January 29, 2025 03:01
Show a timeline of git tag dates
git for-each-ref --format="%(refname:short) %(creatordate:iso8601)" refs/tags > tags.txt
##[
An extremely basic BBcode parser
Not quite ready for the works.
Will turn into a package later
Supports no parameters yet.
2 blank lines = 1 manual line break
3 blank lines = 2 manual line break
from std/strutils import nil
type
uint4 = 0'u8 .. 15'u8
Dv {.packed.} = object
defense {.bitsize: 4.}: uint4
attack {.bitsize: 4.}: uint4
special {.bitsize: 4.}: uint4
speed {.bitsize: 4.}: uint4
@ZoomTen
ZoomTen / 01_bruteforce.nim
Last active September 26, 2024 14:07
I'm too late, so here I am hammering Wikia's servers for 3 days straight
import std/random
import std/strutils
import std/httpclient
import std/monotimes
import std/cmdline
import malebolgia
import malebolgia/ticketlocks
proc toThreeString(i: int): string = i.toHex(3).toLowerAscii()
from os import makedirs
from typing import Any, Generator, cast
import requests
import json
import sys
from contextlib import contextmanager
from pathlib import Path
level: int = 0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.