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
# Put in ~/.bashrc | then source ~/.bashrc | |
if [[ -z "${TMUX}" ]] && [[ "${UID}" != 0 ]]; then | |
tmux new-session -A -s 0 | |
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
# export private keys | |
gpg --export-secret-keys --armor > gpg-private.keys | |
# import private keys | |
gpg --import gpg-private.keys | |
# export public keys | |
gpg --export --armor > gpg-public.keys | |
# import public keys |
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 | |
# Change to current dir. | |
cd "$(pwd)" | |
# Check if a parameter is given | |
if [[ -e $1 ]] | |
then # if a selection is found, just count the files in that selection | |
files="$1" | |
total=$(ls "$files" | wc -l) |
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
ask_password: | |
@$(eval PASSWORD=$(shell stty -echo; read -p "Password: " pwd; stty echo; echo $$pwd)) | |
echo $(PASSWORD) | |
ask_password_twice: | |
while true; do \ | |
read -s -p "Password: " password; \ | |
echo; \ | |
read -s -p "Password (again): " password2; \ |
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
ESPeasy rules | |
//GIO14 == Relay 1 = blauw | |
//GPIO12 == Relay 2 = geel | |
//GPIO13 == Relay 3 = oranje | |
on IGNITION do | |
// Close relays contacts | |
gpio,14,1 | |
gpio,13,1 | |
timerSet 1,1 // 1 second delay |
Setting the TTL to 65 can help solve OpenWRT hotel captive portal issues on a travel router because of the way captive portals often track and manage connected devices.
Here’s an explanation of the key reasons:
Device Differentiation:
Captive portals typically recognize and manage devices based on their MAC addresses and IP addresses. When you connect a device (like a laptop or phone) directly to the hotel's network, the captive portal captures the MAC address of that device and redirects it to a login page.
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
# Change the prefix from 'C-b' to '`' (backtick) | |
unbind C-b | |
set -g prefix '`' | |
bind '`' send-prefix | |
# Window and pane index start at 1 | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
# Refresh interval for status bar every 60 seconds |
OlderNewer