Skip to content

Instantly share code, notes, and snippets.

Frederic Meyer fleroviux

Block or report user

Report or block fleroviux

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fleroviux / ansi-colors.c
Created Mar 19, 2018
MinGW 32/64 enable ANSI color sequences on Windows 10
View ansi-colors.c
// Windows 10 supports ANSI color code sequences, however they need to be enabled
// and apparently MinGW/MinGW-w64 doesn't support set the required STDOUT flag yet. This code enables ANSI VT processing
// on MinGW compilers however it hasn't been tested on older Windows systems yet which do not have that flag.
// So if you use this in production code you probably have to check if the platform is Windows 10.
#include <stdio.h>
#ifdef __MINGW32__
fleroviux / threads.cpp
Last active Sep 28, 2018
Minimal C++11 threading example for LF6 @MMBbS
View threads.cpp
#include <iostream>
#include <thread>
#include <chrono>
#include <mutex>
static std::mutex g_cout_mutex; /* Mutex means "mutually exclusive" */
* Count from zero to maximum number in a thread-safe manner.
View pow_mod.c
#include <stdio.h>
#include <stdint.h>
a mod n = r
a = p * q
p = an+x
q = bn+y
fleroviux / fft512.c
Last active Oct 31, 2018
Dead simple & stupid FFT512 implementation in C11
View fft512.c
#include <stdio.h>
#include <stdint.h>
#include <math.h>
#include <complex.h>
#ifndef M_PI
#define M_PI (3.14159265358979323846)
/* Permutation */
fleroviux /
Last active Mar 9, 2019
Bash script for compiling a GCC (cross) compiler
# Please install non-optional dependencies noted on this site:
# Compiler Configuration
GCC_VERSION="8.1.0" # GCC version
BIN_VERSION="2.30" # Binutils version
You can’t perform that action at this time.