Skip to content

Instantly share code, notes, and snippets.

@DavideGalilei
DavideGalilei / timeout.nim
Last active April 5, 2024 11:44
Nim await future with timeout
import std / asyncdispatch
type TimeoutError* = ref object of CatchableError
timeout*: int
proc timeoutFuture*[T](future: Future[T], timeout: int): Future[T] {.async.} =
let timeoutFuture = sleepAsync(timeout * 1000)
timeoutFuture.callback = proc =
if not future.finished:
future.fail(TimeoutError(msg: "The future didn't complete in time", timeout: timeout))
@niko
niko / README.md
Last active February 28, 2026 11:42 — forked from ePirat/spec.md
Icecast Protocol specification

An collection of documents about icecast/shoutcast streaming.

@JShorthouse
JShorthouse / gba-gcc-compiling-linux.md
Last active August 6, 2024 13:57
Compiling GBA programs on Linux with GCC

Compiling GBA programs on Linux with GCC

There is a strange lack of guides and tools online for compiling Gameboy Advance homebrew programs on Linux. I didn't want to use devkitpro - their installation method of requiring you to use a forked version of pacman is extemely strange and I didn't want to install all of that on my system just to complile some programs.

The only other guides I found for Linux were this one and this one which both involve compiling custom versions of GCC and assosicated libraries. This lead me down a road of pain, after spending multiple hours fixing compiler errors only to create new errors I gave up. I thought that their had to be a simpler way, and there is!

The solution

Debian already has a version of GCC that can compile ARM programs in the repos, no manual compiling necessary! The package is called arm-none-eabi-gcc.

Taken from : https://www.smackfu.com/stuff/programming/shoutcast.html
Webarchive: https://web.archive.org/web/20190521203350/https://www.smackfu.com/stuff/programming/shoutcast.html
Shoutcast Metadata Protocol
How To Parse Titles from MP3 Streams
I wanted to add the ability to show titles from Shoutcast streams on the SliMP3, like Winamp does. The protocol isn't documented anywhere officially (of course). So I ended up cobbling together info from google caches, xmms source code, and mailing lists. Hopefully, this document will save others from the same fate.
## Step 0: Overview picture
-----------------------------------------------------------------------
[ audio data ][metadata.length][metadata][ audio data ]
@tobiasvl
tobiasvl / to_c_or_not_to_c.md
Last active January 23, 2026 21:04 — forked from ISSOtm/to_c_or_not_to_c.md
Writeup discussing when to use RGBDS or GBDK.

In the past few years, it seems that, as retro gaming has grown in popularity, programming for older platforms has also gained traction. A popular platform is the Game Boy, both for its nostalgia and (relative) ease to program for.

When someone wants to make their own game, one of the first problems they will encounter is picking the tools they will use. There are two main options: either use GBDK (Game Boy Development Kit) and the language C, or RGBDS (Rednex Game Boy Development System) and the Game Boy's assembly language.

The purpose of this document is to provide my insights and experience, and help you make the better choice if you're starting a new project. I will also provide some "good practice" tips, both for C and ASM, if you have already made up your mind or are already using one of these.

Overview

@zhaoz
zhaoz / updatechromium.sh
Created February 21, 2012 23:13 — forked from benvanik/updatechromium.sh
Update Chromium on Linux to the latest version
#!/bin/bash
cd ~/Downloads/
if [ ! -x /usr/bin/curl ]; then
echo "Didn't find curl at /usr/bin/curl. Install with 'sudo apt-get install curl'."
exit 1
fi
echo -n "Determining latest build... "