treeish: branch name, tag, SHA, HEAD, etc.
git show HEAD
git show HEAD^
git show HEAD^^
git show HEAD~1
git show HEAD~2| # create svelte project using sveltekit | |
| pnpm create svelte@latest my-app | |
| # add markdonw support using svelte-add tool | |
| # https://github.com/svelte-add/mdsvex | |
| pnpx svelte-add@latest mdsvex | |
| # add prism css link from cdn: | |
| # add following contents to /src/routes/+layout.svelte | |
| ```svelte |
| # /etc/wsl.conf | |
| [automount] | |
| enabled = true | |
| root = /mnt | |
| options = "metadata,umask=022,fmask=011" | |
| mountFsTab = true | |
| [network] | |
| generateHosts = true |
| This can be done by adding following to the settings.json | |
| "cmake.configureSettings": { | |
| "TARGET_ARCH": "${buildKitTargetArch}" | |
| }, | |
| In CMakeLists.txt, it can be used like this: | |
| #--- check target architecture | |
| if(NOT TARGET_ARCH) | |
| set(TARGET_ARCH "x86_64" CACHE STRING "Choose target architecture, options are: x86, x86_64..." FORCE) |
| Add fillowing to settings.json: | |
| "cmake.configureSettings": { | |
| "CMAKE_BUILD_TYPE": "${buildType}" | |
| }, | |
| ref: https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/cmake-settings.md | |
| OR, | |
| "cmake.preferredGenerators": [ |
| 1. Open PlatformIO terminal: Press <Ctrl>+P and type "platformIO: Net Terminal" | |
| 2. In the PlatformIO terminal, execute following command | |
| > platformio settings get projects_dir # check current default location | |
| > platformio settings set projects_dir "New Directory" | |
| 3. short command | |
| > pio settings get projects_dir | |
| > pio settings set projects_dir "New Directory" | |
| /** pick */ | |
| export function pick<T, K extends keyof T>(obj: T, ...keys: K[]): Pick<T, K> { | |
| const ret: any = {}; | |
| keys.forEach(key => { ret[key] = obj[key]; }); | |
| return ret; | |
| } |
| // | |
| // Example using jQuery Sidebar | |
| // https://github.com/jillix/jQuery-sidebar | |
| // <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-sidebar/3.3.2/jquery.sidebar.min.js"></script> | |
| // | |
| declare global { | |
| interface JQuery { | |
| sidebar(options?: any): JQuery; | |
| } |