Skip to content

Instantly share code, notes, and snippets.

@ongbt
ongbt / Cloudflare on Colima solution (use this first)
Last active January 2, 2025 03:12
Cloudflare ceriificate issues
mkdir -p ~/.docker/certs.d && curl -L -o ~/.docker/certs.d/Cloudflare_CA.pem https://developers.cloudflare.com/cloudflare-one/static/Cloudflare_CA.pem
colima restart
To avoid having to enter passphrase for every git actions, e.g.:
> git push
Enter passphrase for key '/Users/ongbt/.ssh/id_ed25519':
Run: ssh-add --apple-use-keychain ~/.ssh/id_ed25519, e.g.:
> ssh-add --apple-use-keychain ~/.ssh/id_ed25519
Enter passphrase for /Users/johndoe/.ssh/id_ed25519: xxxxxxx
Identity added: /Users/johndoe/.ssh/id_ed25519 (johndoe@xxx.com)
#!/bin/bash
# Create a github repo and push to it
# Prequsite:
# - install gh: brew install gh
# - Authenticate with Github: gh auth login
# - Commit the codes first
# Check if an argument is provided
if [ $# -eq 0 ]; then
@ongbt
ongbt / NX + PNPM
Last active September 6, 2024 05:18
npx create-nx-workspace learn-openapi --preset=empty --workspaceType=integrated --packageManager=pnpm --nxCloud=skip
- npx create-nx-workspace <project-name>
- https://nx.dev/nx-api/nx/documents/create-nx-workspace
Install plugins
pnpm add <plugin> --save-dev
- pnpm add @nx/nest --save-dev
- pnpm add @nx/react --save-dev
The one in the guide (https://guide.signify.gov.sg/user-guides/api-guide/api-v2) is wrong format.
It should be like this:
curl -X POST "https://app.signify.gov.sg/public/v2/documents" \
-H 'Authorization: Bearer xxxxxxx=' \
-H 'Content-Type: multipart/form-data' \
-F 'documentName="Document 1"' \
-F 'file=@test.pdf' \
-F 'documentMode="link"' \
@ongbt
ongbt / Brew, Code
Last active December 31, 2024 13:50
MacOS Setup
brew list > brew.txt
code --list-extensions > vscode-extensions.txt
xargs brew install < brew.txt
cat vscode-extensions.txt | xargs -L1 code --install-extension