Posts

Generate a self-signed certificate (for testing/development)

Image
Use OpenSSL to create a self-signed certificate: Step 1: Install OpenSSL (if not already installed)  # On Ubuntu/WSL sudo apt-get update sudo apt-get install openssl Step 2: Generate the certificate # Create certs directory mkdir -p certs cd certs # Generate a private key and certificate openssl req -x509 -newkey rsa:2048 -keyout signature-key.pem -out signature-cert.pem -days 365 -nodes # Convert to PKCS#12 format (.p12) openssl pkcs12 -export -out signature-cert.p12 -inkey signature-key.pem -in signature-cert.pem -name "Invoice Signing Certificate" When prompted: Enter a password for the .p12 file (To use in env variable) Fill in certificate details (or press Enter to skip) This will generate the certs file for you. Thank you.

How to connect to postgres database in activepieces

Image
In this post, we will see how to connect to postgres database in local activepieces development environment.  Add the Below mentioned env variables  Follow below link to install and setup postgres  https://simplelinuxlearnings.blogspot.com/2025/10/in-wsl-how-to-create-database-update.html Create a new database named activepieces like below. Now, start the application using npm start, your postgres  database should be utilized by activepieces.

In WSL How to create database , Update Password and connect the database in any application

Image
  Make sure, we have postgres installed, run below query to verify that. Run the below command to install  pg_ctlcluster utility command : sudo apt install postgresql postgresql-contrib Run the below command to start the postgresql manually Run the below command to postgres user sudo -i -u postgres psql Run command createdb my_database to create a new database Run the command psql -l to list the list of database  From your current prompt ( postgres@...$ ), enter the PostgreSQL shell: psql Now, paste this command to change the password for postgres user  ALTER USER postgres WITH PASSWORD 'your_secure_password'; Now we can see like below Type \q to exits the PostgreSQL shell and brings you back to the Linux terminal  I installed the below extension in visual studio Select postgresSQL and provide the database details with password and click on Connect button. Now, we can see the database details inside visual studio Lets Thank you!

How to generate a secure value for JWT_SECRET

How to Create a High-Strength JWT_SECRET A secure secret must be long, random, and unpredictable . Simple phrases, dictionary words, or short strings are easily brute-forced or cracked using common tables. A good secret should be at least 32 bytes long (which results in a longer Base64 string) and generated using a cryptographically secure pseudo-random number generator (CSPRNG). Generating a Strong Secret Use your operating system's built-in cryptographic tools to generate the string. On Linux/macOS (Bash): The openssl rand command is a reliable way to generate a strong random string. The -base64 32 flag generates 32 cryptographically random bytes and encodes them in Base64 for safe use in environment files. Bash openssl rand -base64 32 On Windows (PowerShell): PowerShell offers a secure way to generate byte arrays using the .NET Framework's RNGCryptoServiceProvider . This ensures the randomness is suitable for cryptographic purposes. PowerShell $bytes=New-Object Byte[] ...

How to move WSL from one drive to another drive

Image
 Hi, let's see how to move the WSL from C Drive to D Drive. Run the below command to check the WSL list Create a new folder inside D Drive Run command  wsl --export Ubuntu D:\wsl\ubuntu.tar to export ubuntu as tar file to D drive Un register ubuntu, using command wsl --unregister Ubuntu Move the ubuntu from the tar file to D Drive Run the below command to set ubuntu as default distro Run the below command to view the list of wsl distro. Now, we can see the ext4 file is moved to the D Drive. Thank you!.

Remove existing repository association in GIT

Image
  Use command  git remote -v to check which git repository the project is associated with, it will give output like below Use command  git remote remove origin , to remove the existing git remote association Use again  git remote -v ,   now you can see that association will be removed.

Install NVM in WSL and Node

 You can install NVM (Node Version Manager) in WSL pretty easily. Here’s the step-by-step: 1. Open your WSL terminal (For example, Ubuntu). 2. Install required dependencies sudo apt update sudo apt install curl wget git -y 3. Download and install NVM Run the official install script: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash (Replace v0.39.7 with the latest version if needed: https://github.com/nvm-sh/nvm/releases ) 4. Load NVM into your shell After installation, add this to the end of your ~/.bashrc (or ~/.zshrc if you use Zsh): export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" Then reload your shell: source ~/.bashrc 5. Verify NVM installation nvm --version 6. Install Node.js using NVM Install latest LTS version: nvm install --lts Install a specific version:...