Instantly share code, notes, and snippets.

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 1
#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>
View tuner.ino
#include <limits.h>
#define E4 329.63
#define B3 246.94
#define G3 196.00
#define D3 146.83
#define A2 110.00
#define E2 82.41
#define SEMITONE 1.059463
#define CENT 1.0005777895
View counter.c
#include <avr/io.h>
int main(void) {
PORTB = 0;
DDRB = 0b1111;
uint8_t counter = 0;
uint8_t input=0;
uint8_t previous_input=0;
while(1) {
input = PINB & (1<<PINB4);