This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Dynamic symbol resolution from a static binary: | |
* | |
* Windows: gcc -o foobar.exe -Wl,-export-all-symbols foobar.c && ./foobar | |
* Linux: gcc -o foobar -rdynamic -ldl foobar.c && ./foobar | |
*/ | |
#ifdef _WIN32 | |
#include <windows.h> | |
#else | |
#define _GNU_SOURCE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit webhooks; | |
(* | |
A webhook is a simple way to post messages to channels in Discord, by sending | |
suitable JSON data via a POST request. You'll have to create the webhook first | |
(using API calls or administrative functions in Discord's UI) and retrieve its | |
specific URL that contains two distinct elements: the webhook ID and a token. | |
see e.g. | |
https://discordapp.com/developers/docs/resources/webhook#execute-webhook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit WebDecompression; | |
{$mode OBJFPC} | |
{ | |
This is a FreePascal unit to help with postprocessing web server response | |
streams that are possibly compressed. | |
Note: Even if you want your program to work with the response in string form, | |
it's very easy to achieve this: simply use a `TStringStream`. | |
Standards-compliant web servers will indicate the compression used via the | |
"Content-Encoding: " header field in their reply. You have several ways of |