Skip to content

Instantly share code, notes, and snippets.

View dedobbin's full-sized avatar

dedobbin

  • https://koindozer.org/dat/
View GitHub Profile
@EvieePy
EvieePy / error_handler.py
Last active January 23, 2025 03:35
Simple Error Handling for Prefix and App commands - discord.py
import logging
import discord
from discord import app_commands
from discord.ext import commands
LOGGER: logging.Logger = logging.getLogger(__name__)
@leovoel
leovoel / basic_bot.py
Last active January 25, 2024 04:19
discord.py's basic_bot.py converted to use "cogs".
from discord.ext import commands
description = '''An example bot to showcase the discord.ext.commands extension
module.
There are a number of utility commands being showcased here.'''
# this specifies what extensions to load when the bot starts up
startup_extensions = ["members", "rng"]
@asamy
asamy / cmd.S
Last active February 21, 2022 19:39
Retrieving command-line arguments in x86 assembly.
/*
Copyright (C) 2013 Ahmed Samy <[email protected]>, MIT.
Retrive command line arguments and output them to stdout.
Compile:
gcc cmd.S
Run:
./a.out 1 2 3
Should output:
There are 4 params:
/*
A Minimal Capture Program
This program opens an audio interface for capture, configures it for
stereo, 16 bit, 44.1kHz, interleaved conventional read/write
access. Then its reads a chunk of random data from it, and exits. It
isn't meant to be a real program.
From on Paul David's tutorial : http://equalarea.com/paul/alsa-audio.html