This guide helps you install and beautify your terminal using Zsh, Oh My Zsh, Powerlevel10k, and powerful plugins via a single script.
install_zsh.sh– Run this to install everything.README_zsh_setup.md– This overview and further instructions.
This guide helps you install and beautify your terminal using Zsh, Oh My Zsh, Powerlevel10k, and powerful plugins via a single script.
install_zsh.sh – Run this to install everything.README_zsh_setup.md – This overview and further instructions.| #!/bin/bash | |
| # === Variables === | |
| SSH_PORT=22 | |
| # === System Update and Basic Tools === | |
| apt update && apt upgrade -y | |
| apt install -y bash-completion curl wget git nano net-tools telnet ufw ca-certificates gnupg lsb-release | |
| # === Firewall Configuration === |
| Open a terminal | |
| Paste the full script above or save it to a file: | |
| nano install-cursor.sh | |
| Make the script executable: | |
| chmod +x install-cursor.sh | |
| Run it: | |
| ./install-cursor.sh |
| function maxSubArray(nums) { | |
| let maxSum = nums[0]; // Initialize maxSum to the first element | |
| let currentSum = nums[0]; // Initialize currentSum to the first element | |
| for (let i = 1; i < nums.length; i++) { | |
| // Update currentSum to be the maximum of the current element or the sum of currentSum + current element | |
| currentSum = Math.max(nums[i], currentSum + nums[i]); | |
| // Update maxSum if the currentSum is greater than maxSum | |
| maxSum = Math.max(maxSum, currentSum); |
| # Init | |
| $ yum update | |
| $ yum upgrade | |
| $ yum install bash-complition -y | |
| $ yum install epel-release | |
| $ yum install bash-complition-extra -y | |
| $ init 6 | |
| # SSH | |
| $ ssh REMOTE_USER@REMOTE_IP -p SSH_PORT |