随笔分类 - Tools
摘要:Run: pnpm create vite Give a project name, select framework & Typescript. Run: pnpm devto start the dev server
阅读全文
摘要:import "./styles.css"; import React from "react"; import ReactDOM from "react-dom"; import { createMachine, assign } from "xstate"; import { useMachin
阅读全文
摘要:If the server starts on a different port, such as 3001 or 3002, this is because another process is currently running on port 3000. This is ok, but you
阅读全文
摘要:In VSCode, install REST Clinet Extension: Create API_EXAMPLE.http file in root folder: ### Get mock GET http://localhost:3000/data HTTP/1.1 ### Post m
阅读全文
摘要:Step 1 — Find chromedriver binary path To find chromedriver binary path, run the following command in the terminal: which chromedriver The output shou
阅读全文
摘要:lib.js import { parse, evaluate } from "groq-js" export let groq = async ([query]) => { let tree = parse(query) return async dataset => { let result =
阅读全文
摘要:1) There's a connection timeout This is a security group issue. Any timeout (not just for SSH) is related to security groups or a firewall. Ensure you
阅读全文
摘要:If you are new to YAML, here is a useful link to a blog on YAML. YAML tutorial Here is a free tool that was mentioned in the video that can convert YA
阅读全文
摘要:1 Move next line ESC j 2 Move previous line ESC k 3 Delete whole line ECS dd 4 Insert ESC i 5 Save ESC :wq! ! for overwrite
阅读全文
摘要:1. add a new user sudo adduser <admin_user_name> 2. set new user to be admin sudo usermod -aG sudo <admin_user_name>su - <admin_user_name> 3. create n
阅读全文
摘要:Find: sudo lsof -i :8080 Kill: kill -9 <PID>
阅读全文
摘要:1. Shell - Linux/Mac Users For Unix/Linux/Mac operating systems, a shell is a command-line program that accepts users' commands and executes those com
阅读全文
摘要:In Postman, you can create a collection of API requests. Those collection can be save into json file as well. { "info": { "_postman_id": "9c5a8003-1c5
阅读全文
摘要:Schedule timed jobs on macOS with launchd launchd is a robust scheduled job automation tool on macOS that allows you to schedule a task to be run at r
阅读全文
摘要:Getopts Let’s say you want to allow a user to pass a -v flag to turn on verbose logging in a script. Manually parsing out options passed to a script i
阅读全文
摘要:Case Basic case "$1" in a) echo "a match";; b) echo "b match";; c) echo "c match" ;; *) echo "none of the case match" exit 1;; esac If we run: ./case_
阅读全文
摘要:Git hooks In root of project: mkdir -p hooks cd hooks touch post-merge post-merge: #! /bin/bash # all stdio in this script after this line will be sen
阅读全文
摘要:In this lesson, we'll apply our jq skills and write a script that gets a list of dependencies from package.json and greps for usages of every package.
阅读全文
摘要:jq Bash, unfortunately, doesn’t ship with a command that can work with JSON natively. In this lesson, we’ll learn how to read and do basic queries on
阅读全文
摘要:Shell Parameter Exapnsion In this lesson, we'll see how shell parameter expansions can be used to simply expand a variable's valuable and also provide
阅读全文