Skip to content

Instantly share code, notes, and snippets.

View SollyBunny's full-sized avatar

Solly SollyBunny

View GitHub Profile
@nickolayl
nickolayl / timer.c
Created May 25, 2020 11:26
Cross-platform, drop-in, high resolution timer for C/C++ projects.
/* ----------------------------------------------------------------------- */
/*
Easy embeddable cross-platform high resolution timer function. For each
platform we select the high resolution timer. You can call the 'ns()'
function in your file after embedding this.
*/
#include <stdint.h>
#if defined(__linux)
# define HAVE_POSIX_TIMER
# include <time.h>
@fnky
fnky / ANSI.md
Last active August 9, 2025 08:01
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27