Skip to content

Instantly share code, notes, and snippets.

View tegos's full-sized avatar
🐼

Ivan Mykhavko tegos

🐼
View GitHub Profile
@amalmurali47
amalmurali47 / backup_digitalocean.md
Last active October 11, 2025 10:58
Backup DigitalOcean droplet locally

DigitalOcean does not provide a way to download a snapshot of your droplet locally. You can use rsync to accomplish this instead.

On your local machine, assuming you have added your-server in your SSH config:

rsync -aAXHv --append-verify --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} your-server:/
  • -a : archive mode (all files, with permissions, etc.)
  • -A : preserve ACLs/permissions (not included with -a)
@tegos
tegos / comparing-two-my-sql-queries-for-top-solution-authors.md
Created September 14, 2025 13:53
Comparing Two MySQL Queries for Top Solution Authors

Comparing Two MySQL Queries for Top Solution Authors

This summarizes two queries to get the top users by solutions count, their corrected forms, simulated execution plans, and recommendations. For this video: Laravel Performance: Careful with withCount() by Povilas Korop.

Query 1 – Subquery in SELECT

Corrected Query