Skip to content

Instantly share code, notes, and snippets.

@bferguson3
bferguson3 / sw_discord_dicebot.py
Created July 2, 2025 21:34
A simple Sword World dice bot for Discord with support for strike rolls 0-100
# Sword World dice bot
#
# commands: !h[elp], !r[oll], !s[trike]
#
# (c)2025 bferguson3 @ github
import discord,os,random,re
intents = discord.Intents.all()
client = discord.Client(command_prefix="!", intents=intents)
# https://github.com/emscripten-core/emsdk
FROM emscripten/emsdk:3.1.25
RUN apt-get update \
&& apt-get install -qqy \
autoconf \
build-essential \
libglib2.0-dev \
libtool \
pkgconf \
@bferguson3
bferguson3 / music.c
Created February 1, 2021 00:08 — forked from scazon/music.c
GBDK music player
/* Here's a look at how I created a quick music player for use with GBDK.
It basically defines how to play a note, and then stores an array of notes
to be played as a timer interates through the beats */
//Define note names
typedef enum {
C3, Cd3, D3, Dd3, E3, F3, Fd3, G3, Gd3, A3, Ad3, B3,
C4, Cd4, D4, Dd4, E4, F4, Fd4, G4, Gd4, A4, Ad4, B4,
C5, Cd5, D5, Dd5, E5, F5, Fd5, G5, Gd5, A5, Ad5, B5,
C6, Cd6, D6, Dd6, E6, F6, Fd6, G6, Gd6, A6, Ad6, B6,