Skip to content

Instantly share code, notes, and snippets.

View STheoo's full-sized avatar

Savvas Theocharous STheoo

  • Nothing
View GitHub Profile
@STheoo
STheoo / ssh-copy-id-to-ec2.txt
Created June 26, 2025 19:08
Copy ssh public key to ec2 authorized keys.
ssh -i my-ec2-key.pem ec2-user@<ec2-ip> "mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo '$(cat ~/.ssh/id_rsa.pub)' >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
@STheoo
STheoo / n8n_setup_with_redis.txt
Last active June 26, 2025 19:20
Set up n8n in an ec2 environment with redis docker.
# Caddy
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
caddy version
# Set up reverse proxy in Caddyfile
@STheoo
STheoo / bash_commands.txt
Last active September 6, 2025 13:12
Ubuntu Laravel Set Up
# PHP
sudo add-apt-repository ppa:ondrej/php
sudo apt install curl zip unzip php8.3-cli php8.3-common php8.3-bcmath php8.3-mbstring php8.3-xml php8.3-curl php8.3-gd php8.3-zip php8.3-mysql php8.3-intl php8.3-sqlite3 php8.3-fpm php8.3-redis
# Nginx
sudo apt install nginx
# Composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }"