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 / 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 / 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"

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?