Posts

Mount a Folder from a Remote Windows PC over the Internet Using rclone and WinFsp

This guide explains how to securely share a folder from one Windows PC over the Internet and mount it as a normal drive letter on another Windows PC. 🖥️➡️🌍➡️💻 🧰 What You Need Computer Required Software Home PC / Server rclone Remote PC / Client rclone + WinFsp 🗺️ How the Connection Works Home PC / server └── Local folder: E:\Shared\User1 └── rclone serve sftp on internal port 2022 └── Router forwards external port 48222 └── sftp.example.com:48222 └── Remote PC / client └── rclone SFTP remote: my_cloud └── rclone mount + WinFsp └── Drive S: 🔐 Each rclone serve sftp process exposes only the folder or remote supplied to that process. The SFTP user cannot browse above that root. 📚 Contents Home PC — Server Remote PC — Client Enable SFTP Host-Key Validation T...

Recreate Windows installer ISO from USB created by Rufus

Image
Use ImgBurn . Select Create image file from files/folders . Add the USB drive. Open the Advanced → Bootable Disc tab and tick Make Image Bootable . Specify the correct boot image file: BIOS: boot\etfsboot.com UEFI: efi\microsoft\boot\efisys.bin Click Build to create the ISO.

OneDrive client alternative

Synchronize OneDrive with rclone Install and configure rclone . You can follow my previous guide if you haven't already. To make your local folder an exact mirror of your OneDrive folder (download only), use: <path_to_rclone>\rclone.exe sync "<rclone_name>:<remote_folder>" "<local_folder>" -P -v Example: C:\rclone\rclone.exe sync "my_onedrive:My Documents" "C:\Users\default\Documents" -P -v What this command does sync makes the destination (local folder) exactly match the source (OneDrive) . Downloads new files from OneDrive. Updates files that have changed on OneDrive. Deletes local files that were deleted from OneDrive. Nothing is uploaded to OneDrive. To create a one-way mirror from your local folder to OneDrive , reverse the source and destination: <path_to_rclone>\rclone.exe sync "<local_folder>...

Fix OneDrive issue

How to Fix OneDrive Error 0x8004def4 Symptoms Error code 0x8004def4 appears. OneDrive asks you to restart OneDrive and if the problem presist, to restart Windows. Start with a reset. If the problem persists, perform a clean reinstall. Method 1 - Reset OneDrive Open Run ( Win + R ) or Command Prompt and run: %localappdata%\Microsoft\OneDrive\OneDrive.exe /reset Note If resetting does not resolve the issue, continue with the clean reinstall below. Method 2 - Clean Reinstall OneDrive Step 1 - Uninstall OneDrive Open Command Prompt as Administrator . Uninstall OneDrive: %SystemRoot%\System32\OneDriveSetup.exe /uninstall Verify that OneDrive has been removed: dir "%localappdata%\Microsoft\OneDrive" Expected result: OneDrive.exe should no longer exist. If OneDrive.exe is gone but some files remain, terminate any remaining OneDrive processes: taskkill /F /IM OneDrive.exe taskkill /F /IM OneDrive.App.exe taskkill /F /IM FileC...

Install Windows Subsystem For Android

Installing WSA Download MustardChef WSA Builds . Extract the files to C:\Android . Run PowerShell as Administrator . Run the following commands: cd C:\Android Set-ExecutionPolicy Bypass -Scope Process -Force .\Install.ps1 Uninstalling WSA Run PowerShell as Administrator . Run the following commands: wsl --shutdown Get-AppxPackage *WindowsSubsystemForAndroid* | Remove-AppxPackage Remove-Item C:\Android -Recurse -Force WSA Sideloader WSA Sideloader is a simple tool that allows you to easily install APK files on Windows Subsystem for Android (WSA). It also supports installing XAPK , APKM , and APKS files.

Install MySQL Workbench as portable app

Run in CMD or PowerShell: msiexec /a mysql-workbench-community-8.0.xx-winx64.msi /qb TARGETDIR=C:\wbtemp Replace the filename with your actual MSI name. The wbtemp folder will be created automatically. This does NOT install the application. It only extracts the files. Find MySQLWorkbench.exe inside the extracted files and copy the entire folder to a new location, for example: C:\PortableWorkbench Then run: MySQLWorkbench.exe This method should work for most applications distributed as MSI installers.

Compare Local and Remote Branches with external tools

✅ Use VS Code as diff tool (clean setup) Run this once in your terminal (WSL or normal): git config --global diff.tool vscode git config --global difftool.vscode.cmd "code --wait --diff $LOCAL $REMOTE" git config --global difftool.prompt false 🚀 How to use it git difftool origin/UAT...HEAD 👉 Result: Opens each file in side-by-side diff view Clean UI (like VS Code) 🧠 Tip (very useful) If you want just one file : git difftool origin/UAT -- path/to/file.php ✅ Set up WinMerge as diff tool (Windows) Now let’s wire up WinMerge . 🔧 1. Install WinMerge Download & install normally (if not already). Make sure path looks like: C:\Program Files\WinMerge\WinMergeU.exe or C:\WinMerge\WinMergeU.exe 🔧 2. Configure Git Run this in Windows Git Bash (important, not WSL): git config --global diff.tool winmerge git config --global difftool.winmerge.cmd '"/mnt/c/WinMerge/WinMergeU.exe" -e -u -dl Local -dr Remote "...

Logout from Amazon Q VSC

1. Force sign-out from VS Code Accounts In VS Code: Press Ctrl + Shift + P Run: Accounts: Sign Out Select: AWS Builder ID or anything related to Amazon / AWS . Then restart VS Code. 2. Remove authentication sessions manually Inside WSL run: rm -rf ~/.vscode-server/data/User/globalStorage/ms-vscode.authentication and also: rm -rf ~/.vscode-server/data/User/secrets Then restart VS Code. 3. Clear browser AWS login (very important) Amazon Q authentication comes from AWS Builder ID via browser OAuth. Logout here: https://profile.aws.amazon.com/ or open private/incognito window before logging in again. 4. Nuclear reset (guaranteed) Close VS Code completely, then run in WSL: rm -rf ~/.vscode-server Then reopen the project: code . This forces VS Code to reinstall the server and removes all cached auth tokens .

MySQL search value methods

If you want to find a specific value anywhere in a MySQL database (any column, any table), there are a few common approaches—ranging from quick-and-dirty to more systematic. 1️⃣ Search a known table but any column If you know the table but not the column: SELECT * FROM your_table WHERE col1 = 'value' OR col2 = 'value' OR col3 = 'value'; ⚠️ This requires you to list columns manually. 2️⃣ Search all columns of all tables (automatic way) This is the practical solution when you have no idea where the value lives. Step 1: Generate search queries using INFORMATION_SCHEMA SELECT CONCAT( 'SELECT "', TABLE_NAME, '" AS table_name, "', COLUMN_NAME, '" AS column_name FROM ', TABLE_SCHEMA, '.', TABLE_NAME, ' WHERE ', COLUMN_NAME, ' = ''your_value'';' ) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'your_database'; This generates SQL statem...

Join vs Model vs Relationship in Laravel

Understanding SQL joins, Eloquent relationships, and model accessors. 1) Join (Database level) A join is a database operation used to combine rows from multiple tables. It happens at the SQL level and is focused on performance and filtering. Example: SELECT users.name, posts.title FROM users JOIN posts ON posts.user_id = users.id; Runs in the database Returns raw rows Very fast 2) Relationship (Eloquent ORM level) A relationship defines how models are connected. It represents business meaning, not just raw data. class User extends Model { public function posts() { return $this->hasMany(Post::class); } } Usage: $user->posts; Returns model objects Supports lazy & eager loading Encodes domain logic 3) Model Accessor (Presentation level) An accessor is a computed attribute on a model. It does not fetch data from the dat...

Check Change Files in Git

You can compare only the files that differ between your current local branch and another branch on the remote using Git. Here are the most common and useful ways, from simplest to more detailed. 1. List only the changed files (most common) git fetch origin git diff --name-only origin/other-branch If you want to be explicit about your current branch: git diff --name-only origin/other-branch..HEAD ➡️ Shows only file paths that are different. 2. List changed files with change type (added / modified / deleted) git diff --name-status origin/other-branch..HEAD Example output: M src/app.js A src/new-file.ts D src/old-file.css 3. Compare against the common ancestor (recommended for PR-style comparison) This avoids noise from changes made in the target branch after you branched. git diff --name-only origin/other-branch...HEAD ... (three dots) means: changes on your branch since it diverged from the other branch This is usually what you want when prepari...

Compare local files with remote Git repo using WinMerge

Here’s a clean step-by-step way to compare your local WSL repo folder vs the remote repo state in WinMerge , and then show only changed files . 1) In WSL: go to your repo and fetch remote cd /path/to/your/repo git fetch origin 2) In WSL: create a “remote snapshot” folder (safe, no checkout) This exports the remote branch into a temp folder. REMOTE_BRANCH=origin/main SNAP=/tmp/repo_remote_snapshot rm -rf " $SNAP " mkdir -p " $SNAP " git archive " $REMOTE_BRANCH " | tar -x -C " $SNAP " Change origin/main if your remote branch is different (e.g. origin/master , origin/develop ). 3) Open WinMerge and start a folder compare Launch WinMerge (on Windows) File → Open… (or “Open”) Select Folder Compare 4) Pick the two folders (WSL paths via \\wsl$ ) In WinMerge: Left (Local working folder) Use your actual repo path in WSL: \\wsl$\Ubuntu\home\<youruser>\ path \ to \your\repo Right (Remote snapshot folder) \\wsl $ \Ubu...