Skip to content

Instantly share code, notes, and snippets.

View simophin's full-sized avatar

Fanchao Liu simophin

View GitHub Profile
@simophin
simophin / sd-wpa-supplicant
Created May 18, 2026 00:38
A systemd based mkinitcpio hook to authenticate wifi, used togeter with mkinitcpio-systemd-extra. Save under /etc/initcpio/install/.
#!/usr/bin/bash
build() {
add_binary /usr/bin/bash
add_binary /usr/bin/wpa_supplicant
add_binary /usr/bin/wpa_cli
add_binary /usr/bin/rfkill
# WPA config for initramfs only.
add_dir /etc/wpa_supplicant
@simophin
simophin / screen-runner.sh
Created December 19, 2022 23:24
A script to set a proxy on a device and forward the screen
#!/bin/bash
set -e
ID=$(adb devices | tail -n +2 | grep device | grep -v emulator | gawk '{print $1}' | head -n 1)
if [[ -z $ID ]]; then
notify-send 'screen-runner' 'No device available'
exit 1
fi