Skip to content

Instantly share code, notes, and snippets.

View stevenlr's full-sized avatar
👋

Steven Le Rouzic stevenlr

👋
View GitHub Profile
@stevenlr
stevenlr / coc-settings.json
Last active February 26, 2021 13:28
Neovim configuration
{
"clangd.path": "C:\\Program Files\\LLVM11\\bin\\clangd.exe",
"clangd.semanticHighlighting": true
}
@stevenlr
stevenlr / main.rs
Created June 2, 2020 21:36
const fn murmur3 x64 128
#![feature(const_fn)]
#![feature(const_loop)]
#![feature(const_if_match)]
const fn fmix64(mut k: u64) -> u64 {
k ^= k >> 33;
k = k.overflowing_mul(0xff51afd7ed558ccd).0;
k ^= k >> 33;
k = k.overflowing_mul(0xc4ceb9fe1a85ec53).0;
k ^= k >> 33;
set guioptions-=m
set guioptions-=T
set guioptions-=r
set guifont=Consolas:h11
set backspace=2
set number
set smartindent
set shiftwidth=4
set tabstop=4
set softtabstop=4
@stevenlr
stevenlr / cpp.json
Created September 8, 2017 09:44
VSCode config
{
/*
// Place your snippets for C++ here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
@stevenlr
stevenlr / presets.json
Last active November 13, 2016 16:27
Redwood S4 world presets
{
"coordinateScale":471.0,
"heightScale":1.0,
"lowerLimitScale":1450.0,
"upperLimitScale":1450.0,
"depthNoiseScaleX":200.0,
"depthNoiseScaleZ":200.0,
"depthNoiseScaleExponent":0.5,
"mainNoiseScaleX":2888.0,
"mainNoiseScaleY":5000.0,
/**
* @file utask.c
* @brief user tasks and kernel config source
* @author
* @date
*/
#include "kuart.h"
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<keyframeOverlapThreshold>0.75</keyframeOverlapThreshold>
<featureMatchConfidence>0.5</featureMatchConfidence>
<registrationOptimizationIterations>50</registrationOptimizationIterations>
<imageMatchConfidenceThreshold>1.0</imageMatchConfidenceThreshold>
<nbClusters>4</nbClusters>
<clusteringStdDevThreshold>21</clusteringStdDevThreshold>
<madForegroundThreshold>3</madForegroundThreshold>
</configuration>
cmake_minimum_required(VERSION 2.6)
project(KuiperRace)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -I/opt/X11/include")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLEW_STATIC")
LINK_DIRECTORIES("~/local_install/lib")
LINK_DIRECTORIES("/usr/local/lib")
INCLUDE_DIRECTORIES("/usr/local/include")
cmake_minimum_required(VERSION 2.6)
project(Bloop)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -I/opt/X11/include")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLEW_STATIC")
LINK_DIRECTORIES("~/local_install/lib")
LINK_DIRECTORIES("/usr/local/lib")
INCLUDE_DIRECTORIES("/usr/local/include")
@stevenlr
stevenlr / erosion.c
Last active August 29, 2015 14:15
Erosion
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <limits.h>
#include <float.h>
#define RADIUS (1)
#define DIAMETER (RADIUS * 2 + 1)
#define NNEIGHBORS (DIAMETER * DIAMETER)
#define ITERATIONS 64