Skip to content

Instantly share code, notes, and snippets.

View Nill-R's full-sized avatar

Nill Ringil Nill-R

View GitHub Profile
@Nill-R
Nill-R / convert_to_utf8.bash
Last active December 31, 2021 07:38
Convert to utf8
#!/usr/bin/env bash
# https://github.com/nijel/enca
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f | while read file; do enca -L russian -x UTF-8 "$file"; done;
@Nill-R
Nill-R / 10-eth-wlan-bridge.yaml
Last active January 5, 2022 05:36
RPi 4B+ ethernet and wlan bridge config for netplan
network:
ethernets:
eth0:
match:
driver: bcmgenet smsc95xx lan78xx
set-name: eth0
dhcp4: false
dhcp6: false
wifis:
@Nill-R
Nill-R / nftables.conf
Last active October 12, 2022 10:31
VPN killswitch by nftables
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
counter dns {
}
counter dot {
}
counter l2tp{
}
counter l2tp_4500 {
@Nill-R
Nill-R / nftables.conf
Created January 18, 2023 20:19
nftables log output new state
#!/usr/sbin/nft -f
flush ruleset
table ip filter {
chain output_log {
type filter hook output priority 0;
oifname eth0 tcp dport 80 ct state new log prefix "New outgoing http connection: " group 1 accept
oifname eth0 tcp dport 443 ct state new log prefix "New outgoing https connection: " group 1 accept