Posts

Showing posts with the label Tutorial

Changing the Default Terminal to Terminator on Ubuntu

Image
Terminator is a powerful tool for developers, allowing you to manage multiple terminal sessions in a single window. Features like splitting panes, tabs, and simultaneous input can significantly boost your productivity. Step 1: Install Terminator First, install Terminator using the apt package manager. sudo apt update sudo apt install terminator -y The -y option automatically answers 'yes' to any prompts during the installation process, streamlining the setup. Step 2: Set as the System Default Ubuntu uses a utility called update-alternatives to manage default applications. We'll use this tool to change the default terminal emulator ( x-terminal-emulator ) to Terminator. Run the Configuration Command Enter the following command in your terminal. A list of available terminals will appear. sudo update-alternatives --config x-terminal-emulator Select Terminator From the resulting list, enter the selection number corresponding to terminator and press Enter. ...

A Comprehensive Guide to Spring Boot & Swagger (OpenAPI) Integration

Image
This guide provides a detailed walkthrough for integrating Swagger UI (with OpenAPI 3.0) into your Spring Boot project. It covers everything from initial dependency setup to handling authentication and following best practices to effectively automate and manage your API documentation. 1. Adding Dependencies First, add the necessary springdoc-openapi dependencies to your pom.xml file. springdoc-openapi-starter-webmvc-ui : This is the core library that automatically generates the OpenAPI 3.0 specification by analyzing your Spring Boot application. It also provides the embedded Swagger UI. springdoc-openapi-maven-plugin : (Optional) This plugin extracts the API documentation into a static file (e.g., openapi.json ) during the Maven build process. It's useful for CI/CD pipelines, sharing API specs with other teams, or generating client-side code. <dependencies> <dependency> <groupId>org.springdoc</groupId> <artifactId>s...

How to extract YouTube to MP3 with yt-dlp

Image
yt-dlp.exe is a powerful command-line program that allows you to download videos and audio from various websites, including YouTube. With this tool, you can easily convert and save YouTube videos as MP3 audio files. Before you begin, yt-dlp.exe requires a separate program called FFmpeg to convert files to MP3 format. Therefore, you must complete the following two preparatory steps first. Prerequisites Download yt-dlp.exe: Go to the official yt-dlp GitHub releases page and download the latest version of the yt-dlp.exe file. Download and Install FFmpeg: Navigate to the official FFmpeg website and download the version compatible with your operating system (Windows). After unzipping the downloaded file, you must either copy the ffmpeg.exe file from the bin folder into the same folder as yt-dlp.exe , or add the path to the folder containing ffmpeg.exe to your system's Path environment variable. For ease of use, it is recommended to place yt-dlp.exe and ffmpe...

Securely Connect to GCP Cloud SQL from Your Local Network Using Cloud SQL Auth Proxy

In the early stages of development on Google Cloud Platform (GCP), I needed to directly connect to the production Cloud SQL (PostgreSQL) instance for debugging and testing. Although Cloud SQL does provide a public IP address, it requires registering the client's IP address for access, so I decided to look for another way. Due to GCP’s strict security policies—such as requiring IAM authentication and often disabling public IP access—direct access can be challenging. That's where the Cloud SQL Auth Proxy comes in. It creates a secure tunnel from my local machine to GCP’s Cloud SQL instance using IAM credentials. Why Use the Cloud SQL Auth Proxy? Secure connections: All traffic is encrypted using TLS 1.3. IAM-based authentication: No need to manage static passwords or SSL certificates. No public IP required: You can connect even if your Cloud SQL instance has only a private IP. Automatic credential management: The proxy handles authentication and token refresh. ⚠️ Important: ...