Skip to content

Instantly share code, notes, and snippets.

View sivinnguyen's full-sized avatar

Huy Vu~ sivinnguyen

View GitHub Profile
@0x7d7b
0x7d7b / RPI_OTG.md
Last active September 19, 2022 22:03
Raspberry Pi Zero - Bridge Network Setup

The goal of this article is to explain how to install one or many Raspberry Pi 3 B+ devices connected with one to four Raspberry Pi Zero 1.3 devices each via USB OTG networking.

Preview

Each device - Pi and Zero - will be connected to the network 192.168.0.0/24. Each Zero will be connected via USB OTG to the Pi. That will establish a network between the two devices. On each Pi a network bridge will be configured to forward the traffic between the Pi ethernet port and the connected USB ports.

Their individual hostname/IP pattern will be:

10.lab | 192.168.0.10 (1st Pi)
20.lab | 192.168.0.20 (2nd Pi)
@tjvr
tjvr / 99-pico.rules
Created April 6, 2021 19:08
Raspberry Pi Pico/RP2040 udev rules
# /etc/udev/rules.d/99-pico.rules
# Make an RP2040 in BOOTSEL mode writable by all users, so you can `picotool`
# without `sudo`.
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="0666"
# Symlink an RP2040 running MicroPython from /dev/pico.
#
# Then you can `mpr connect $(realpath /dev/pico)`.
SUBSYSTEM=="tty", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0005", SYMLINK+="pico"
@jdoubleu
jdoubleu / DriverHelper.ps1
Last active April 7, 2025 10:01
Windows RNDIS driver for Linux/RaspberryPi
# script parameters
param(
[ValidateSet("Sign", "UntrustCertificates")]
[string] $Mode = "Sign",
[string] $InfFile,
[string] $CommonName = "linux.local",
[switch] $Force
)
@xarinatan
xarinatan / networked pulseaudio.md
Last active March 28, 2025 16:45
How to set up PulseAudio over Network

How to set up PulseAudio over Network

PulseAudio actually has great networking capabilities. Especially when combined with Avahi/Zeroconf it is especially easy to set up, though technically it should also be possible without.

Setting up the server

  • Open /etc/pulseaudio/default.pa
  • At the end of the file, add load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.254.0/24 auth-anonymous=1 to activate networked audio from 192.168.254.0-255 without needing authentication.
  • Kill pulseaudio, it should be auto-restarted, or restart your login session to activate the changes. You should now be able to set PULSE_SERVER=192.168.254.XXX and have the remote audio working! If not check the firewall settings, PulseAudio seems to open a random port by default.

Setting up automatic configuration and discovery

  • On both the server and client, install pulseaudio-module-zeroconf and avahi, then after installing make sure Avahi always runs by running systemctl enable --now avahi-daemon
@vitouXY
vitouXY / Configure-Ethernet-RNDIS-PiZero-connection.ps1
Last active May 13, 2025 14:11
Raspberry Pi Zero W - USB Gadget (libcomposite) - TinyCoreLinux (piCore)
# copyright Threadsec Inc
# This script auto-configure and ssh auto-connect to RPi ZERO Ethernet gadget VID:0x1d6b PID:0x0137
# This script require admin right to access to adapter conf.
# https://threadsec.wordpress.com/raspberry-pi-zero-usb-composite-gadget/
#
# Edit $user=""
# Windows 10 : As Admin, run:
# powershell -ep bypass -file Configure-Ethernet-RNDIS-PiZero-connection.ps1
#
Clear-Host
@ppoffice
ppoffice / README.md
Last active June 7, 2025 12:10
Install Visual Studio Code (actually code-server) on Android
  1. Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.

  2. Update system packages in Termux:

    $ pkg update -y
@ultrox
ultrox / resources.md
Last active June 30, 2023 22:54
Building Dactyl
@artman41
artman41 / wsl-install_another_distro.md
Last active April 5, 2025 19:32
Instructions on how to install a custom distro in WSL2 (Windows SubSystem for Linux 2)

WSL install another distro

  1. Here are some default vars for the process
ISO_DIR=~/fedora;
ROOTFS_MOUNT_DIR=/mnt/contents

DISTRO_LOCATION=
@lbussy
lbussy / README.md
Last active June 29, 2025 22:45
External Button Shutdown for Raspberry Pi

Shutdown Raspberry Pi with a Single Button

There are two methods:

  1. Scripted Method
  2. Boot Overlay Method (also below as "tl;dr")

tl;dr Version

Add the following to your /boot/config.txt and reboot:

@ianfinch
ianfinch / rpi4-usb.sh
Last active February 3, 2025 23:44
Raspberry Pi 4 USB Gadget
#!/bin/bash
# Set up a Raspberry Pi 4 as a USB-C Ethernet Gadget
# Based on:
# - https://www.hardill.me.uk/wordpress/2019/11/02/pi4-usb-c-gadget/
# - https://pastebin.com/VtAusEmf
if ! $(grep -q dtoverlay=dwc2 /boot/config.txt) ; then
echo "Add the line dtoverlay=dwc2 to /boot/config.txt"
exit
fi