Gürkan UÇAR

Gürkan UÇAR

I’m a software engineer interested in backend development, self-hosted systems, electronics, and aviation. This blog is my personal knowledge base where I document what I learn, the projects I build, and the solutions I discover.

Latest posts

All posts →
Jan 1, 2020 · 7 min

Everything This Blog Can Render

One page that renders every feature this site supports, so I can see what a thing looks like before deciding to use it.

Complete ComfyUI + Wan 2.2 Setup Guide for RunPod
Jun 1, 2025 · 2 min

Complete ComfyUI + Wan 2.2 Setup Guide for RunPod

This guide will get you up and running with ComfyUI and the powerful Wan 2.2 text-to-video model on RunPod in just a few minutes. join to runpod first: https://runpod.io?ref=94hstegb video: https://youtu.be/vnrUJKRogkM What You’re Getting One-Click Setup Script Just copy and paste this entire code block into your RunPod terminal. That’s it! …

Apr 8, 2025 · 8 min

Useful Commands - Cheat Sheet

I have collected all my usefull commands in one place. Linux Commands Cheatsheet A comprehensive collection of useful Linux commands for system administration, development, and everyday tasks. Table of Contents System Management File Operations Networking Process Management Service Management Compression and Archiving Permissions Package Management System Information Docker Java Development Maven Spring Boot Useful Aliases System Management Update and Upgrade # Update the package lists sudo apt-get update # Upgrade installed packages sudo apt upgrade -y # Update and upgrade in one command sudo apt update && sudo apt upgrade -y Firewall Setup # Install the Uncomplicated Firewall sudo apt install ufw -y # Enable the firewall sudo ufw enable # Allow common ports sudo ufw allow 80 # HTTP sudo ufw allow 443 # HTTPS sudo ufw allow 22 # SSH sudo ufw allow ssh # SSH (alternative) Reboot and Shutdown # Reboot the system sudo reboot # Power off the system sudo poweroff # Halt the system sudo halt # Shutdown with options sudo shutdown File Operations Viewing Files # Display file contents cat file.txt # View file with pagination less file.txt # View last lines of file (follow mode) tail -f file.log # View last 1000 lines and follow updates tail -n 1000 -f file.log Creating and Modifying Files # Write to a file (overwrites existing content) echo "text" > file.txt # Append to a file echo "text" >> file.txt File Management # Copy a file cp source_file destination_file # Move or rename a file mv source_file destination_file # Remove a file rm file.txt File Search # Find a file by name find /path -name "filename" # Search inside files for a string grep -r "text_to_search" /path/to/search # Colorize grep output grep --color=auto "pattern" file Networking Network Information # Install network tools sudo apt install net-tools # Check IP address ip addr show # Alternative for IP address ifconfig # Ping a host ping example.com # Display routing table netstat -rn # List all TCP connections with ports and processes sudo netstat -tnlp # Find process using specific port sudo netstat -tnlp | grep :22 sudo netstat -tnlp | grep :8080 Port Management # Install lsof sudo apt-get install lsof # Find which app is using a port sudo lsof -i :PORT_NUMBER # Example: sudo lsof -i :8080 # Kill an app using a port sudo kill -9 $(sudo lsof -t -i :PORT_NUMBER) Process Management Process Monitoring # List all running processes ps aux # Interactive process viewer top # Sort processes by memory usage ps auxf | sort -nr -k 4 # Top 10 processes by memory usage ps auxf | sort -nr -k 4 | head -10 # Sort processes by CPU usage ps auxf | sort -nr -k 3 # Top 10 processes by CPU usage ps auxf | sort -nr -k 3 | head -10 # Find Java/Spring Boot processes ps aux | grep java ps aux | grep spring-boot Process Control # Kill a process by PID kill -9 PID Service Management Systemd Commands # Check status of all services service --status-all # Check status of a specific service sudo systemctl status service_name # Start a service sudo systemctl start service_name # Stop a service sudo systemctl stop service_name # Restart a service sudo systemctl restart service_name # Enable a service at boot sudo systemctl enable service_name # Disable a service at boot sudo systemctl disable service_name Nginx Commands # Test Nginx configuration nginx -t # Restart Nginx systemctl restart nginx Compression and Archiving Tar Commands # Compress files (tar.gz) tar -czvf archive.tar.gz file1 file2 # Extract tar.gz files tar -xzvf archive.tar.gz Zip Commands # Zip a file zip archive.zip file1 file2 # Unzip a file unzip archive.zip Permissions # Change permissions of a file chmod 755 file.txt # Change ownership of a file sudo chown user:user file.txt # Change permissions recursively chmod -R 755 /path/to/directory Package Management Debian/Ubuntu (apt) # Update the package list sudo apt update # Upgrade all packages sudo apt upgrade # Install a package sudo apt install package_name # Uninstall a package sudo apt remove package_name # Purge a package (completely remove config files as well) sudo apt purge package_name # Search for a package apt search package_name System Information # Check disk usage df -h # Check memory usage free -h # Free memory info free -m -l -t # Check CPU usage top # Check system uptime uptime # CPU information lscpu # GPU memory information grep -i --color memory /var/log/Xorg.0.log Docker Image Management # Pull an image from Docker Hub docker pull image_name # View all images docker images # Remove an image docker rmi image_name # Build an image from a Dockerfile docker build -t image_name . # Remove dangling/unused images docker image prune Container Management # Run a Docker container docker run image_name # Run with options docker run -d -p host_port:container_port --name container_name image_name # List running containers docker ps # List all containers (including stopped) docker ps -a # Stop a running container docker stop container_name_or_id # Start a stopped container docker start container_name_or_id # Remove a stopped container docker rm container_name_or_id # Check logs of a container docker logs container_name_or_id # Follow container logs with limited output docker logs --follow --tail=50 container_name_or_id # Exec into a running container docker exec -it container_name_or_id /bin/bash # Stop and remove all containers docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q) Java Development # Compile a Java file javac MyClass.java # Run a compiled Java class java MyClass # Run a JAR file java -jar myapp.jar # Set classpath for external libraries java -cp .:path_to_lib/library.jar MyClass # Check Java version java -version Maven # Clean the target directory mvn clean # Compile the source code mvn compile # Run unit tests mvn test # Package the project mvn package # Clean and build the project mvn clean install # analyze dependencies mvn dependency:analyze # Skip tests during build mvn clean install -DskipTests mvn clean install -DskipTests=true # Check for updates of dependencies mvn versions:display-dependency-updates Spring Boot # Run a Spring Boot application (packaged as JAR) java -jar target/myapp.jar # Run from source using Maven mvn spring-boot:run # Run in background with output to log file nohup mvn spring-boot:run > app.log 2>&1 & # Run in background with timestamped log file nohup mvn spring-boot:run > "app_$(date '+%Y-%m-%d_%H-%M-%S').log" 2>&1 & # Skip tests during build mvn clean install -DskipTests=true # Run in background nohup mvn spring-boot:run & # Generate a Spring Boot project curl https://start.spring.io/starter.zip -d dependencies=web -o demo.zip # Run with active profile java -jar target/myapp.jar --spring.profiles.active=dev # Run with debugging enabled mvn spring-boot:run -Dspring-boot.run.fork=false -X Redis redis-server redis-server --service-start redis-server --service-stop redis-cli redis-cli -h 127.0.0.1 -p 6379 set mykey "Hello World" get mykey keys * del mykey flushall Useful Aliases Add these to your /etc/bash.bashrc file for system-wide aliases or ~/.bashrc for user-specific aliases: …

Spring Boot S3 Presigned Url Upload/Download F
Oct 26, 2024 · 5 min

Spring Boot S3 Presigned Url Upload/Download F

Spring Boot S3 Presigned Url Upload/Download File What is presigned url and why should we use? Presigned URLs let us upload and download files without going through our service directly. This helps save resources and reduces the load on our systems. …