This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Maximum wait time in seconds | |
timeout=300 | |
elapsed=0 | |
while [[ $elapsed -lt $timeout ]]; do | |
up0=$(cat /sys/class/net/wlan0/operstate 2>/dev/null) | |
up1=$(cat /sys/class/net/wlan1/operstate 2>/dev/null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -x | |
export ENV_NAME="nanny-env" | |
export PYENV_ROOT="/home/christopher/.pyenv" | |
export PATH="$PYENV_ROOT/bin:$PATH" | |
eval "$(pyenv init -)" | |
eval "$(pyenv virtualenv-init -)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import threading | |
import time | |
from collections import deque | |
from dataclasses import dataclass, field | |
from datetime import datetime | |
from datetime import time as dt_time | |
from enum import Enum | |
from typing import Callable, Deque, Dict, Optional, Set, Tuple | |
from zoneinfo import ZoneInfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[connection] | |
id=TEG-1JG | |
type=wifi | |
autoconnect-retries=0 | |
interface-name=wlan1 | |
timestamp=1753015674 | |
[wifi] | |
cloned-mac-address=permanent | |
mac-address-randomization=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
######### | |
# Command to run | |
# sudo -E env PATH="$PATH" ./.venv/bin/python3 ./setup_routing_nat.py | |
######### | |
# Auto run | |
# sudo vim /etc/NetworkManager/dispatcher.d/99-ip-change | |
######### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import socket | |
import subprocess | |
import sys | |
from typing import Any, Dict, Final, List, Tuple | |
import iptc | |
import psutil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -ex | |
BRIDGE_NAME="br0" | |
BRIDGE_IP="192.168.92.1" | |
setup_bridge() { | |
echo "Setting up bridge $BRIDGE_NAME" | |
ip link add name $BRIDGE_NAME type bridge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
# Function to check if a command succeeded | |
check_command() { | |
if [ $? -ne 0 ]; then | |
echo "Error: $1" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
sudo -v | |
sudo apt-get update | |
sudo apt-get dist-upgrade -y | |
sudo apt-get autoremove -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/restart_xrdp.sh | |
sudo make clean all -j $(nproc) | |
sudo make install -j $(nproc) | |
sudo systemctl daemon-reload | |
sudo service xrdp restart |
NewerOlder