Skip to content

Instantly share code, notes, and snippets.


Han Wu wuhanstudio

View GitHub Profile
wuhanstudio /
Last active Jun 30, 2022
Install Lattice Diamond on Ubuntu / PopOS
# vim: set ts=4 sw=4 expandtab syntax=python:
FTDI device permission fixer
Can be called from a udev rule to ensure connected FTDI devices have
world-writable permissions for use by user applications
J. Hipps <>
wuhanstudio / gist:f75f0092cca1c2bdab00450370bdcdba
Created Apr 23, 2022
Fix Ubuntu / Pop!OS Intel Sound Card
View gist:f75f0092cca1c2bdab00450370bdcdba
1. Open configuration
sudo vim /etc/modprobe.d/alsa-base.conf
2. Add to the last line:
options snd-hda-intel model=auto
3. Reboot
View gist:a77fc07aaaef05730a4f51dbf83c41fc
# Enable kernel module
echo "g_serial" >> /etc/modules
nano /etc/inittab
::respawn:/sbin/getty -L ttyAM0 115200 vt100
::respawn:/sbin/getty -L ttyGS0 115200 vt100
wuhanstudio /
Last active Nov 25, 2022
Armbian on QEMU
# Install QEMU-6.1.0
tar xvJf qemu-6.1.0.tar.xz
cd qemu-6.1.0
sudo make install
# Download Armbian (Ubuntu Focal 20.04) for OrangePi PC
View etc_rc.local
#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
View Client
# Mount NFS Disk
sudo apt install nfs-common
sudo mkdir /mnt/data
sudo mount SERVER_IP:/mnt/data /mnt/data
View gist:ae517998c80fd26d593ad984d6cf8fd4
# Pull Images
kubeadm config images list |sed -e 's/^/docker pull /g' -e '' |sh -x
# Retag Images
docker images |grep google_containers |awk '{print "docker tag ",$1":"$2,$1":"$2}' |sed -e '' |sh -x
# Remove previous images
docker images |grep google_containers |awk '{print "docker rmi ", $1":"$2}' |sh -x
# Kubeadm
View gist:746a5fdef97820e36591f3dbdf47fba8
# Outputs from three commands below shall be identical
openssl req -in -pubkey -noout -outform pem | sha256sum
# Private Key
openssl pkey -in -pubout -outform pem | sha256sum
# Cert
openssl x509 -in -pubkey -noout -outform pem | sha256sum
View gist:957bc65898661ccb306107d26b05d414
# /etc/ssh/sshd_config
# Port forwarding
AllowAgentForwarding yes
AllowTcpForwarding yes
GatewayPorts yes
# X11
X11Forwarding yes
X11UseLocalhost no