Monday, March 30, 2026

Laptop battery level from Linux CLI

upower --enumerate
 
# note battery entry, i.e. /org/freedesktop/UPower/devices/battery_BAT0
 
upower -i /org/freedesktop/UPower/devices/battery_BAT0
 
or 
 
acpi -b
 
or
 
inxi -B

Monday, March 23, 2026

Clone gitlab repo with access token

 When cloning a repo, you may get an error like:

remote: HTTP Basic: Access denied. If a password was provided for Git authentication...

 Go to GitLab and create a Personal Access Token if you don't already have one.  Copy that token use it to clone the repo

git clone https://<user>:<token>@gitlab.com/<repo_name>.git

Where <token> is the token. 

If the token expires or is revoked, you will need to generate a new token and add a new remote for the repo

git remote add origin https://sbargabus:<token>@gitlab.com/<repo_name>.git

And set up remote tracking

git branch --set-upstream-to=origin/main main