Step 1) Setup Forticlient
wget -O - https://repo.fortinet.com/repo/forticlient/7.4/ubuntu22/DEB-GPG-KEY | gpg --dearmor | sudo tee /usr/share/keyrings/fortinet.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/fortinet.gpg] https://repo.fortinet.com/repo/forticlient/7.4/ubuntu22/ stable non-free" | sudo tee /etc/apt/sources.list.d/fortinet.list
sudo apt update
sudo apt install forticlient
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Step 2) From the Applications, click open "Forticlient"
"Edit VPN Connection" dialog box opens up
VPN : SSL-VPN, fill up the details Connection Name, Description, Remote Gateway, port No: and Save
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Step 3) 1. Install RDP Client on Ubuntu
Recommended tool: Remmina (GUI RDP client)
sudo apt update
sudo apt install remmina -y
2.Open terminal and run remmina
In Remmina:
Click + to create a new connection.
Set:
Protocol: RDP - Remote Desktop Protocol
Server: IP address or hostname of the remote Windows machine
Username: Your Windows user
Password: Your Windows password
Click Connect.
Friday, August 1, 2025
Steps to Connect to VPN and RDP from ubuntu device to windows
Monday, July 21, 2025
Create .pem file from .ppk using puttygen software in windows for SSH access from cmd
Convert .ppk to unencrypted .pem
If .pem is encrypted and .ppk works, you can convert .ppk to a new .pem:
Open PuTTYgen
Click Load → Load your .ppk file
Go to Conversions → Export OpenSSH key
Save as something like oxfordAIU_unencrypted.pem
Try SSH again:
ssh -i path\to\pem user@ip_address
Friday, June 20, 2025
1. Register an App in Azure AD
-
Go to: https://portal.azure.com
-
Navigate to: Azure Active Directory > App registrations > New registration
if you don't find it goto "Microsoft Entra ID"
Once inside, select App Registrations --> New Registration
-
Give it a name (e.g.
Laravel Email App
) -
Redirect URI: Can be
http://localhost
or your app callback
2. Add API Permissions - from right side manage-->choose api permissions
-
Under "API permissions" > search "mail" and Add:
-
Mail.Send
(delegated) -
User.Read
-
3. Create a Client Secret -From the app registration overview page
-
Under "Certificates & secrets" > "New client secret"
-
Copy the secret value
client id and tenant id
Steps to Generate App Password for example@domain.com to use in laravel app, if there is MFA
🛠️ Sign in at: https://mysignins.microsoft.com/security-info
-
Use example
@domain.com
to log in -
Go to Security Info > Click Add method
-
Select App password
-
Name it (e.g., “Laravel SMTP”) and click Next
-
Copy the generated password – you will not be able to see it again
-
Update your Laravel
.env
:
Sunday, June 8, 2025
Step-by-Step: Install Ubuntu Using WSL on Windows
Step 1: Enable WSL and Virtual Machine Platform
Open PowerShell as Administrator and run:
wsl --install
This will install WSL 2, the latest version with full Linux kernel support.
🔸 If WSL is already installed, make sure it's version 2:
wsl --set-default-version 2
Step 2: Install Ubuntu from Microsoft Store
-
Open Microsoft Store.
-
Search for "Ubuntu".
-
Choose your version (e.g., Ubuntu 22.04 LTS).
-
Click Install.
🔹 Step 3: Set Up Ubuntu
After install:
-
Launch “Ubuntu” from Start menu.
-
Wait for it to extract and initialize.
-
Create a new UNIX username and password.
Step 4: Install Development Tools in Ubuntu (optional)
Inside the Ubuntu terminal:
sudo apt update && sudo apt upgrade -y
sudo apt install php mysql-server composer nodejs npm git curl unzip -y
- composer global require laravel/installer
You need to install the “Remote - WSL” extension inside Visual Studio Code, not from the terminal.
🔹 Step-by-Step to Fix:
-
Open VS Code
-
Go to the Extensions view:
-
Shortcut:
Ctrl + Shift + X
Remote - WSL
After Installing:
To open a WSL Ubuntu project:
-
Press
F1
orCtrl + Shift + P
-
Type:
WSL: Open Folder
🔹 2. Generate SSH Key Pair
-
- ssh-keygen -t ed25519 -C "your_email@example.com"
-
Tuesday, June 3, 2025
Git Setup on Windows
1. Install Git for Windows
-
Download and install from: https://git-scm.com/
-
During setup:
-
Choose “Git from the command line and also from 3rd-party software”
-
Choose recommended defaults unless you have special needs
-
✅ After install, open Git Bash or CMD and run:
git --version
2. Clone Your Laravel + Vue Project
cd C:\xampp\htdocs
git clone https://github.com/your-username/your-laravel-vue-project.git
cd your-laravel-vue-project
Or initialize a new repo:
git init
3. Set Git User Info (if not set globally)
git config user.name "Your Name"
git config user.email "you@example.com"
4. Typical Git Workflow (Basic Commands)
Action Command Stage changes git add .
Commit changes git commit -m "Your message"
Push to remote git push origin main
Pull latest git pull origin main
Check status git status
Switch branch git checkout branch-name
5. Optional Git GUI Tools for Windows
If you prefer visual tools:
GitHub Desktop: https://desktop.github.com/
Sourcetree: https://www.sourcetreeapp.com/
Git Extensions: Advanced GUI + Visual Studio integration
✅ Laravel + Git Example Setup
In C:\xampp\htdocs\your-project
:
composer install
npm install
cp .env.example .env
php artisan key:generate
git init
git remote add origin https://github.com/your-username/your-repo.git
git add .
git commit -m "Initial commit"
git push -u origin main
Saturday, May 17, 2025
Install and setup docker for local projects
Install Docker from Official Docker Repo
✅ STEP-BY-STEP TO INSTALL DOCKER & DOCKER COMPOSE (V2)
# 1. Remove any old Docker versions
sudo apt remove docker docker.io containerd runc
# 2. Set up Docker's official GPG key
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
# 3. Add the Docker APT repository (for Ubuntu 22.04 "jammy")
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu jammy stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# 4. Update APT
sudo apt update
# 5. Install Docker Engine and CLI (this includes docker-compose v2)
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-c
ompose-plugin -y
--------------------
6. Verify Docker is installed
docker --version
7. Verify Docker Compose V2 is working
docker compose version
8. Start Docker service (if not running)
sudo systemctl start docker
sudo systemctl enable docker
9. Test Docker Compose by running a sample container
mkdir ~/docker-test && cd ~/docker-test
echo -e "services:\n hello:\n image: hello-world" > docker-compose.yml
docker compose up
🚀 Next Steps: Run Laravel Project in Docker
✅ 1. Directory Structure (example)
/var/www/html/example.com/
├── docker-compose.yml
├── Dockerfile
├── .env
├── app/
├── public/
├── vendor/
├── ...
✅ 2. Basic docker-compose.yml
Example
version: '3.8'
services:
app:
build:
context: .
container_name: laravel_app
ports:
- "8000:8000"
volumes:
- .:/var/www/html
working_dir: /var/www/html
command: php artisan serve --host=0.0.0.0 --port=8000
depends_on:
- db
db:
image: mysql:5.7
container_name: mysql_db
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: laravel
MYSQL_USER: laravel
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: root
volumes:
- dbdata:/var/lib/mysql
volumes:
dbdata:
✅ 3. Basic Dockerfile
FROM php:8.1-cli
# Install system dependencies
RUN apt-get update && apt-get install -y \
git unzip curl libzip-dev zip && \
docker-php-ext-install zip pdo pdo_mysql
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Set working directory
WORKDIR /var/www/html
✅ 4. Run the Laravel App
----------------------------------------
docker compose up --build
--------------------------------------------
Wednesday, April 30, 2025
How to get your open AI API Key
✅ Step-by-Step Guide to Get Your API Key
-
Go to the OpenAI Platform
🔗 https://platform.openai.com -
Sign in / Sign up
-
Log in with your existing account, or
-
Create a new account using your email, Google, or Microsoft account.
-
-
Go to API Keys
-
Once logged in, click your profile icon (top-right corner) → "View API keys", or go directly to:
🔗 https://platform.openai.com/account/api-keys
-
-
Generate a New API Key
-
Click the "+ Create new secret key" button.
-
Give it a name (optional, for your reference).
-
Copy and store the key safely — you will only see it once.
5. Authenticate: Navigate to your project root in the terminal Export your OpenAI API key:
(You can get your API key from the OpenAI platform.)Bashexport OPENAI_API_KEY="YOUR_OPENAI_API_KEY"
- Run: Navigate to your project root in the terminal and type
codex
followed by your request in natural language. For example:Bashcodex "Explain this repo to me."
-
Sunday, April 20, 2025
Codex CLI - Your coding agent from open AI
The OpenAI Codex CLI is a command-line tool that brings the power of OpenAI's language models directly to your terminal, acting as a lightweight coding agent. Here's a breakdown of what it is and what you can do with it:
Key Functionality:
- Natural Language to Code: You can describe what you want to build, fix, or understand in plain English, and Codex CLI will translate that into code.
- Code Editing and Generation: It can read, modify, and even run code on your local machine.
- Multimodal Inputs: Beyond text, it can understand screenshots and diagrams to help generate or edit code accordingly.
- Integration with Your Workflow: It runs entirely in your terminal, allowing for quick iteration without switching contexts.
- Configurable Automation: It offers three approval modes to control how hands-on you want to be:
- Suggest (default): Proposes edits and shell commands, requiring your approval before execution.
- Auto Edit: Automatically applies file edits but asks for approval before running shell commands.
- Full Auto: Autonomously reads, writes, and executes commands within a sandboxed, network-disabled environment.
- Version Control Awareness: It warns you before entering "Auto Edit" or "Full Auto" if your directory isn't under version control.
What You Can Do With It:
- Build Features Faster: Describe the functionality you need, and let Codex CLI generate the code.
- Squash Bugs: Ask it to identify and fix errors in your code.
- Understand Unfamiliar Code: Have it explain the logic and structure of existing codebases.
- Refactor and Clean Up Code: Instruct it to improve the quality and readability of your code.
- Write Tests: Ask it to generate unit tests for your code.
- Set Up Migrations, Batch Rename Files, and Update Imports: Automate common development tasks.
- Use Repository Markdown for Context: It can understand and utilize information in your project's markdown files.
Getting Started:
- Install: Open your terminal and run:
Bash
npm install -g @openai/codex
- Authenticate: Export your OpenAI API key:
(You can get your API key from the OpenAI platform.)Bash
export OPENAI_API_KEY="YOUR_OPENAI_API_KEY"
- Run: Navigate to your project root in the terminal and type
codex
followed by your request in natural language. For example:Bashcodex "Explain this repo to me."
- Switch Modes (Optional): Use flags like
--auto-edit
or--full-auto
to change the automation level.
Important Considerations:
- Experimental: Codex CLI is currently an experimental project and may have bugs or undergo changes.
- Local Operation: Your source code never leaves your local environment unless you explicitly choose to share it.
- Open Source: The project is open source, and you can find the repository on GitHub (https://github.com/openai/codex).
- API Key Required: You need an active OpenAI API key to use the CLI.
- Model Usage: By default, it uses the
o4-mini
model for speed, but you can specify other available models using the-m
flag (e.g.,codex -m o3
).
In essence, the OpenAI Codex CLI aims to streamline your development workflow by bringing AI-powered coding assistance directly to your terminal, allowing you to interact with your codebase in a more intuitive and efficient way.
Thursday, March 6, 2025
Steps to set up docker in your localhost
Reference -
https://docs.docker.com/engine/install/ubuntu/
-
1) git clone the code repository that is dockerised
2) cd to git repo
3) Set up Docker's apt
repository
4)
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
5)
# Add the repository to Apt sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update
6)
Install the Docker packages
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
7)
Verify that the installation is successful by running thehello-world
image:
sudo docker run hello-world
Go to that git folder and run
8) sudo docker compose -f docker-compose.yml up -d --build
--------------------------------------------------------
fix this Error ---
An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.google.com/linux/chrome/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 32EE5355A6BC6E42
---------------------------------------------------------------
1)open your terminal
2) wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
3)
If the first method does not work, try this method.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 32EE5355A6BC6E42
Sunday, February 16, 2025
Upgrade AWS instance and Ubuntu Commands to check system resources
Check system resources:
lscpu # Check CPU details
free -h # Check RAM
df -h # Check storageStep 1: Check Instance Compatibility
- Login to AWS Console → Go to EC2 Dashboard.
- Select your t2.large instance.
- Click on Instance Settings → Change Instance Type.
- Check if c6i.4xlarge is available in the same Availability Zone.
- If not, you may need to create a new instance and migrate your data.
Step 2: Stop the Instance
- Go to EC2 Dashboard.
- Select the t2.large instance.
- Click Instance State → Stop Instance.
- ⚠️ Warning: Stopping the instance will cause temporary downtime.
Step 3: Change Instance Type
- Select your stopped t2.large instance.
- Click on Actions → Instance Settings → Change Instance Type.
- From the dropdown, select c6i.4xlarge.
- Click Apply.
Step 4: Start the Upgraded Instance
- Select your instance.
- Click Instance State → Start Instance.
- Verify that your application is working as expected.