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
export ZSH=$HOME/.oh-my-zsh | |
export LANG=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 | |
ZSH_THEME="risto" | |
zstyle ':omz:update' mode auto | |
zstyle ':omz:update' frequency 60 | |
plugins=(git zsh-syntax-highlighting zsh-autosuggestions) | |
source $ZSH/oh-my-zsh.sh | |
alias n="nano" | |
alias upd="sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y && sudo apt clean -y" |
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
# see https://github.com/ukanth/afwall/wiki/CustomScripts#some-examples | |
OEM_SCRIPT_PATH=/system/bin/oem-iptables-init.sh | |
IP6TABLES=/system/bin/ip6tables | |
IPTABLES=/system/bin/iptables | |
# block ota-cache2.googlezip.net | |
$IPTABLES -A "afwall" -d 209.85.137.5 -j REJECT | |
# block ota-cache1.googlezip.net |
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 | |
CURRENT_DATE=$(date -d '-30 day' -u +"%Y-%m-%dT%H:%M:%S.%NZ") | |
echo "Date: $CURRENT_DATE" | |
AMIS=$(aws ec2 describe-images --owners self --query 'Images[?CreationDate<`'"$CURRENT_DATE"'`].{ID:ImageId, Date:CreationDate}' --output json) | |
for AMI in $(echo "${AMIS}" | jq -r '.[].ID'); do | |
echo "Deleting AMI: $AMI" | |
aws ec2 deregister-image --image-id $AMI |