Skip to content

Instantly share code, notes, and snippets.

View michahoiting's full-sized avatar

Micha Hoiting michahoiting

View GitHub Profile
@Voltra
Voltra / Session.hpp
Created August 17, 2018 15:41
A session middleware for the C++ web framework Crow
#pragma once
#include <functional>
#include <unordered_map>
#include <string>
#include <mutex>
#include <sstream>
#include <locale>
#include <cstdlib>
#include <algorithm>
anonymous
anonymous / -
Created February 22, 2018 19:22
System: Host: MacBookPro Kernel: 4.13.0-36-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3) dm: lightdm Distro: Linux Mint 18.3 Sylvia
Machine: System: Apple (portable) product: MacBookPro5 5 v: 1.0 Chassis: type: 10 v: Mac-F2268AC8
Mobo: Apple model: Mac-F2268AC8 Bios: Apple v: MBP55.88Z.00AC.B03.0906151708 date: 06/15/09
CPU: Dual core Intel Core2 Duo P8700 (-MCP-) cache: 3072 KB
flags: (lm nx sse sse2 sse3 sse4_1 ssse3 vmx) bmips: 10083
clock speeds: min/max: 798/2527 MHz 1: 798 MHz 2: 2394 MHz
Graphics: Card: NVIDIA C79 [GeForce 9400M] bus-ID: 02:00.0 chip-ID: 10de:0863
Display Server: X.Org 1.18.4 drivers: nouveau (unloaded: fbdev,vesa)
Resolution: 1280x800@61.18hz
@michahoiting
michahoiting / gist:b3b57e969a14df37fa00085ac6ee44f6
Created June 27, 2017 13:49
zeilen meebrengen (creative commons)
zeilen meebrengen (creative commons)
reddingsvest >=275N
life-line
laag 1 synthetisch ondergoed
laag 2 fleece trui / broek / sokken
laag 3 wind stopper jack
laag 4 zeil pak
zeil schoenen
zeil laarzen
@speters
speters / uid.ino
Last active January 21, 2024 19:59
Arduino atmega328p unique id/serial number
#include <avr/boot.h>
void print_val(char *msg, uint8_t val)
{
Serial.print(msg);
Serial.println(val, HEX);
}
void setup(void)
{
@andrewelkins
andrewelkins / install-docker-on-linux-mint-18.sh
Last active February 2, 2020 21:53
Install Docker on Linux Mint 18
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/andrewelkins/1adc587feb610f586f8f40b50b7efc3a/install-docker-on-linux-mint-18.sh | bash -x
##########################################
# Kernel version http://stackoverflow.com/a/4024263
versionlte() {
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}
versionlt() {
@omegahm
omegahm / create_labels.sh
Created April 7, 2015 19:00
Create Gtihub labels from Bash
#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Platform
@adamgreig
adamgreig / 00-README.md
Last active August 12, 2022 08:37
Run embedded Rust code on your STM32F4

Embedded Rust on STM32F4

My notes from implementing Job Vranish's excellent guide.

Follow along with the guide above, getting rustc from rustup or similar:

rustc 1.0.0-nightly (dcaeb6aa2 2015-01-18 11:28:53 +0000)
binary: rustc
commit-hash: dcaeb6aa23ecba2dc2af870668a9239136d20fa3

commit-date: 2015-01-18 11:28:53 +0000

# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@RIAEvangelist
RIAEvangelist / Install Cloud9 on local or remote computer, server, or raspberry pi
Last active June 6, 2023 03:37
This gist will help you install Cloud9 on your local or remote computer, server, or even your raspberry pi. Many people are having issues at the time of this Gist's creation.
Complete installation process:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y python-software-properties python make build-essential g++ curl libssl-dev apache2-utils git libxml2-dev
sudo apt-get update
sudo apt-get upgrade
cd ~
mkdir git
cd ~/git
@coastwise
coastwise / vtable_example.c
Created June 17, 2011 16:55
one way to implement vtables in C
/* Original Author: Tom Gunn
* http://www.daniweb.com/software-development/c/threads/228277
*/
#include <stdio.h>
/* class definitions */
typedef struct Base
{
void (**vtable)();