Skip to content

Instantly share code, notes, and snippets.

@AbstractUmbra
AbstractUmbra / 00-deprecation.md
Last active October 26, 2025 12:01
discord.py 2.0+ slash command info and examples

This gist has now been 'deprecated' and has moved...

... to my blog style space for easier contribution by third parties and to provide what I believe to be an easier reading experience. Please field all enquiries and issues to the source repository.

A metatable in Lua defines various extraneous behaviors for a table when indexed, modified, interacted with, etc. They are Lua's core metaprogramming feature; most well known for being useful to emulate classes much like an OOP language.

Any table (and userdata) may be assigned a metatable. You can define a metatable for a table as such:

-- Our sample table
local tab = {}
-- Our metatable
local metatable = {
 -- This table is then what holds the metamethods or metafields
@jeremychone
jeremychone / rust-xp-02-postgresql-sqlx.rs
Created May 11, 2021 05:48
Rust to PostgreSQL with SQLX | Rust By Example
#![allow(unused)] // silence unused warnings while exploring (to comment out)
use sqlx::postgres::{PgPoolOptions, PgRow};
use sqlx::{FromRow, Row};
// Youtube episode: https://youtu.be/VuVOyUbFSI0
// region: Section
// Start postgresql server docker image:
@bfu4
bfu4 / aa_dyKNOW.md
Last active September 10, 2021 20:27
dyknow r/e [BRIEF]

due to html failing to want to format, i've migrated this writeup to a gist. also, since by having your extension on the chrome web store you're basically open-source, the files referred to are ATTACHED to this gist. ha!

did you know?

a small writeup on the reverse-engineering of dyknow (school-wide chrome extension

introduction

i felt like doing a little analysis on dyknow, to see what goes on in it.

@Exerosis
Exerosis / Events.java
Last active November 12, 2025 07:28
A simpler and faster system for registering Bukkit event listeners in Java, Kotlin or Scala.
import org.bukkit.Bukkit;
import org.bukkit.event.Event;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.HandlerList;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.EventExecutor;
import java.util.function.Consumer;
public interface Events extends Listener, EventExecutor {