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 with: gcc term.c -o term -lX11 ... | |
#define _XOPEN_SOURCE 600 | |
#include <X11/Xlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <poll.h> | |
#include <sys/ioctl.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
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <algorithm> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <sys/mman.h> | |
#include <unistd.h> | |
#include <fcntl.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
#include <stdarg.h> | |
#include <stddef.h> | |
#include <stdint.h> | |
#include <ctype.h> | |
#define FMT_PUT(dst, len, c) {\ | |
if(!(len) && check_bounds) goto end;\ | |
*(dst)++ = (c);\ | |
len--;\ | |
ret++;\ |
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 <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <algorithm> | |
#include <span> | |
#include <cstdint> | |
#include <type_traits> | |
#include <cassert> | |
#include <cstring> |
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 <iostream> | |
#include <iomanip> | |
#include <vector> | |
#include <string> | |
#include <string_view> | |
#include <elf.h> | |
struct symbol { | |
std::string_view name; | |
uintptr_t base; |
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 <stdlib.h> | |
#include <stdint.h> | |
#include <stddef.h> | |
#define __USE_GNU | |
#include <signal.h> | |
#include <ucontext.h> | |
#define OBJ_MAGIC_HIGH 0xDEADBEEF00000000 |
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
#ifndef BMPLDR_H | |
#define BMPLDR_H | |
#include <stdint.h> | |
#include <stddef.h> | |
#include <stdbool.h> | |
#ifdef __cplusplus | |
extern "C" { | |
#endif |
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
#pragma once | |
#include <epoxy/gl.h> | |
#include <cassert> | |
#include <memory> | |
#include <numeric> | |
#include <type_traits> | |
template <GLenum Type, typename Ptr = void *> | |
struct buffer { |
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 with: g++ gorbitsa.cpp -o gorbitsa -ftemplate-depth=99999999 -std=c++2a | |
* Tested with GCC 10.1, does *not* work with Clang 10 | |
*/ | |
#include <iostream> | |
#include <string_view> | |
#include <cctype> | |
#include <array> | |
#include <type_traits> |
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
/* | |
Requires compiler with C++20 concept support (GCC 10.1/Clang 10 or newer) | |
*/ | |
#include <unordered_map> | |
#include <concepts> | |
#include <iostream> | |
#include <variant> | |
#include <string> | |
#include <vector> |