Skip to content

Instantly share code, notes, and snippets.


Robin van Emden robinvanemden

View GitHub Profile

Installing darknet nnpack to run YOLOv3 on Raspberry pi 4

Build Instructions

1. Some of that you might need

1.1. Log in to Raspberry Pi using SSH. Always update upgrade first!

sudo apt-get update && sudo apt-get upgrade
View JpegFixer.h
#import <Foundation/Foundation.h>
static const uint8_t huffman_table[] =
0xFF, 0xC4, 0x01, 0xA2, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x01, 0x00, 0x03,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
0x0A, 0x0B, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02, 0x04, 0x03, 0x05,
robinvanemden / GCC compiler optimization for ARM-based
Last active Apr 11, 2021
GCC compiler optimization for ARM-based systems
View GCC compiler optimization for ARM-based

GCC compiler optimization for ARM-based systems

The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.

-mcpu, -march: Defining the CPU type and architecture

These flags can both be used to set the CPU type. Setting one or the other is sufficient.

GCC supports all Cortex-A processors up to A15 (2010). Example are 'cortex-a5', 'cortex-a7', 'cortex-a8', 'cortex-a9', 'cortex-a15'. For specific values on popular boards see table below.

robinvanemden / ttyecho.c
Created Feb 14, 2021 — forked from FUT/ttyecho.c
Send terminal command to a TTY terminal
View ttyecho.c
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <string.h>
#include <unistd.h>
void print_help(char *prog_name) {
printf("Usage: %s [-n] DEVNAME COMMAND\n", prog_name);
set -x
apt install flex bison
git clone --depth 1
cd WSL2-Linux-Kernel/tools/perf
make -j8
sudo cp perf /usr/local/bin
robinvanemden /
Last active Dec 30, 2020
Install latest protobuf c/c++ lib (at time of writing, 3.14.0) on Ubuntu 18.04 x86_64
sudo apt-get install autoconf automake libtool curl make g++ unzip
# git clone --recurse-submodules /root/protobuf
##### OR C/C++ VERSION ####
tar -zxvf protobuf-cpp-3.14.0.tar.gz

WebAssembly Summit 2020

Lin Clark's Talk - "WebAssembly Nanoprocess"

  • the missing functionality alongside WASI and Interface Types is something that provides "capability-based security".
  • Delegation of permissions to propagate down transitive dependencies
  • plan to use fine-grain form of per-module virtualization
  • A "WebAssembly nanoprocess" is just wasm, but follows a particular pattern.
robinvanemden / Makefile
Created Feb 14, 2020 — forked from keeferrourke/Makefile
Generic Makefile
View Makefile
# Generic makefile for a C project
# Written by Keefer Rourke <>
# This file is Public Domain or, in places where public domain works
# are not recognized, licensed as CC0. Legal text:
# <>
# This Makefile should not rely and any GNU-specific functionality,
# though it is based on the GNU make documentation which is available
# at: <>
robinvanemden / toUTF8Array.js
Created Dec 14, 2019 — forked from joni/toUTF8Array.js
toUTF8Array: Javascript function for encoding a string in UTF8.
View toUTF8Array.js
function toUTF8Array(str) {
var utf8 = [];
for (var i=0; i < str.length; i++) {
var charcode = str.charCodeAt(i);
if (charcode < 0x80) utf8.push(charcode);
else if (charcode < 0x800) {
utf8.push(0xc0 | (charcode >> 6),
0x80 | (charcode & 0x3f));
else if (charcode < 0xd800 || charcode >= 0xe000) {
View github_webhook.php
// Webhook code to update repo clone and execute required deployement code when new commit was pushed
// Webhook content-type should be set to application/json and a random secret code should be set too.
// Secret Random Code You set on github webhook settings
if(strcasecmp($_SERVER['REQUEST_METHOD'], 'POST') != 0){
throw new Exception('Request method must be POST!');