Skip to content

Instantly share code, notes, and snippets.

View GalileoCap's full-sized avatar

Galileo Cappella GalileoCap

View GitHub Profile
@GalileoCap
GalileoCap / option.c
Last active April 8, 2025 23:07
Rust's Option<T> and Result<T, E> implemented in C
#include <stdio.h>
#define Option_t(T) struct option__ ## T
#define Option_td(T) \
Option_t(T) { \
char some; \
T value; \
}
@dideler
dideler / bot.rb
Last active May 18, 2025 07:48
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#