Working zoom on munin graphs on Debian 11 with nginx
In nginx config: server { # some server ... location /munin/static/ { alias /etc/munin/static/; expires modified +1w; } location /munin/ { alias /var/cache/munin/www/; expires modified +310s; } location ^~ /munin-cgi/munin-cgi-graph/ { fastcgi_split_path_info ^(/munin-cgi/munin-cgi-graph)(.*);...
This blog's engine is now open source
https://git.ch1p.io/ch1p_io_web.git/ written in php 8.1 from scratch no frameworks, no PSR bullshit no heavy frontend shit like babel or webpack supports dark theme...
How to permanently block app's internet access on LineageOS without Magisk and all that stuff
Every installed package has its own Linux uid and gid. The idea is to find that uid and use iptables to block any traffic coming from processes owned by that uid. Enable developer settings. Enable USB debugging (adb) and rooted debugging....
How to run shell scripts at boot time as root on LineageOS 18.1 without Magisk
Enable developer settings. Enable USB debugging (adb) and rooted debugging. Warning: rooted debugging is a very dangerous feature, don't forget to turn it off when you've done! Attach your Android phone to a computer via USB cable, verify that device is detected by running adb devices. Run adb root....
Route all transmission-daemon traffic over OpenVPN by using network namespaces
So I have: Debian 11 server with transmission-daemon installed, an OpenVPN client config file. I need to connect to OpenVPN but not to route anything except Transmission through the tunnel. Let's do this! Starting the OpenVPN client service...
OpenWrt: route different computers via different upstreams based on their IP
Let's say you have two IPv4 upstreams: 10.1.0.1 and 10.2.0.1. 10.1.0.1 is used as the default route, but you want some computers to be routed via 10.2.0.1, based on their LAN IP address. Let's imagine for an example that you have two DHCP clients connected: # cat /tmp/dhcp.leases...
How to bypass always-on WireGuard VPN and custom system resolver to access Wi-Fi captive portal on Gentoo
On my system, Wi-Fi and WireGuard are configured and started by netifrc. wlp3s0 is the wireless interface and wg0 is the wireguard interface. dhcpcd is used as DHCP client. /etc/conf.d/net: modules_wlp3s0="wpa_supplicant" config_wlp3s0="dhcp" config_wg0="192.168.10.2/32"...
Reading data from Si7021 sensor on Linux using Python
#!/usr/bin/env python3 import smbus if __name__ == '__main__': bus = smbus.SMBus(0) # assuming your sensor is /dev/i2c-0 addr = 0x40 # read temperature (in celsius) b = bus.read_i2c_block_data(addr, 0xE3, 2) temp = 175.72 * (b[0] << 8 | b[1]) / 65536.0 - 46.85 # read humidity (percentage)...
NFS server on Void Linux behind firewall
Let's assume you want to set up NFS server on Void machine and it should be accessible only inside LAN. Define LAN: ipset create lan hash:net ipset add lan 192.168.88.0/24 ipset add lan 192.168.1.0/24 Assume your default INPUT policy is DROP: iptables -P INPUT DROP...
jobd: an alternative to Gearman, created primarily for PHP applications
I'm a core backend developer and sysadmin in one large project. In this project, backend is written in PHP, we have a couple dozens of servers and we need to launch many kinds of background and foreground tasks on them. To do that right, we need a task queue daemon. Something like Gearman....