Skip to content

Instantly share code, notes, and snippets.

View drahnr's full-sized avatar
🏗️

Bernhard Schuster drahnr

🏗️
View GitHub Profile
@geosp
geosp / thunderbolt-networking-guide.md
Created March 21, 2025 03:44
Thunderbolt Networking Setup on Linux

Thunderbolt Networking Setup on Linux

This guide documents the steps to enable and configure Thunderbolt networking on your Linux system (e.g., Ubuntu, Proxmox). It covers loading the necessary kernel modules, ensuring persistent interface naming, configuring a fixed IP address, and testing throughput with iperf3. Note that Thunderbolt 3/4 hardware advertises a raw bandwidth of 40 Gbps, but practical throughput is typically lower due to half‑duplex operation, protocol overhead, and system constraints.

Hardware Used in This Guide

This guide was developed and tested with the following hardware:

  • CPU: AMD Ryzen 9 PRO 6950H
    • 8 cores / 16 threads
  • 3.3 GHz base frequency / 4.94 GHz boost
@ilmpc
ilmpc / openapi.json
Created December 28, 2022 11:57
Deel staging server openapi
This file has been truncated, but you can view the full file.
{
"openapi": "3.0.1",
"info": {
"title": "Deel REST API",
"contact": {
"name": "Deel API Team",
"email": "apiteam@deel.com"
},
"termsOfService": "https://www.letsdeel.com/terms-of-service",
"version": "1.15.7"
@KuabeM
KuabeM / markdown_specialities.md
Created August 3, 2020 14:36
Markdown edge cases
#![cfg(feature = "native")] // required for data i/o
extern crate coaster_blas as co_blas;
extern crate coaster as co;
use std::fmt;
use crate::co::backend::{Backend, IBackend};
use crate::co::framework::{IFramework};
use crate::co::plugin::numeric_helpers::{cast, Float, NumCast};
@rofrol
rofrol / .gitignore
Last active January 17, 2022 16:20
Rust + Rocket + rust-postgres
target
@weppos
weppos / git-prs.md
Created March 28, 2016 23:30
PRs as Git Branches

If you want to download GitHub PRs to your local repository, you can use a little trick to download them as local branches.

Open the repository configuration file (.git/config) and search for the origin block. Change it from:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:USERNAME/REPOSITORY.git
@jpillora
jpillora / sshd.go
Last active August 13, 2025 02:26
Go SSH server complete example - Read more here https://blog.gopheracademy.com/go-and-ssh/
// A small SSH daemon providing bash sessions
//
// Server:
// cd my/new/dir/
// #generate server keypair
// ssh-keygen -t rsa
// go get -v .
// go run sshd.go
//
// Client:
@oubiwann
oubiwann / pull-request.md
Last active April 26, 2018 15:35 — forked from piscisaureus/pr.md
Getting pull request branches for a project

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section, e.g.:

@ragusa87
ragusa87 / bluetooth-a2dp
Last active December 17, 2024 15:51
Enable bluetooth A2DP on Raspberry-PI via pulseaudio. To install, edit /etc/udev/rules.d/99-input.rules and add the line: SUBSYSTEM=="bluetooth", RUN+="/usr/lib/udev/bluetooth" Then save this script as /usr/lib/udev/bluetooth and set it executable. Bluetooth devices must be linked first.
#!/bin/bash
# This script is called by udev when you link a bluetooth device with your computer
# It's called to add or remove the device from pulseaudio
#
#
# Output to this file
LOGFILE="/var/log/bluetooth_dev"
# Name of the local sink in this computer
@mdup
mdup / gist:5990899
Created July 13, 2013 14:27
Raspberry PI automatic A2DP receiver script. Handles several devices which may connect and disconnect live. Source: http://www.blackv.tk/projects/retropi/raspberry-pi-a2dp-audio-sink/
#!/bin/sh
#change if you don't use default audio out
AUDIOSINK="alsa_output.platform-bcm2835_AUD0.0.analog-stereo"
echo "Executing bluetooth script...|$ACTION|" >> /var/log/bluetooth_dev
ACTION=$(expr "$ACTION" : "\([a-zA-Z]\+\).*")
if [ "$ACTION" = "add" ]
then