Skip to content

Instantly share code, notes, and snippets.

View quanKM's full-sized avatar
🦄
Stay Hungry Stay Foolish

Quan Khong quanKM

🦄
Stay Hungry Stay Foolish
View GitHub Profile
@quanKM
quanKM / setting.json
Created October 27, 2025 14:25
Cursor setting
{
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.suggest.insertMode": "replace",
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
openapi: 3.0.0
info:
title: Login API
version: 1.0.0
description: API for user login
paths:
/v1/login:
post:
summary: User login
@quanKM
quanKM / maci-v1-2-0-trusted-setup-ceremony_attestation.log
Created March 4, 2024 10:54
Attestation for MACI V1.2.0 Trusted Setup Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm quanKM-38641481 and I have contributed to the MACI V1.2.0 Trusted Setup Ceremony.
The following are my contribution signatures:
Circuit # 1 (maci-processmessages_6-9-2-3)
Contributor # 43
Contribution Hash: 7a0c233a a3ae0a30 436e22ec 1b5906fb
4e13f518 bef84ffc 6de488eb c6f7d0a5
08fe1d50 4125d703 3a273433 bc6d4694
248d7c7e 40d581ed bea09981 4e19bde3
@quanKM
quanKM / pagination.ts
Created January 31, 2024 12:57 — forked from gynekolog/pagination.ts
Pagination generator
// The code is based on https://gist.github.com/kottenator/9d936eb3e4e3c3e02598#gistcomment-3238804
type PageItem = number | "...";
export const getRange = (start: number, end: number): PageItem[] => {
if (end < start) throw Error(`End number must be higher then start number: start ${start}, end ${start}`);
const rangeLength = end - start + 1;
return Array(rangeLength)
.fill(0)
@quanKM
quanKM / zkp2p-trusted-setup-ceremony-v2_attestation.log
Created January 12, 2024 01:14
Attestation for ZKP2P Trusted Setup Ceremony V2 MPC Phase 2 Trusted Setup ceremony
Hey, I'm quanKM-38641481 and I have contributed to the ZKP2P Trusted Setup Ceremony V2.
The following are my contribution signatures:
Circuit # 1 (zkp2p-hdfc-send)
Contributor # 24
Contribution Hash: 359e280f c104fc09 690a74e7 e8bb6031
9cccd52b f551a8cf 176f007c b525ffcc
d4c89dd6 50acd187 76d785b5 02fd3f2b
718cff40 50698fe7 8f761119 fdba0e8b
@quanKM
quanKM / multiple_ssh_setting.md
Created June 7, 2023 02:52 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@quanKM
quanKM / init.md
Created November 9, 2021 15:17
Init view height
useEffect(() => {
  // First we get the viewport height and we multiple it by 1% to get a value for a vh unit
  const vh = window.innerHeight * 0.01
  // Then we set the value in the --vh custom property to the root of the document
  document.documentElement.style.setProperty('--vh', `${vh}px`)

  window.addEventListener('resize', () => {
    // We execute the same script as before
 const vh = window.innerHeight * 0.01
import { FC, useEffect } from "react";
import { useHistory } from "react-router";
const ScrollToTop: FC = () => {
const history = useHistory();
useEffect(() => {
const unlisten = history.listen(() => {
window.scrollTo(0, 0);
});

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?