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> | |
int | |
main(void) | |
{ | |
puts("Hello World!"); | |
return 0; | |
} |
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 <errno.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/* WARNING! | |
* | |
* Horrible linked list :p | |
*/ |
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
int | |
max(int a, int b, int c, int d) | |
{ | |
int tmp1, tmp2; | |
tmp1 = (a > b) ? a : b; | |
tmp2 = (c > d) ? c : d; | |
return (tmp1 > tmp2) ? tmp1 : tmp2; | |
} |
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
static int | |
add_to_pfds(struct server *s, struct sockaddr_storage *addr, const int new_fd) | |
{ | |
struct pollfd *new_pfd; | |
struct client *new_cl; | |
if (s->cl_count > MAX_CLIENTS) | |
goto err; | |
/* Resize pdfs and client array */ |
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
/* moeproj -- Moe Projector | |
* | |
* # Example (file contents): | |
* | |
* -[ This is title 1 ]- | |
* This is the body | |
* | |
* -[ Title 2 ]- | |
* boooodyyy | |
* |
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
/* netsp - A simple bandwidth monitor (can monitor multiple network interfaces) | |
* | |
* Arthur Lapz <[email protected]> | |
* | |
* MIT License | |
*/ | |
#include <errno.h> | |
#include <dirent.h> | |
#include <fcntl.h> | |
#include <stddef.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
/* | |
* Arthur Lapz <[email protected]> | |
*/ | |
#ifndef ___AUTO_QUEUE_H___ | |
#define ___AUTO_QUEUE_H___ | |
#include <errno.h> | |
#include <stdint.h> | |
#include <stdlib.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
const std = @import("std"); | |
const Allocator = std.mem.Allocator; | |
const Thread = std.Thread; | |
const Mutex = Thread.Mutex; | |
const Condition = Thread.Condition; | |
pub fn BufferQueue(comptime T: type, comptime size: usize) type { | |
return struct { | |
allocator: Allocator, | |
is_alive: bool, |
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 std = @import("std"); | |
const fmt = std.fmt; | |
const mem = std.mem; | |
const io = std.io; | |
const net = std.net; | |
const os = std.os; | |
const log = std.log; | |
const time = std.time; | |
const linux = os.linux; |
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
/* compile: cc fturing.c -o fturing -luring -DNDEBUG -O3 */ | |
#include <endian.h> | |
#include <errno.h> | |
#include <error.h> | |
#include <liburing.h> | |
#include <libgen.h> | |
#include <netdb.h> | |
#include <stddef.h> | |
#include <stdint.h> | |
#include <stdio.h> |
OlderNewer