Skip to content

Instantly share code, notes, and snippets.

@zAbuQasem
Last active November 14, 2024 22:01
Show Gist options
  • Save zAbuQasem/cbdc151a15277a96117b34b6c56934d9 to your computer and use it in GitHub Desktop.
Save zAbuQasem/cbdc151a15277a96117b34b6c56934d9 to your computer and use it in GitHub Desktop.

Revisions

  1. zAbuQasem revised this gist Nov 14, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion terminal.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/bash -xe

    sudo apt update && sudo apt upgrade -y
    sudo apt install -y zsh curl nano net-tools git ripgrep vim xclip fail2ban p7zip-full unzip
    sudo apt install -y zsh curl nano net-tools git ripgrep vim xclip fail2ban p7zip-full unzip dnsutils
    git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
    ~/.fzf/install --all
    curl https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -o /tmp/install.sh &&
  2. zAbuQasem revised this gist Nov 14, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion terminal.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/bash -xe

    sudo apt update && sudo apt upgrade -y
    sudo apt install -y zsh curl nano net-tools git ripgrep vim xclip fail2ban
    sudo apt install -y zsh curl nano net-tools git ripgrep vim xclip fail2ban p7zip-full unzip
    git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
    ~/.fzf/install --all
    curl https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -o /tmp/install.sh &&
  3. zAbuQasem revised this gist Nov 14, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions terminal.sh
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,7 @@ curl https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -
    echo "Y" | sh /tmp/install.sh
    sed -i 's/plugins=(git)/plugins=(git fzf)/g' ~/.zshrc
    sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pmcgee"/g' ~/.zshrc
    sudo chmod -x /etc/update-motd.d/*
    echo -e 'source <(kubectl completion zsh 2>/dev/null) 2>/dev/null\nsource <(helm completion zsh 2>/dev/null) 2>/dev/null' >> ~/.zshrc

    sudo tee /etc/fail2ban/jail.local <<EOF
  4. zAbuQasem revised this gist Apr 19, 2024. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions terminal.sh
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,18 @@ curl https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -
    sed -i 's/plugins=(git)/plugins=(git fzf)/g' ~/.zshrc
    sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pmcgee"/g' ~/.zshrc
    echo -e 'source <(kubectl completion zsh 2>/dev/null) 2>/dev/null\nsource <(helm completion zsh 2>/dev/null) 2>/dev/null' >> ~/.zshrc

    sudo tee /etc/fail2ban/jail.local <<EOF
    [DEFAULT]
    ignoreip = 127.0.0.1/32
    bantime = 3600
    findtime = 300
    maxretry = 3
    banaction = iptables-multiport
    backend = auto
    [sshd]
    enabled = true
    EOF
    sudo systemctl enable fail2ban
    sudo systemctl start fail2ban
    sudo systemctl status fail2ban
  5. zAbuQasem revised this gist Apr 19, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion terminal.sh
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ curl https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -
    echo "Y" | sh /tmp/install.sh
    sed -i 's/plugins=(git)/plugins=(git fzf)/g' ~/.zshrc
    sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pmcgee"/g' ~/.zshrc
    echo -e 'source <(kubectl completion zsh) 2>/dev/null\nsource <(helm completion zsh) 2>/dev/null' >> ~/.zshrc
    echo -e 'source <(kubectl completion zsh 2>/dev/null) 2>/dev/null\nsource <(helm completion zsh 2>/dev/null) 2>/dev/null' >> ~/.zshrc
    sudo systemctl enable fail2ban
    sudo systemctl start fail2ban
    sudo systemctl status fail2ban
  6. zAbuQasem revised this gist Apr 19, 2024. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions terminal.sh
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,15 @@
    #!/bin/bash
    #!/bin/bash -xe

    sudo apt update && sudo apt upgrade -y
    sudo apt install -y zsh curl net-tools git ripgrep vim xclip
    sudo apt install -y zsh curl nano net-tools git ripgrep vim xclip fail2ban
    git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
    ~/.fzf/install --all
    curl https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -o /tmp/install.sh &&
    sed -i 's/CHSH=no/CHSH=yes/g' /tmp/install.sh &&
    echo "Y" | sh /tmp/install.sh
    sed -i 's/plugins=(git)/plugins=(git fzf)/g' ~/.zshrc
    sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pmcgee"/g' ~/.zshrc
    sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pmcgee"/g' ~/.zshrc
    echo -e 'source <(kubectl completion zsh) 2>/dev/null\nsource <(helm completion zsh) 2>/dev/null' >> ~/.zshrc
    sudo systemctl enable fail2ban
    sudo systemctl start fail2ban
    sudo systemctl status fail2ban
  7. zAbuQasem revised this gist Feb 19, 2024. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions terminal.sh
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,11 @@
    #!/bin/bash

    apt update && apt upgrade -y
    apt install -y zsh curl net-tools git ripgrep vim xclip
    sudo apt update && sudo apt upgrade -y
    sudo apt install -y zsh curl net-tools git ripgrep vim xclip
    git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
    ~/.fzf/install --all
    curl https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -o /tmp/install.sh &&
    sed -i 's/CHSH=no/CHSH=yes/g' /tmp/install.sh &&
    echo "Y" | sh /tmp/install.sh
    sed -i 's/plugins=(git)/plugins=(git fzf)/g' ~/.zshrc
    sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pmcgee"/g' ~/.zshrc
    echo 'alias c="xclip -sel clip"' >> ~/.zshrc
    sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pmcgee"/g' ~/.zshrc
  8. zAbuQasem revised this gist Feb 19, 2024. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions terminal.sh
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,12 @@
    #!/bin/bash

    apt update && apt upgrade -y
    apt install -y zsh curl net-tools git ripgrep vim
    apt install -y zsh curl net-tools git ripgrep vim xclip
    git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
    ~/.fzf/install --all
    curl https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -o /tmp/install.sh &&
    sed -i 's/CHSH=no/CHSH=yes/g' /tmp/install.sh &&
    echo "Y" | sh /tmp/install.sh
    sed -i 's/plugins=(git)/plugins=(git fzf)/g' ~/.zshrc
    sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pmcgee"/g' ~/.zshrc
    sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pmcgee"/g' ~/.zshrc
    echo 'alias c="xclip -sel clip"' >> ~/.zshrc
  9. zAbuQasem created this gist Feb 19, 2024.
    11 changes: 11 additions & 0 deletions terminal.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/bin/bash

    apt update && apt upgrade -y
    apt install -y zsh curl net-tools git ripgrep vim
    git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
    ~/.fzf/install --all
    curl https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -o /tmp/install.sh &&
    sed -i 's/CHSH=no/CHSH=yes/g' /tmp/install.sh &&
    echo "Y" | sh /tmp/install.sh
    sed -i 's/plugins=(git)/plugins=(git fzf)/g' ~/.zshrc
    sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="pmcgee"/g' ~/.zshrc