Skip to content

Instantly share code, notes, and snippets.

View zcemycl's full-sized avatar
:shipit:

Leo Leung zcemycl

:shipit:
View GitHub Profile

ROS Docker Nvidia

wget https://nvidia.github.io/nvidia-docker/gpgkey --no-check-certificate
sudo apt-key add gpgkey
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker
@zcemycl
zcemycl / README.md
Last active January 27, 2025 12:20
React + Tailwindcss + Typescript 2025-01-27

React + Tailwindcss + Typescript 2025-01-27

Just a note to avoid setup hell for react19 + tailwindcss + typescript, here i use vite.

  1. Create project via vite. npm create vite@latest
    • Name
    • React for framework
    • Typescript (i don't like React Router v7, looks more confused than Next)
  2. Install tailwindcss in reference 1.
    • Use tailwindcss@3 npm install -D tailwindcss@3 postcss autoprefixer since init does not exist in 4.
  3. Add path alias in reference 2.
@zcemycl
zcemycl / work-with-multiple-github-accounts.md
Created January 27, 2025 01:10 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@zcemycl
zcemycl / README.md
Last active July 25, 2025 10:50
Windows Setup to use WSL Ubuntu Pyenv Poetry

Install Ubuntu wsl2 in Windows

  1. Enable SVM in BIOs of your PC.
  2. Enable WSL in Windows.
  3. Update WSL to latest version such that it has manage option.
  4. Move WSL to your favorite Drive.
  5. Install Ubuntu via wsl --install Ubuntu-xx.xx.
  6. Install apt packages before getting pyenv.
    sudo apt-get install libssl-dev libffi-dev liblzma-dev python3-tk tk-dev libreadline-dev bzip2
    
@zcemycl
zcemycl / README.md
Created May 11, 2023 20:47
Pyenv and Poetry in Macos
  1. Manage different versions of python
brew install pyenv
pyenv install 3.9.13
~/.pyenv/versions/3.9.13/bin/{python,pip}
  1. Install poetry for dependencies.
rm poetry.lock
~/.pyenv/versions/3.9.13/bin/pip install poetry
@zcemycl
zcemycl / handling_multiple_github_accounts.md
Created May 2, 2023 21:29 — forked from Jonalogy/handling_multiple_github_accounts.md
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

@zcemycl
zcemycl / imagenet1000_clsidx_to_labels.txt
Created November 14, 2019 21:40 — forked from yrevar/imagenet1000_clsidx_to_labels.txt
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',