Skip to content

Instantly share code, notes, and snippets.

@svet-b
svet-b / wireguard_userspace.sh
Last active July 30, 2020 09:04
Install WireGuard userspace on Linux
sudo apt update && sudo apt upgrade
sudo apt install golang
sudo apt-get install libmnl-dev libelf-dev build-essential pkg-config
git clone https://git.zx2c4.com/wireguard-go
cd wireguard-go/
git checkout 0.0.20181001 # Get the desired release tag from `git tag`
make
sudo make install
sudo apt install npm
sudo npm install -g npm@latest
sudo npm install bower -g

git clone https://github.com/sabhiram/raspberry-wifi-conf.git
cd raspberry-wifi-conf
npm update
bower install
sudo npm run-script provision
@svet-b
svet-b / ext4_mac_docker.md
Created May 10, 2021 19:33
Mount and edit SD card image with ext4 partitions on Mac using Docker

Go to the directory with the image you want to work with. Run a Docker container with that directory mounted:

docker run -it --privileged -v /dev:/dev -v (pwd):/tmp --workdir /tmp ubuntu bash

(replace (pwd) with "$PWD" if using bash instead of fish)

See this thread for an explanation of why --privileged and -v /dev:/dev are required. The need for the latter can be avoided with this alrternative workaround.

In the container, assuming that $IMAGE_FILE is the name of your image file: