Skip to content

Instantly share code, notes, and snippets.

View Simon-L's full-sized avatar
😠
Leaving Github!

FergusL Simon-L

😠
Leaving Github!
  • Not Microsoft
  • Paris, France
View GitHub Profile
@Simon-L
Simon-L / .config
Last active April 9, 2023 15:21
6.2 .config for rg351m
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 6.2.0 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="aarch64-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=120200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24000
@Simon-L
Simon-L / panic.log
Created April 9, 2023 14:51
rg351m boot panic 6.3-rc5
[ 2.795586] dw-mipi-dsi-rockchip ff450000.dsi: Failed to create device link (0x180) with backlight
[ 2.800733] usb 1-1.2: Manufacturer: OpenSimHardware
[ 2.800742] usb 1-1.2: SerialNumber: 0M25O6T36BNAKO
[ 2.829226] input: OpenSimHardware OSH PB Controller Keyboard as /devices/platform/ff300000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:1209:3100.0001/input/input2
[ 2.831686] rockchip-drm display-subsystem: bound ff460000.vop (ops vop_component_ops)
[ 2.854101] rockchip-drm display-subsystem: bound ff450000.dsi (ops dw_mipi_dsi_rockchip_ops)
[ 2.865710] [drm] Initialized rockchip 1.0.0 20140818 for display-subsystem on minor 0
[ 2.874892] ------------[ cut here ]------------
[ 2.880096] WARNING: CPU: 2 PID: 9 at drivers/gpu/drm/drm_mode_object.c:45 __drm_mode_object_add+0x68/0xd8
[ 2.890939] Modules linked in:
@Simon-L
Simon-L / ADAREnvelope.h
Created January 9, 2023 16:53
Reusing ADAREnvelope...
// Taken from Surge XT for Rack, minimal changes - 2023 SL
// Original license below:
/*
* SurgeXT for VCV Rack - a Surge Synth Team product
*
* Copyright 2019 - 2022, Various authors, as described in the github
* transaction log.
*
* SurgeXT for VCV Rack is released under the Gnu General Public Licence
* V3 or later (GPL-3.0-or-later). The license is found in the file
@Simon-L
Simon-L / Makefile
Last active October 28, 2022 07:39
# Untar this in current dir
# https://github.com/alandefreitas/matplotplusplus/releases/download/v1.1.0/matplotplusplus-1.1.0-Linux.tar.gz
LDFLAGS = lib/libmatplot.a lib/Matplot++/libnodesoup.a -lpng -lz -ltiff -ljpeg
CXXFLAGS = -std=c++17 -I../chowdsp_wdf/include -Iinclude
SRC = main.cpp
OUT = main
$(OUT): $(SRC)
@Simon-L
Simon-L / main.cpp
Created June 9, 2022 16:09
bare minimum dlsym (dlopen bug on box64)
#include <cstdio>
#include <dlfcn.h>
typedef void (*LibFunc)();
LibFunc getSym(const char* sopath) {
void* handle = dlopen(sopath, RTLD_NOW | RTLD_LOCAL);
if (!handle) {
printf("Oops exit1!\n");
return (LibFunc)(0);
@Simon-L
Simon-L / README.md
Created June 9, 2022 00:24
__cxa_pure_virtual

Compile: g++ -std=c++11 -fPIC -fno-gnu-unique -MMD -MP -g -O3 -march=nehalem -funsafe-math-optimizations -fno-omit-frame-pointer -o purevirtual main.cpp -static-libstdc++ -static-libgcc
Try it on your x64 host? Segfault!
Remove the static linking? It catches pure virtual call!

Useful read? https://stackoverflow.com/a/14082540

Result on arm64:

box64 ./purevirtual
@Simon-L
Simon-L / install.sh
Created September 2, 2017 23:57
How to install prebuilt puredata from zip
cd pd-x.xx-x/
sudo cp bin/* /usr/local/bin/
sudo mkdir /usr/local/lib/pd
sudo cp -r bin doc extra po tcl /usr/local/lib/pd/
@Simon-L
Simon-L / Bitwig_TempoBeatLED_ESP8266.ino
Last active November 19, 2017 15:26
Tempo and time signature indicator with RGB LED for Bitwig Studio using Wemos D1 mini (esp8266) and Neopixel led strip.
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <OSCMessage.h>
#include <OSCBundle.h>
#include <OSCData.h>
#include "FastLED.h"
// How many leds in your strip?
#define NUM_LEDS 8
#define DATA_PIN 2
@Simon-L
Simon-L / index.html
Created March 7, 2017 14:34 — forked from martinsik/index.html
Simple WebSocket server based on libwebsockets. For full description read http://martinsikora.com/libwebsockets-simple-websocket-server
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
window.WebSocket = window.WebSocket || window.MozWebSocket;
var websocket = new WebSocket('ws://127.0.0.1:9000',
@Simon-L
Simon-L / index.js
Last active March 6, 2017 11:04
What are the pd objects supported by Heavy right now...? And is that patch supported?!
const fs = require('fs')
var $ = require('cheerio')
var request = require('request')
var pdfu = require('pd-fileutils')
var file_pd = fs.readFileSync(process.argv[2]).toString()
var nodes = pdfu.parse(file_pd).nodes
function gotHTML(err, resp, html) {