Skip to content

Instantly share code, notes, and snippets.

@mhtamun
mhtamun / setup-ubuntu_24.04.sh
Created June 4, 2025 20:00
🚀 Ubuntu 24.04 LTS Setup Script
#!/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 ===
@mhtamun
mhtamun / How-to-Install-Cursor-AI-On-Ubuntu.txt
Last active May 26, 2025 17:52
Install Cursor AI on Ubuntu 24.04
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