Skip to content

Instantly share code, notes, and snippets.

View untodesu's full-sized avatar
💣
アイウエオ > アエイオウ

Kirill GPRB untodesu

💣
アイウエオ > アエイオウ
View GitHub Profile
/* SPDX-License-Identifier: BSD-2-Clause */
/* Copyright (c), 2023, Kirill GPRB */
/**
* Implements a Telegram Bot.
* @see https://core.telegram.org/bots/api
*/
export class BotClient {
token: string;
secret?: string;
/* SPDX-License-Identifier: BSD-2-Clause */
/* Copyright (c), 2023, KanOS Contributors */
#include <kan/utf8.h>
#include <stdlib.h>
size_t mbtowc(wchar_t *restrict wc, const char *restrict s, size_t n)
{
size_t i, j;
size_t nchar;
wchar_t twc;
@untodesu
untodesu / 1.c
Created November 29, 2022 11:12
#include <stdio.h>
typedef float matrix4x4_t[4][4];
static float matrix_det(const matrix4x4_t m)
{
return
m[0][3] * m[1][2] * m[2][1] * m[3][0] - m[0][2] * m[1][3] * m[2][1] * m[3][0] - m[0][3] * m[1][1] * m[2][2] * m[3][0]+m[0][1] * m[1][3] * m[2][2] * m[3][0] +
m[0][2] * m[1][1] * m[2][3] * m[3][0] - m[0][1] * m[1][2] * m[2][3] * m[3][0] - m[0][3] * m[1][2] * m[2][0] * m[3][1]+m[0][2] * m[1][3] * m[2][0] * m[3][1] +
m[0][3] * m[1][0] * m[2][2] * m[3][1] - m[0][0] * m[1][3] * m[2][2] * m[3][1] - m[0][2] * m[1][0] * m[2][3] * m[3][1]+m[0][0] * m[1][2] * m[2][3] * m[3][1] +
@untodesu
untodesu / lar4.c
Created November 21, 2022 17:22
I sold this for 1500 RUB :)
/* note: most of unix editors such as
* vi/vim put a CR (newline character)
* at the very end of files, so the resulting
* amount of characters is increased by one. */
#include <stdio.h>
#include <stddef.h> /* size_t */
/* gets a specific bit of an integer */
#define bitval(c, bit) ((int)(((c) & (1 << (bit))) >> (bit)))
@untodesu
untodesu / packages.txt
Created November 16, 2022 16:38
A Gentleman's Clean-ArchLinux-Install Package Bundle
amd-ucode
base
base-devel
dhcpcd
git
grml-zsh-config
grub
linux
linux-firmware
linux-firmware-qlogic
@untodesu
untodesu / lw.c
Created September 21, 2022 13:52
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
FILE *ifp = NULL;
FILE *ofp = NULL;
char wrd[40] = { 0 };
char line[256] = { 0 };
@untodesu
untodesu / nig.c
Created September 15, 2022 15:58
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct book_s {
char author[128];
char name[128];
unsigned int year;
unsigned int value;
@untodesu
untodesu / stone.json
Last active September 14, 2022 18:33
{
"render": { "mode": "solid_box" },
"faces": {
"north": {
"culls_neighbours": true,
"culled_by_relatives": true,
"textures": [
"/textures/stone_0.png",
"/textures/stone_1.png"
]
in: graph [a b]:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? done!
in: begin [x]:
?
POINT: 0
Collapsing rib 0:1
POINT: 1
Collapsing rib 1:3
#include <ctype.h>
#include <stdio.h>
#include <string.h>
/* counts case-insensitive entries for ch */
static int numchars(const char *s, int ch)
{
int r, cv;
const char *sv;