Skip to content

Instantly share code, notes, and snippets.

View danielledeleo's full-sized avatar

Dani De Leo danielledeleo

View GitHub Profile
@pojntfx
pojntfx / main.sh
Last active January 17, 2024 22:28
Setup a WireGuard (Mullvad) VPN Gateway for a LAN/WLAN
# IPv6 is currently broken - use a double VPN if you need it. In the future, using NAT6 will fix this.
# You can also use this to bridge e.g. a WLAN network into a LAN network - simply skip the WireGuard/Mullvad setup and
# use your WLAN adapter (e.g. wlp3s0) as instead of de-fra-wg-001.
# Setup Mullvad first according to https://mullvad.net/en/help/easy-wireguard-mullvad-setup-linux/
sudo systemctl enable --now wg-quick@de-fra-wg-001
# On Debian only
sudo tee /etc/NetworkManager/conf.d/99-unmanaged-devices.conf<<'EOT'
[keyfile]
@pojntfx
pojntfx / main.sh
Last active August 22, 2022 03:00
Low-latency, hardware-accelerated peer-to-peer video streaming over TCP/UDP with GStreamer
# Note: You can use `x-rtp` instead of `x-gdp`, `rtp<codec>pay` instead of `gdppay`, `rtp<codec>depay` instead of `gdpdepay` to use RTP instead of GStreamer's format
# Get available formats
v4l2-ctl -d /dev/video0 --list-formats-ext
# Raw (max: 24 FPS 480p)
gst-launch-1.0 -v v4l2src ! 'video/x-raw, width=(int)864, height=(int)480, framerate=24/1' ! videoconvert ! queue ! rtpvrawpay ! queue ! udpsink host=127.0.0.1 port=1234
gst-launch-1.0 udpsrc address=127.0.0.1 port=1234 ! \
"application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, \

unifi

Connect

SSH into a device with ubnt if not adopted

$ ssh ubnt@192.168.1.1
Welcome to EdgeOS
@pojntfx
pojntfx / README.md
Last active May 20, 2024 22:59
Boot Linux or OpenBSD on the PowerBook G4 (PowerPC/ppc32)

Boot Linux or OpenBSD on the PowerBook G4 (PowerPC/ppc32)

Creating the USB sticks

Use an older USB 2.0 stick, newer ones will most certainly not work.

sudo dd if=debian-11.0.0-powerpc-NETINST-1.iso of=/dev/sda1 status=progress # Or use GNOME Disks, Etcher etc.
sync
@pojntfx
pojntfx / main.sh
Last active July 5, 2024 23:06
GPU-accelerated, UEFI-, Secure Boot, TPM 2.0, audio- and webcam-enabled QEMU using Virgil 3D or Spice and QXL
qemu-system-x86_64 -enable-kvm -m 4096 -smp $(nproc) -cpu host -device ac97 -audiodev pipewire,id=audio0 -device intel-hda -device hda-duplex,audiodev=audio0 -usb -device usb-tablet -device virtio-keyboard-pci -net nic -net user -cdrom distro.iso
# For Virgil 3D GPU acceleration (fast but Linux-only):
-device virtio-vga-gl
# For QXL GPU acceleration (slower but more compatible):
-device qxl
# For GTK display:
-display gtk,gl=on,grab-on-hover=on
# For SDL display:
-display sdl,gl=on
# For Spice display: