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 <stdio.h> | |
| static void write(FILE* f, const char* fmt, ...) | |
| { | |
| va_list ap; | |
| va_start(ap, fmt); | |
| char ch; | |
| while ((ch = *fmt++)) | |
| { |
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
| // generic A* pathfinding | |
| // | |
| // INTERFACE | |
| // | |
| // mandatory macros | |
| #ifndef ASTAR_POS_TYPE | |
| #error ASTAR_POS_TYPE should specify position type |
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
| EGL_VERSION: 1.5 | |
| EGL_VENDOR: NVIDIA | |
| EGL_EXTENSIONS: | |
| EGL_EXT_buffer_age, EGL_EXT_client_sync, | |
| EGL_EXT_create_context_robustness, EGL_EXT_output_base, | |
| EGL_EXT_stream_acquire_mode, EGL_EXT_sync_reuse, EGL_IMG_context_priority, | |
| EGL_KHR_config_attribs, EGL_KHR_create_context_no_error, | |
| EGL_KHR_context_flush_control, EGL_KHR_create_context, | |
| EGL_KHR_display_reference, EGL_KHR_fence_sync, | |
| EGL_KHR_get_all_proc_addresses, EGL_KHR_partial_update, |
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 | |
| #define MEOW_HASH_VERSION 5 | |
| #define MEOW_HASH_VERSION_NAME "0.5/calico" | |
| // Meow hash v0.5 with ARMv8 Crypto Extension instructions | |
| // Ported from https://github.com/cmuratori/meow_hash | |
| // Performance on Pine A64 (Cortex-A53, 1.2GHz) | |
| // (compiled with clang v10.0 with -O3 -mcpu=cortex-a53) |
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 | |
| #define MEOW_HASH_VERSION 5 | |
| #define MEOW_HASH_VERSION_NAME "0.5/calico" | |
| // Meow hash v0.5 in C without dependency on special CPU instructions | |
| // Ported from https://github.com/cmuratori/meow_hash | |
| // Performance on Ryzen 9 3950X | |
| // AESNI code = ~16 bytes/cycle |
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
| #!/usr/bin/env python3 | |
| import os | |
| import os.path | |
| import sys | |
| from datetime import datetime | |
| from zipfile import ZipFile, ZipInfo, ZIP_DEFLATED | |
| # which files to make executable | |
| EXECUTABLE = [ |
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
| $ cat /etc/issue | |
| Arch Linux \r (\l) | |
| $ uname -a | |
| Linux archlinux 5.4.38-1-ARCH #1 SMP PREEMPT Wed May 6 11:05:57 MDT 2020 aarch64 GNU/Linux | |
| ##### EGL info | |
| EGL client extensions = EGL_EXT_client_extensions EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug EGL_EXT_platform_device EGL_MESA_platform_gbm EGL_KHR_platform_gbm |
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
| // cl.exe xbox_test.c /link setupapi.lib user32.lib | |
| #include <windows.h> | |
| #include <setupapi.h> | |
| #include <dbt.h> | |
| #include <stdio.h> | |
| /// interface | |
| #define XBOX_MAX_CONTROLLERS 16 |
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
| // gcc -g demo.c -ldl | |
| #define _GNU_SOURCE | |
| #include <stdio.h> | |
| #include <dlfcn.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <signal.h> | |
| #include <unistd.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
| // | |
| // First download glcorearb.h, wglext.h and platform.h files | |
| // Then compile: cl.exe capture_desktop_dxgi_gl.c /I. d3d11.lib dxgi.lib dxguid.lib gdi32.lib opengl32.lib user32.lib dwmapi.lib | |
| // | |
| #define COBJMACROS | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <windows.h> | |
| #include <d3d11.h> |