Migrate pip to uv

uv is a super fast dependency resolver. Assume now your have: .venv: the virtual environment directory requirements.txt: the dependency list file It is easy to migrate from pip to uv with following commands. uv venv .venv source .venv/bin/activate uv init uv add -r requirements.txt

2025/5/29
articleCard.readMore

Terminal autocomplete (only macOS and Linux)

How to Make your terminal smarter? Install Oh My ZSH! sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" Install zsh-autosuggestions and zsh-autocomplete: brew install zsh-autosuggestions zsh-completions Add following to ~/.zshrc: source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh if type brew &>/dev/null; then FPATH=$(brew --prefix)/share/zsh-completions:$FPATH autoload -Uz compinit compinit fi Force rebuild zcompdump: rm -f ~/.zcompdump; compinit Reopen the terminal, it will works.

2025/5/21
articleCard.readMore

How to expand the hard disk capacity of Debian/Ubuntu in ESXi

1 Go to ESXi dashboard, expand the hard disk to expected size. Here I will resize my disk from 203G to 1100G. 2 show current disk capacity ➜ ~ df -h Filesystem Size Used Avail Use% Mounted on ... /dev/sda1 203G 161G 32G 84% / ... 3 use parted to show and resize disk. You […]

2025/3/6
articleCard.readMore

Authentication FastAPI with Keycloak

First you need to create a realm and client, and get the client id and secret. Go to Keycloak configuration problems and solutions to see how to setup at Keycloak Admin Panel. 1 Install dependencies pip install python-jose[cryptography]>=3.3.0 pip install cryptography>=3.4.0 pip install PyJWT==2.10.1 Setup configuration Add following to your configuration file, like config.py: from […]

2025/2/4
articleCard.readMore

Keycloak configuration problems and solutions

400 Bad Request when login Please check your realm name, it should not include SPACE. How to get client secret You need to turn on Client authentication and Authorization at client Settings. Then you can see and copy the Client secret from the credentials tab. How to get Access token signature algorithm You will get […]

2025/2/4
articleCard.readMore

Careers and LinkedIn Jobs Page of Fortune 500 American Companies

Walmart – General Merchandisers – Careers, Linkedin Jobs Amazon – Internet Services and Retailing – Careers, Linkedin Jobs Apple – Computers, Office Equipment – Careers, Linkedin Jobs UnitedHealth Group – Health Care: Insurance and Managed Care – Careers, Linkedin Jobs Berkshire Hathaway – Insurance: Property and Casualty (Stock) – Careers, Linkedin Jobs CVS Health – […]

2024/11/15
articleCard.readMore

How to connect Windows desktop remotely using RDP and cloudflare ZeroTrust tunnel

1) On you windows, turn on the remote desktop: 2) Change your domain DNS to cloudflare. 3) Create a tunnel under cloudflare -> Zero Trust -> Networks -> tunnel. Then create a Public Hostname as following: 4) Install RDP or Windows APP. 5) Install and run cloudflared on you client PC: cloudflared access rdp --hostname […]

2024/10/23
articleCard.readMore

ESXi 8 issue solved: This PC can’t run Windows 11

To install Windows 11 on ESXi 8, the minimum requrements should meet. Summary is: 1+ GPU 4+ GB Memory 64+ GB Disk UEFI, Secure Boot capable TPM Graphics card (Optional, can install on ESXi 8 without this) Display (Optional, can install on ESXi 8 without this) The main reason causes this issue is TPM vSphere […]

2024/10/9
articleCard.readMore

How to download and license ESXi 8?

It is not easy to download ESXi 8 from Vmware official website. You must have visited Wmware’s official website, but they only put a link to broadcom, and then they kept jumping around, and in the end you still couldn’t find the correct download link. In this article, we will explain step by step how […]

2024/10/8
articleCard.readMore

Get clicked word using pure Javascript

On browser, if we want to get the clicking word we can use following Javascript: var captureWordOnClick = function(containerEl, callback) { containerEl.addEventListener('click', function (event) { // Get the mouse position relative to the clicked element const x = event.clientX; const y = event.clientY; // Get caret position at the point of click const caretPosition = […]

2024/10/3
articleCard.readMore