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 June 5, 2024 11:08
Windows RNDIS driver for Linux/RaspberryPi
# script parameters
param(
[ValidateSet("Sign", "UntrustCertificates")]
[string] $Mode = "Sign",
[string] $InfFile,
[string] $CommonName = "linux.local",
[switch] $Force
)
@vitouXY
vitouXY / Configure-Ethernet-RNDIS-PiZero-connection.ps1
Last active May 22, 2023 18:14
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 26, 2024 01:51
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
@leaguecodeuk
leaguecodeuk / txt
Created July 14, 2020 19:44
Unknown username "whoopsie" in message bus configuration file
Unknown username "whoopsie" in message bus configuration file (Crouton)
For some time I had this notification "Unknown username 'whoopsie' in message bus configuration file" coming up when I started my Ubuntu-server on my Chromebook via crouton. It seemed not to do anything wrong but hey, I hate to see error messages popping up on the screen and not knowing what it really means.
In my search I've learned that the user 'whoopsie' is being used for the error reporting daemon in Ubuntu.
System Description:
Toshiba Chromebook 2:
Intel® Celeron® Processor N2840
Intel® HD Graphics
4GB DDR3 1600MHz
@ultrox
ultrox / resources.md
Last active June 30, 2023 22:54
Building Dactyl
@artman41
artman41 / wsl-install_another_distro.md
Last active January 25, 2024 23:45
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 March 17, 2024 21:00
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 March 5, 2024 17:55
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