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
#!/usr/bin/env bash | |
ASTERISK_SRC_DIR=/path/to/asterisk/src | |
git clone https://github.com/chan-sccp/chan-sccp --depth=1 | |
cd chan-sccp | |
./configure --with-asterisk-version=18 --with-asterisk=$ASTERISK_SRC_DIR | |
make -j | |
sudo make install | |
sudo make reload |
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
#!/usr/bin/env bash | |
# ] | |
# { | |
# "val": "192.168.1.23", | |
# "upload": { | |
# "packets": 613376, | |
# "bytes": 111798380, | |
# "megabytes": 106 | |
# }, |
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
# install qt | |
# https://doc.qt.io/qt-6/linux.html | |
# https://doc.qt.io/qt-6/linux-requirements.html | |
# https://doc.qt.io/qt-6/configure-options.html | |
mkdir -p ~/code/qt | |
cd ~/code/qt | |
sudo apt-get install build-essential libgl1-mesa-dev | |
# qtbase |
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
#!/usr/bin/env bash | |
sudo apt install tightvncserver | |
if [ ! -e $HOME/.Xresources ]; then | |
touch $HOME/.Xresources | |
fi | |
echo ":1=$USER" | sudo tee -a /etc/tigervnc/vncserver.users |
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
#!/usr/bin/env bash | |
# set -x | |
script_name=$(basename "${0%.*}") | |
install_systemd_timer() { | |
if [ -z "$1" ]; then | |
echo "Timer interval not defined" | |
return 1 |
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
#!/usr/bin/expect | |
set timeout 20 | |
spawn telnet 192.168.0.1 | |
expect "Login:" | |
send "root\r" | |
expect "Password:" | |
send "admin\r" | |
expect "WAP>" | |
send "reset\r" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>PayloadContent</key> | |
<array> | |
<dict> | |
<key>DNSSettings</key> | |
<dict> | |
<key>DNSProtocol</key> |
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
#!/usr/bin/env bash | |
[[ -v 1 ]] && IP=$1 || { echo "Please enter ip address"; exit 1; } | |
ASNS=$(curl -s https://stat.ripe.net/data/network-info/data.json?resource=$IP | jq -r .data.asns[]) | |
for asn in $ASNS; do | |
echo "-i origin AS${asn}" | nc whois.radb.net 43 | tee >(grep '^route6:' | sed 's/.*\s\([abcdef0-9:\/]*\)/\1/' >> as${asn}_route6) >(grep '^route:' | sed 's/.*\s\([-0-9\.\/]*\)/\1/' >> as${asn}_route4) 1>/dev/null | |
done | |
ipset create as${asn}_route4 nethash -exist | |
ipset create as${asn}_route6 nethash family inet6 -exist |
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
# Install bash using HomeBrew | |
brew install bash | |
# Add new Bash to macOS shell list | |
sudo echo -e "/usr/local/bin/bash\n" >> /etc/shells | |
# Setup macOS .bashrc | |
[[ -f ~/.bashrc ]] || touch ~/.bashrc | |
grep -v '^\s*#' ~/.profile | grep '\. ~/\.bashrc\|source ~/\.bashrc' || echo -e "\n[[ '\$BASH' && -f ~/.bashrc ]] && . ~/.bashrc\n" >> ~/.profile |