Instantly share code, notes, and snippets.

View gbsynth.ino
#include <SPI.h>
#include "registers.h"
#define SEMI 1.059463
#define LED 20
#define BITS(val, ofst, wdt) (((val) & ((1<<wdt)-1)) << ofst)
void writeReg(byte addr, byte data) {
View parse.py
import re
import sys
import glob
import pandas as pd
import matplotlib.pyplot as plt
regex = """(?P<datetime>\d{1,2}\/\d{1,2}\/\d{1,4}, \d{1,2}:\d{1,2}( (?i)[ap]m)*) - (?P<name>.*(?::\s*\w+)*|[\w\s]+?)(?:\s+(?P<action>joined|left|was removed|changed the (?:subject to "\w+"|group's icon))|:\s(?P<message>(?:.+|\n(?!\d{1,2}\/\d{1,2}\/\d{1,4}, \d{1,2}:\d{1,2}( (?i)[ap]m)*))+))"""
files = sys.argv[1:]
View CMakeLists.txt
cmake_minimum_required(VERSION 3.10.2)
project(MyFancyProject)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
# 3rd party tools
find_package(Qt5 COMPONENTS
Widgets Network Qml Quick
Gamepad QuickControls2 REQUIRED)
View core.clj
(ns b3clj.core)
; TODO more stack operations
(defn spush
([stack item] (spush stack :data item))
([stack typ item] (update-in stack [typ] conj item)))
(defn spop
([stack] (spop stack :data))
([stack typ]
View frames.sh
ffmpeg -y -txt_format text -i sw.mkv out.srt;
mkdir frames;
mkdir memes;
timestamps=$(grep -oE " [0-9]{2}:[0-9]{2}:[0-9]{2}" out.srt);
i=0;
for ts in $timestamps
do
ffmpeg -y -ss $ts -copyts -i sw.mkv -vf subtitles=sw.mkv -frames:v 1 frames/out$i.jpg;
convert frames/out$i.jpg -background White -pointsize 32 label:'Can we really turn every line from the prequels into a meme?' +swap -gravity Center -append memes/meme$i.jpg;
View unpack.py
import struct
import numpy as np
import scipy.ndimage
import scipy.ndimage.filters
import requests
import zipfile
import io
import sys
import os
import matplotlib.pyplot as plt
View modulation.m
snd = audioread('plong.wav');
fs = 44100;
mono = snd(:,1);
%sound(mono, fs);
s = size(mono);
t = (1:s)/fs;
order = 5;
fcut = 20;
View keybase.md

Keybase proof

I hereby claim:

  • I am pepijndevos on github.
  • I am pepijndevos (https://keybase.io/pepijndevos) on keybase.
  • I have a public key ASBpP2Q0oF7CcBPSYl0l_NpOp8w0ugwR7RtEfAIINUWqHwo

To claim this, I am signing this object:

View config.h
#define TAPPING_TOGGLE 5
#define ONESHOT_TAP_TOGGLE 1
#define PREVENT_STUCK_MODIFIERS
View devOS.s
devos.o: file format elf32-littlearm
Disassembly of section .text:
c0008000 <_start>:
c0008000: e3a0d902 mov sp, #32768 ; 0x8000
c0008004: e59f4030 ldr r4, [pc, #48] ; c000803c <halt+0x8>
c0008008: e59f9030 ldr r9, [pc, #48] ; c0008040 <halt+0xc>