Skip to content

Instantly share code, notes, and snippets.

@Yossi1114
Yossi1114 / tc.sh
Created January 22, 2024 01:39
Linux Traffic Control Conditional Experiment
#!/bin/bash
# Interface
IFACE="eno1"
# Function to safely delete existing tc settings
safe_tc_delete() {
tc qdisc del dev $IFACE root &> /dev/null || true
}
@Yossi1114
Yossi1114 / google-drive-backup.sh
Created December 14, 2021 17:03
script for daily backup to Google Drive
#!/bin/bash
# Google Drive Backup Script
# Refer to https://medium.com/swlh/using-rclone-on-linux-to-automate-backups-to-google-drive-d599b49c42e8 and set up rclone first
# Connection to your Google Drive must be established with rclone before upload
now=$(date +"%m%d%Y")
/usr/bin/zip -r backup_$now.zip /var/www/ # backup file/directory path
/usr/bin/rclone copy --update --verbose --transfers 30 --checkers 8 --contimeout 60s --timeout 300s --retries 3 --low-level-retries 10 --stats 1s "backup_$now.zip" "gdrive://"
@Yossi1114
Yossi1114 / keybase.md
Created October 9, 2021 08:35
Keybase.io

Keybase proof

I hereby claim:

  • I am yossi1114 on github.
  • I am yossi1114 (https://keybase.io/yossi1114) on keybase.
  • I have a public key ASBzyE3r_pFjljVvyhUot6dtIW1jeAPqZdiANEgN-ldLlgo

To claim this, I am signing this object:

#!/bin/bash
sudo apt update && sudo apt -y upgrade && sudo apt -y autoremove
sudo apt -y install tinyproxy
sed -i 's/Allow\ 127.0.0.1/#Allow\ 127.0.0.1/g' /etc/tinyproxy/tinyproxy.conf
ufw allow 8888
reboot