Skip to content

Instantly share code, notes, and snippets.

@Juul
Juul / boot_log
Created March 26, 2021 11:30
boot log
OpenRC 0.42.1.788529e388 is starting up Linux 5.8.0-kindle4+nt-12013-g4ccf5377d7ae-dirty (armv7l)
* /proc is already mounted
* Mounting /run ... * /run/openrc: creating directory
* /run/lock: creating directory
* /run/lock: correcting owner
* Caching service dependencies ... [ ok ]
* Clock skew detected with `(null)'
* Adjusting mtime of `/run/openrc/deptree' to Fri Mar 26 07:58:52 2021
@Juul
Juul / sudomesh_wireguard.md
Last active March 15, 2021 09:29
sudomesh wireguard guide - work in progress

Install wireguard

To install wireguard do:

opkg update
opkg install kmod-wireguard wireguard-tools
@Juul
Juul / openwrt_enable_ssh_on_wan.md
Last active October 9, 2024 14:53
OpenWRT enable SSH on WAN port

To /etc/config/firewall add:

config rule                                     
        option name             Allow-SSH-WAN   
        option src              wan             
        option proto            tcp             
        option dest_port        22              
 option target ACCEPT 
@Juul
Juul / simple_gateway
Last active June 9, 2022 04:01
How to quickly configure your box as a gateway granting devices connected on ethernet access to wifi network
First ensure your ethernet isn't managed by network-manager by adding the following to `/etc/NetworkManager/NetworkManager.conf`:
```
[keyfile]
unmanaged-devices=mac:00:11:22:33:44
```
Replacing the MAC address with that of your ethernet device.
Then run:
@Juul
Juul / gist:ff04f5d5c0a2e77682965f0a531fbb88
Created March 2, 2021 14:49
notes_on_winxp_vm_with_iommu
git pull <papazoga repo>
cd qemu/
git checkout ni-mite
git add remote upstream https://github.com/qemu/qemu
git fetch origin upstream (?)
@Juul
Juul / xiaomi_mi_wifi_r4gv2_router_notes.md
Last active April 19, 2021 07:06
xiaomi mi wifi r4gv3 router notes

Xiaomi Mi WiFi R3Gv2

Also known as "R4A Gigabit". On the back it just says "R4A" but plugging into ethernet can verify that it's the gigabit edition.

Click through initial setup wizard in chinese accepting defaults. When asked for a wifi password know that this will also be the admin password. If connected through wifi you will be disconnected at the end of the wizard since the wifi now has a password. Reconnect and go to the web admin again. Type in the wifi pass in the text box and once you're logged in the stok will be in the address bar.

The latest OpenWRTInvasion repo has both stock firmware and working openwrt images. The stock firmware version from the repo miwifi_r4a_firmware_72d65_2.28.62.bin works fine.

Don't use the latest version of OpenWRTInvasion. It does not seem to work. Instead use the v0.0.1 version.

@Juul
Juul / gpg_public.key
Created May 25, 2020 11:53
My GPG public key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBF7LOWQBDACv1M8bZUiiEFKJ0ITmVyKH3U1ixKnJ2HV2KzPlSMnlV8doyfYx
ydv0Udu7WSeAfIpk9nMrwlzIqRSJx0sOsO0ZpiVdo+loKehBjoQiCiBzwmt0UOHL
/knFEwBC1Sh33D+GfjUG+8cVZgEwx0ySt/w8boGS86384AQtwZ8CS2AGgIMZO7ld
XPIIUr2uHPvZzT8We4+VhqBRwHKmIwDnPkJBs1LtLuRbgmPu3yJBSe38J6J6X4au
53bNKdE7kQmqzraawFJjVb14/fU6UoqBMkwOiTQ/1N/0JVUr+DOUTSI74RwnGPr8
6qbQYbEY5SRDCsOAy9FhoEjf75nCTNQ+GQNa5Vih9tpVrEqikPRN+eouTD5YfnJv
QcxJI8RORHsTCSGNGC8OmX+GM5NPS0jRwixeoGWEJBLIKjEP9HpIOLWYR3RNWTGe
IwtJdWxXPYo8uDR4GAnTaTRbu5NTyQe65hORl7gZsrtALjojXmCZTyWlmuYRGHn/
@Juul
Juul / autossh_reverse_tunnel.md
Last active March 28, 2025 04:55
How to configure a reverse SSH tunnel that auto-establishes and auto-reconnects

This is a brief guide on how to configure an SSH reverse tunnel that automatically establishes on boot and will continuously attempt to re-connect when it fails.

It is very useful if you are deploying a device somewhere without a public IP, e.g. behind a NAT, and need to be able to SSH into it from the wider internet.

Let's refer to the NAT'ed device as the client. This guide assumes that the client is able to create outgoing SSH connections to at least destination port 443.

You will need root access to a server with a static IP on the internet which runs an openssh server.

On my-server.example.com add the following to /etc/ssh/sshd_config, changing tunnel-user to whichever username you want to use (this will be a new user, not an exising user) and changing the PermitOpen line:

@Juul
Juul / doom_readme.md
Last active March 20, 2020 21:06
doom 1

Check which version of chocolate-doom your distro has:

apt-cache show chocolate-doom|grep "Version:"

If it's version 3.0.0 or above then install it:

sudo apt install chocolate-doom
@Juul
Juul / memusage.sh
Created January 20, 2020 05:17
Show total combined memory usage (virtual, resident and dirty) for processes matching the given grep arguments
#!/bin/bash
# Show total memory usage of all processes matching the supplied grep arguments
if [ "$#" -lt "1" ]; then
echo "Usage: $0 <grep arguments>" >&2
exit 1
fi
function humanize() {