Search This Blog

Labels

adobe (1) android (3) apache (3) aviation (1) bash (2) chrome (2) composer (1) cookery (3) dev (4) dodanperks (1) extensions (1) facebook (2) firefox (1) git (3) grafana (1) guzzle (1) headaches (13) htaccess (1) html5 (2) jquery (2) lamp (1) life hacks (10) linux (29) mysqli (2) native (1) nodejs (1) opera (3) php (10) railfanning (1) reactjs (3) reactnative (1) servers (11) sinhala (1) smartphones (2) snap (1) sound (1) tech (22) troubleshoots (7) ubuntu (31) unicode (4) virtualbox (2) wamp (2) web (11) windows (4) wordpress (3) youtube (2) කෑම (3)

Sunday, 24 May 2026

How to install NodeJS LTS on Windows without admin rights (as a local user)

  1. Go to Node.js download page. Download the binary. This includes Node.js and npm.
  2. Extract to a local directory. (Eg: C:\Users\<user>\Applications\node-v24.16.0-win-x64)
  3. Add the path-to-directory to the local PATH in Environment Variables (aka. User variables for <user>)
Source: Stackoverflow

Monday, 9 February 2026

Enable Opera Speed Dials on Address Bar


This used to be activated by default, but not anymore. To re-enable Speed Dial tiles on address bar when you click on it, enable the following;


Tested on Opera version: 123.0.5669.23 on 2025 Nov 05

VirtualBox VT-x is being used by another hypervisor error on Ubuntu 24.04.3

So the error basically looks like this;
VT-x is being used by another hypervisor (VERR_VMX_IN_VMX_ROOT_MODE).

VirtualBox can't operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: ConsoleWrap
Interface: IConsole {6ac83d89-6ee7-4e33-8ae6-b257b2e81be8}
The solution is to check the running KVM and shutting them down
lsmod | grep kvm
lsof | grep kvm
Then remove them, the usual suspects are
kvm_intel
and
kvm
sudo rmmod kvm_intel
sudo rmmod kvm

Thursday, 9 October 2025

Revert a pushed GIT commit

git reset --hard HEAD~
git push -f

git reset --hard HEAD
or
git reset --hard HEAD~1
: What it does

This command forcefully resets your current branch to the commit just before the latest one (HEAD~1), and:

  • Moves the HEAD pointer back one commit.
  • Updates the index (staging area) to match that previous commit.
  • Overwrites your working directory to match that previous commit — meaning any changes in the latest commit and any uncommitted changes are lost.

In short, it erases the last commit and everything in it, as if it never happened.


Difference from git revert

Feature git reset --hard HEAD~1 git revert HEAD
Action Deletes the last commit Creates a new commit that undoes the last one
History Rewrites history (destructive) Preserves history (non-destructive)
Safety Risky — can lose data Safe — doesn't remove any commits
Collaboration Not recommended on shared branches Safe for shared branches
  • git revert is like saying “Oops, let me undo that” — but it keeps a record of the mistake.
  • git reset --hard is like saying “Let’s pretend that never happened” — and it wipes it clean.

If you're working solo and want a clean slate, reset --hard is fine. But if you're collaborating, revert is the safer choice.

Want to see an example of each in action?

Sunday, 4 May 2025

Ubuntu 24.04.2 - Wifi and NVIDIA drivers do not work on the Kernel version 6.11.0-25-generic

Solution

I wrote about the solution that worked for me after much research on AskUbuntu

Useful links 


Might work 

Switch to an old Kernel version that works, and execute the following 

sudo apt install --reinstall linux-generic 
sudo apt install linux-modules-extra-6.11.0-25-generic

Tuesday, 24 September 2024

Apache2/PHP increase upload file size

Edit the php.ini Use a standard text editor to open
/etc/php/apache2/php.ini
, search for the following variables and change/increase these to (as desired but a general guideline is mentioned):
memory_limit = 512M
upload_max_filesize = 100M
post_max_size = 100M
Some more values to change if you want a better performance of your web server:
max_execution_time = 600
max_input_time = 600
memory_limit = 1024M
Save and close the editor/file and restart the apache web server with:
service apache2 restart
or
systemctl restart apache2

Sunday, 22 September 2024

Ubuntu 24.04.1 - libadwaita apps can't detect dark mode - fix

Found solution here on Stackoverflow. Open /etc/environment
sudo nano /etc/environment
Then add the following line to the end of it.
ADW_DEBUG_COLOR_SCHEME=prefer-dark
Save it and source it,
source /etc/environment
Logout and Login. Should libadwaita apps work in dark mode now.