Skip to content

Instantly share code, notes, and snippets.

View DinkDonk's full-sized avatar
🎹
Working on a super secret synth project

Rune Warhuus DinkDonk

🎹
Working on a super secret synth project
  • DinkDonk / Elektrofon
  • Ebbesens Gate 6 1636, Gamle Fredrikstad, Norway
View GitHub Profile
@DinkDonk
DinkDonk / main.c
Last active October 22, 2022 15:48
uint8_t to bit-field in C
#include <stdio.h>
#include <stdint.h>
typedef union {
uint8_t value;
struct {
unsigned flag0:1;
unsigned flag1:1;
unsigned flag2:1;
unsigned flag3:1;
@DinkDonk
DinkDonk / README.md
Created March 12, 2020 20:33
Raspberry PI Audio Setup

Add user to audio group

$ usermod -a -G audio pi

Set limits

$ sudo nano /etc/security/limits.conf
<SCSI2SD>
<S2S_BoardCfg>
<!-- ********************************************************
Enable the onboard active terminator.
Both ends of the SCSI chain should be terminated. Disable
only if the SCSI2SD is in the middle of a chain with other
devices.
********************************************************* -->
<enableTerminator>true</enableTerminator>
<unitAttention>false</unitAttention>
@DinkDonk
DinkDonk / Raspberry OpenOCD.md
Created December 28, 2018 14:21
Raspberry pi OpenOCD install
$ sudo apt-get update
$ sudo apt-get install git autoconf libtool make pkg-config libusb-1.0-0 libusb-1.0-0-dev
$ git clone http://openocd.zylin.com/openocd &amp;&amp; cd openocd &amp;&amp; ./bootstrap
@DinkDonk
DinkDonk / g-code-cheat-sheet.md
Last active April 25, 2017 17:46
G-code cheat sheet

Homing

$H

Defining WCS (Work Coordinate Systems)

  1. Home the machine
  2. Jog to desired zero position
@DinkDonk
DinkDonk / restart-wacom-driver.sh
Last active June 26, 2023 02:33
Restart Wacom driver on Mac OS
#!/bin/sh
# This script depends on coreutils.
# It can be installed with homebrew:
# $ brew install coreutils
gtimeout 3s /Library/Application\ Support/Tablet/WacomTabletDriver.app/Contents/MacOS/WacomTabletDriver
@DinkDonk
DinkDonk / setup.md
Last active January 16, 2024 00:22
Raspberrypi (raspbian) VPN passthrough.

This will set up a passthrough between the eth0 interface and the wan0 interface, with a VPN connection in-between.
You can then connect a machine to the ethernet port of the raspberrypi, and that machines network traffic will pass through the vpn tunnel on the raspberrypi.

The device connected to the ethernet plug of the PI should be set up with:

IP: 192.168.0.2
Mask: 255.255.255.0
Gateway: 192.168.0.1

Set up interfaces

@DinkDonk
DinkDonk / .xinitrc
Created July 5, 2014 22:29
~/.xinitrc script to load i3 window manager
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done