SQL Server - Check Secure Connnection

sqlcmd -S d11-sql-db001.gcs.cloud -U sa -P Password123 1 > 2 > 3 < exit sqlcmd -S d11-sql-db001.gcs.cloud -U sa -P Password123 -Q "SELECT session_id, encrypt_option FROM sys.dm_exec_connections WHERE session_id = @@SPID;" session_id encrypt_option 53 FALSE

March 27, 2025

sysprep in AWS

Delete all the items controlled by Group Policy (e.g., Certificates, Firewall Settings) Open “Amazon EC2Launch Settings” and click ”Shutdown with Sysprep”

March 27, 2025

OpenSSL - Initial Setup

OpenSSL Initial Setup 1. Create a folder structure mkdir -p certs/{ca,mid-ca,server}/{private,certs,newcerts,crl,csr} 2. Change the permissions chmod -v 700 certs/{ca,mid-ca,server}/private 3. Create index files touch certs/{ca,mid-ca}/index 4. Set a serial number openssl rand -hex 16 > certs/ca/serial openssl rand -hex 16 > certs/mid-ca/serial 5. Copy and place the configuration files ca.conf - mid-ca.conf See also: OpenSSL - Initial Setup OpenSSL (1) - Root CA OpenSSL (2) - Intermediate CA OpenSSL (3) - Server Certificate ...

March 10, 2025

Managing AWS Accounts in Terminal

Register AWS Accounts to the Terminal Set AWS Credential The command to check the Current AWS Credentials aws sts get-caller-identity The command to clear the AWS Account from the terminal unset AWS_ACCESS_KEY_ID unset AWS_SECRET_ACCESS_KEY unset AWS_SESSION_TOKEN

February 27, 2025

Deploy a Amazon Linux 2023

Deploy a Linux machine Update OS sudo yum update -y Update Hostname and check it sudo hostnamectl set-hostname DEV-VAR-OIDC2.apj.cloud hostnamectl Update TimeZone and check it sudo timedatectl set-timezone Australia/Sydney timedatectl DNS Settings - Make sure all the DNS servers are registered sudo vi /etc/resolv.conf Install some components for any Linux OS sudo yum install sssd-ad sssd-tools realmd adcli Install some components for Amazon Linux 2023. sudo yum install oddjob oddjob-mkhomedir Check the status of Active Directory realm discover apj.cloud ...

February 25, 2025

Ignore Settings in GitHub

How to Ignore Uploading Folders and Files to GitHub For example .venv folder Open your project folder in VS Code. Open .gitignore file in the root of the project Add the following line to .gitignore: .venv/ Save the file. then Git will ignore the .venv folder, and it won’t be tracked in your repository. If .venv was already committed before, you’ll need to remove it from Git history using: git rm -r --cached .venv git commit -m "Removed .venv from repository" git push origin main # or your current branch You can check if .venv is ignored by Git using the following command ...

February 25, 2025

Create a New Blog Post

Create a new blog post in HUGO Create a new file hugo new posts/create-a-new-blog-post.md Add Tag and Category to the header --- date: '2025-02-25T22:21:46+11:00' draft: false title: 'Create a New Blog Post' tags: ["Hugo", "Blog","Homepage"] categories: ["Technology"] --- Edit the blog page Check the page in debugging mode hugo server hugo serve Open the page from the browser http://localhost:1313/

February 25, 2025

Terraform Link to "tfvars" File

Terraform tfvars file When a tfvars file is in a different location, you must specify it using the “-var-file” option. However, creating a symbolic link can simplify the command operation. Create a symbolic link ln -s ../common.tfvars terraform.tfvars Run a simple terraform command without option terraform plan Screenshot of the process

February 18, 2025

How to Disable Sounds in vs Code

How to disable sounds in VS Code. Open the Command Palette (Ctrl + Shift + P). Search for “Preferences: Open Settings (JSON)” and select it. Add the following line inside the JSON file: "editor.accessibilitySupport": "off",

February 18, 2025

Create ICO File From SVG File

Using GIMP Open your SVG file in “GIMP” Resize to “256x256” pixels Click “File” → “Export As”, choose “.ico” format Save the file

February 10, 2025