๐
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
// SPDX-License-Identifier: GPL-2.0-only | |
/* | |
* | |
* Copyright (C) 2023 Ammar Faizi <[email protected]> | |
* | |
* This is the freshtea file transfer. It's just a simple file | |
* transfer app using io_uring. | |
* | |
*/ |
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
/** | |
* Fresh tea file transfer. | |
*/ | |
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <assert.h> | |
#include <stdint.h> | |
#include <stdarg.h> | |
#include <string.h> |
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
<?php | |
// SPDX-License-Identifier: Public domain | |
/** | |
* @author Ammar Faizi <[email protected]> | |
* | |
* A simple example for uploading a file via bot Telegram. | |
* | |
* Link: https://discord.com/channels/845302963739033611/845302963739033613/1057316446662819860 | |
*/ | |
const BOT_TOKEN = "xxxxxxxxxxxxxxxxxxxxxxxxx"; |
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
// SPDX-License-Identifier: GPL-2.0-only | |
/** | |
* Copyright (C) 2022 Ammar Faizi <[email protected]> | |
* | |
* This is the Extreme GNU/Weeb HTTP Server. I wrote this program | |
* because of a challenge from Alviro. The challenge is to create | |
* a web server application *without including any library*. The | |
* web server has to show the directory list and handle download | |
* file. It must also be able to handle 10K concurrent requests. | |
* |
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
// SPDX-License-Identifier: Public Domain | |
/* | |
* @author Ammar Faizi <[email protected]> | |
* | |
* A simple Telegram bot example for @nekonyameow. | |
* | |
* Goals: | |
* - Parallel messages processing. | |
* - Single getUpdate thread. | |
* - Workqueue implementation. |
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
#include <queue> | |
#include <stack> | |
#include <cstdio> | |
#include <cerrno> | |
#include <vector> | |
#include <cstring> | |
#include <list> | |
enum QueryType { |
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
/* | |
* A syscall decoder to solve a challenge from Alviro. | |
* | |
* Link: https://t.me/GNUWeebTDD/7955 | |
*/ | |
#include <sys/syscall.h> | |
#include <sys/ptrace.h> | |
#include <sys/types.h> | |
#include <sys/user.h> |
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
<?php | |
/* | |
* @author Ammar Faizi <[email protected]> | |
* | |
* A simple HTTP Server. I make this program just to do a challenge | |
* from @codenoid. | |
* | |
* Link: https://t.me/GNUWeebTDD/7822 | |
* Link: https://twitter.com/imrenagi/status/1591659569637634048 | |
*/ |
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
const { CNRingMaster } = require('../../chnet/chnet.js'); | |
function do_http_get() { | |
let ring = new CNRingMaster; | |
let ch = ring.CreateNet("https://www.google.com"); | |
/* | |
* This user data can be set to anything. It will | |
* be passed into the callback and accessible via |
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
#include <stdio.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <dirent.h> | |
#include <string.h> | |
#include <stdbool.h> | |
#include <limits.h> | |
#include <stdlib.h> | |
#include <errno.h> |