This file contains 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 | |
## bash <(curl -Ls https://gist.githubusercontent.com/pacmac/1395f3e8a32137c4bfdf5faeb8164f9b/raw/apt-keyfix.sh) | |
# Run apt update and capture the error output | |
error_output=$(apt update 2>&1) | |
# Check if the error output contains the key verification error message | |
if [[ $error_output =~ "The following signatures couldn't be verified because the public key is not available" ]]; then | |
# Retrieve the missing keys and run the apt-key command for each one |
This file contains 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
sysctl -w net.ipv4.ip_forward=1 | |
nano /etc/sysctl.conf | |
## Uncomment net.ipv4.ip_forward | |
PHY_IFACE=eth0; ZT_IFACE=zt3jnrnpfe; | |
iptables -t nat -A POSTROUTING -o $PHY_IFACE -j MASQUERADE; | |
iptables -A FORWARD -i $PHY_IFACE -o $ZT_IFACE -m state --state RELATED,ESTABLISHED -j ACCEPT; | |
iptables -A FORWARD -i $ZT_IFACE -o $PHY_IFACE -j ACCEPT; | |
This file contains 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 | |
# | |
## bash <(curl -Ls https://gist.githubusercontent.com/pacmac/8a60937b275fcb21f29e11f1e0901871/raw/debian-kiosk.sh) | |
# Add new user | |
useradd -m kiosk-user | |
# Update and install necessary packages | |
apt-get update |
This file contains 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
/* | |
## bash <(curl -Ls https://gist.githubusercontent.com/pacmac/b95b6e3029c0b9c57b5263fcb8597bb7/raw/sshroot.sh); | |
## bash <(curl -Ls https://tinyurl.com/rootssh); | |
*/ | |
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
cat /etc/ssh/sshd_config | grep "PermitRootLogin" | |
systemctl restart sshd |
This file contains 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
root@tinypilot:~# free -h | |
total used free shared buff/cache available | |
Mem: 363Mi 101Mi 142Mi 1.0Mi 119Mi 210Mi | |
Swap: 1.1Gi 0B 1.1Gi | |
root@tinypilot:~# df -h | |
Filesystem Size Used Avail Use% Mounted on | |
/dev/root 15G 3.0G 11G 22% / | |
devtmpfs 118M 0 118M 0% /dev |
This file contains 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
/* | |
version 1.0 | |
https://gist.githubusercontent.com/pacmac/1602c3b520d4595a41df59f8673d019c/raw/aee285f9be5c9457fcd1831d5995e5a0852e3fe8/frontpage.js | |
*/ | |
var cl=console.log; | |
function waitForElementToDisplay(selector, callback, checkFrequencyInMs, timeoutInMs) { | |
var startTimeInMs = Date.now(); | |
(function loopSearch() { |
This file contains 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 | |
HOSTNAME="$1" | |
LOGDIR="$HOME/.ufw"; | |
LOGFILE=$LOGDIR/$HOSTNAME | |
if [ ! -d "$LOGDIR" ];then | |
mkdir $LOGDIR | |
fi | |
function _alert { |
This file contains 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 | |
## Reload daemons | |
systemctl daemon-reload | |
# stop services: | |
sudo systemctl stop hassio-supervisor.service | |
sudo systemctl stop hassio-apparmor.service | |
# disable services: |
This file contains 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
pip3 install pyserial intelhex | |
mkdir cc2538-bsl; | |
cd cc2538-bsl; | |
curl -sSL https://github.com/JelmerT/cc2538-bsl/archive/refs/heads/master.tar.gz | tar xz --strip 1; | |
wget https://github.com/Koenkk/Z-Stack-firmware/raw/master/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_coordinator_20220219.zip; | |
unzip CC1352P2_CC2652P_launchpad_coordinator_20220219.zip; | |
python3 cc2538-bsl.py -ewv -p /dev/ttyUSB0 --bootloader-sonoff-usb ./CC1352P2_CC2652P_launchpad_coordinator_20220219.hex; |
This file contains 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
apt-get update && sudo apt-get upgrade -y | |
sudo apt-get install jq wget curl avahi-daemon udisks2 libglib2.0-bin network-manager dbus apparmor -y | |
## | |
nano /boot/cmdline.txt | |
## append "lsm=apparmor" | |
reboot | |
mkdir -p /usr/share/pac/haas |
NewerOlder