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
| #!/usr/bin/env bash | |
| # Disables mouse going into Visual mode on copy/paste in VIM | |
| grep -Fxq 'autocmd VimEnter * set mouse=' /etc/vim/vimrc.local 2>/dev/null || echo 'autocmd VimEnter * set mouse=' | sudo tee -a /etc/vim/vimrc.local > /dev/null |
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
| # vi /etc/sysctl.d/1000-custom.conf | |
| # sysctl -p /etc/sysctl.d/1000-custom.conf | |
| # Or | |
| # vi /etc/sysctl.conf and append to end of file | |
| # sysctl -p | |
| # Max connections | |
| net.core.somaxconn = 65536 | |
| # Implement RFC 1337 fix |
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
| #!/usr/bin/env bash | |
| RESERVED_MEM_GB=${1:-0} | |
| PHP_FPM_MEM=$(ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | grep php-fpm|grep pool| awk '{sum+=$1; count++} END {print sum/count}') | |
| TOTAL_MEM_GB=$(free -m | awk '/^Mem:/{print $2}') | |
| MEM_RATIO=$(echo "scale=2; ($TOTAL_MEM_GB - $RESERVED_MEM_GB) / $PHP_FPM_MEM" | bc) | |
| echo "Total Workers: $MEM_RATIO" |
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
| source /etc/os-release | |
| OS=$NAME | |
| if [[ "$OS" =~ Ubuntu ]]; then | |
| echo "Ubuntu found" | |
| DISTRO=UB | |
| elif [[ "$OS" =~ Debian ]]; then | |
| echo "Debian found" | |
| DISTRO=DEB | |
| elif [[ "$OS" =~ AlmaLinux ]]; then | |
| echo "AlmaLinux found" |
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
| Good Article on setting up | |
| https://medium.com/earlybyte/powerline-for-bash-6d3dd004f6fc | |
| https://wiki.archlinux.org/title/Powerline | |
| https://powerline.readthedocs.io/en/master/commands/daemon.html |
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
| sudo apt -y remove docker docker-engine docker.io containerd runc | |
| sudo apt update | |
| sudo apt -y install \ | |
| ca-certificates \ | |
| curl \ | |
| gnupg \ | |
| lsb-release | |
| sudo mkdir -p /etc/apt/keyrings |
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
| # GIT Defaults: | |
| git config --global user.name "Your Name" | |
| git config --global user.email "[email protected]" | |
| git config --global color.ui auto | |
| git config --global push.default simple | |
| git config --global alias.ci commit | |
| git config --global alias.stat status | |
| git config --global core.editor vim | |
| git config --global init.defaultBranch main |
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
| Latest stable build of Kate for Windows | |
| https://binary-factory.kde.org/view/Windows%2064-bit/job/Kate_Release_win64/lastStableBuild/ |
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
| # PHP Upgrade 7.4 to 8.1 | |
| # This can be used for other versions. | |
| # Just need to replace the from version and/or the new version | |
| apt update | |
| apt -y install software-properties-common | |
| add-apt-repository ppa:ondrej/php | |
| apt update | |
| # Lists all packages installed in relation to php7.4 |
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
| # ========================= | |
| # ~/.bash_aliases | |
| # ========================= | |
| # ----- General ----- | |
| alias cls='clear' | |
| alias ll='ls -la' | |
| alias lls='ls -la --sort=size' | |
| alias llt='ls -la --sort=time' | |
| alias df='df -h' |
NewerOlder