Skip to content

Instantly share code, notes, and snippets.

View SuperFola's full-sized avatar
:octocat:
Making more keyboards

Alexandre Plateau SuperFola

:octocat:
Making more keyboards
View GitHub Profile
KeyASCII ASCII Common Name
K_BACKSPACE \b backspace
K_TAB \t tab
K_CLEAR clear
K_RETURN \r return
K_PAUSE pause
K_ESCAPE ^[ escape
K_SPACE space
K_EXCLAIM ! exclaim
import sys
import string
import random
syllable_patterns = [
# _ => consonant
# -, + => vowel
"_-"
, "_-+"
, "__-"
@SuperFola
SuperFola / CMakeLists.txt
Last active July 2, 2019 10:47
a default cmakelists for... anything (nearly)
cmake_minimum_required(VERSION 3.8) # using the latest version atm
project(project_name)
set(LIB_NAME lib_${PROJECT_NAME})
if (CMAKE_BUILD_TYPE MATCHES Debug)
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg -g -no-pie")
elseif (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MTd")
@SuperFola
SuperFola / git_changelog.py
Last active August 16, 2020 16:41
A Python script to generate a CHANGELOG.md file using git history
import subprocess
import os
ADDED_WORDS = "added".split(' ')
CHANGED_WORDS = "updated changed enhanced".split(' ')
REMOVED_WORDS = "removed deleted".split(' ')
NAMES = ['added', 'changed', 'removed', 'unclassified changes']
def get_msg_type(msg):

Keybase proof

I hereby claim:

  • I am SuperFola on github.
  • I am superfola (https://keybase.io/superfola) on keybase.
  • I have a public key whose fingerprint is BCA1 F845 E043 2EF2 E9D9 839B 95F9 CA97 C6D4 91AD

To claim this, I am signing this object:

@SuperFola
SuperFola / kruskal.cpp
Created April 26, 2021 18:52
kruskal algorithm implementation
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
class Edge
{
public:
Edge(int s, int d, int w) :
m_s(s), m_d(d), m_w(w)
@SuperFola
SuperFola / cpp17-std-parallelism.cpp
Last active May 17, 2021 11:44
A demonstration of how to add parallelism using only standard C++ 17
#include <iostream>
#include <future>
#include <vector>
#include <array>
#include <numeric> // needed for the std::iota part of the example
using VecIt = std::vector<int>::iterator;
int task(std::size_t task_id, VecIt begin, std::size_t count)
{