Command Palette
Search for a command to run...
Comments
Join the discussionNo comments yet. Be the first to comment.
Go Cheatsheet
Go Cheatsheet - WaitGroup / Mutex / Atomic
Concurrency WaitGroup var wg sync.WaitGroup for i := 1; i <= 5; i++ { wg.Add(1) go func(num int) { defer wg.Done() }(i) } wg.Wait() Mutex import "sync" var mu sync.Mutex mu.Lock() // do some operation mu.Unlock() Use atomic to ...
More from this blog
Enable cursor smooth animation in VS Code
Go to settings, search "cursor smooth", enable the smooth settings:
Vue3 use v-bind in style tag
Style <script setup lang="ts"> const color = ref("red) </script> <style scoped> .text { color: v-bind('color') } </style>
Pinia listen state change example
Pinia export const initData = function () { const instance = useCounterStore() // listen on change, then save to localStorage instance.$subscribe((mutation, state) => { localStorage.setItem(instance.$id, JSON.stringify(state)) ...
Config Dank Mono Font in VS Code
Steps 1, Buy & install Dank Mono font (https://dank.sh) 2, In settings.json, add: "editor.fontFamily": "Dank Mono, Menlo, Monaco", "editor.fontLigatures": true, "editor.tokenColorCustomizations": { "textMateRules": [ {...
Tailwind CSS UI Free library
General components Meraki UI ( https://merakiui.com/ ) Tailwind Components ( https://tailwindcomponents.com/ ) Tailblocks ( https://tailblocks.cc/ ) DaisyUI ( https://daisyui.com/ ) LofiUI ( https://lofiui.co/ ) MambaUI ( https://mambaui.com/ ) Flow...