Use multiple github account

  1. Create each ssh key for each account
  2. Create ~/.ssh/config file
# default account
Host github.com
	HostName github.com
	User git
	IdentityFile ~/.ssh/id_account1

# account2
# use with github-account2 host
Host github-account2
	HostName github.com
	User git
	IdentityFile ~/.ssh/id_account2
  1. Set origin

    • for default account (account1), don't need change. just use : git@github.com:letieu/btw.nvim.git
    • for account2, change host (github.com -> github-account2). git@github.com:letieu/btw.nvim.git -> git@github-account2:letieu/btw.nvim.git
  2. Git config base on folder edit ~/.gitconfig file:

# default config
[user]
	name = letieu
	email = letieu8@gmail.com

# specific config for ONE folder
[includeIf "gitdir:~/code/ONE/"]
  path = ~/code/ONE/.gitconfig

Install window 10 guest

Install (Host)

sudo pacman -S qemu-full virt-manager libvirt dnsmasq

# Active service
sudo systemctl start libvirtd

# Add user to libvirt group
sudo usermod -a -G libvirt $USER

Create VM for Window guest (Host)

  • CPU: set Topology to (socket: 1, cores: 4, threads: 2)
  • Disk:
    • CD1: window.iso file
    • Virtual disk: set Disk bus to VirtIO
    • CD2: virtio-win.iso file
  • Enable boot menu, keep correct disk boot order: CD1 -> Virtual Disk -> CD2
  • NIC: set Device model to virtio

Install window (Guest)

  • Select Install with custom driver
  • Choose version of virtio for window
    • select: E:\viostor\w10\amd64\
  • Next -> next -> ...

Config window (Guest)

  • Device manager:

    • Other device -> Ethernet controller -> Install driver from CD2
    • Display adapters -> Install driver from CD2
  • Install spice guest tool (Download from internet)

  • Restart

Change vgamem size for the bester display (Host)

  • Enable edit XML file on virt manager -> preferences
  • VM info -> Video QXL -> edit XML
  • Change vgame to 262144 (512 * 512)

Try use quickemu, may be it can do bester

Refactor cheat sheet

Long method

  1. Extract Method when something need to explain
  2. Reduce Local Variables and Parameters Before Extract Method
    • Replace Temp with Query EX
    • Introduce Parameter Object EX
    • Preserve Whole Object EX
  3. Replace Method with Method Object ✦ EX
  4. Conditionals and Loops
    • Decompose Conditional
    • Decompose Loop

Large class

...