Skip to content

Instantly share code, notes, and snippets.

View kush-daga's full-sized avatar
🙂
Work Hard, Smile Harder, it gets you points!

Kush Daga kush-daga

🙂
Work Hard, Smile Harder, it gets you points!
View GitHub Profile
@amodm
amodm / wdp-20220129.md
Last active March 9, 2023 04:05
Response to the #WeekendDevPuzzle of 2022-01-29

On availability aspects of microservices

This post is in response to the WeekendDevPuzzle of 2022-01-29, which has submissions from people who chose to share their perspectives on the puzzle. I'll be linking this post to this Twitter thread, to avoid polluting the original one.

Motivation for today's topic

Unlike the usual peel the onion kind of topics, this one focuses more on how we think & our mental models of architectural decisions. But there's more.

Over the past 15 yrs, programming has become extremely accessible. While that's undoubtedly a good thing, it's become much easier to just rely on best practice, with or without context. Today's puzzle was designed to bring to the discussion table, that context, albeit in a super simplified fashion.

Dissecting the puzzle

Let's dissect the question, and bring out the core elements of it.

@izuolan
izuolan / worker.js
Last active July 6, 2023 15:15
Custom domain for your Craft.do pages. Demo: https://next-craft.vercel.app and Tutorial: https://zuolan.me/en/next_craft_en
// Your domain name
const MY_DOMAIN = 'note.example.com'
// Website language
const LANG = 'en'
// Favicon url
const FAVICON_URL = 'https://example.com/favicon.ico'
// Your config page link
@chrismccoy
chrismccoy / gitcheats.txt
Last active October 16, 2024 15:36
git cheats
# alias to edit commit messages without using rebase interactive
# example: git reword commithash message
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f"
# sort list of git repos with gh cli
gh repo list --limit 300 --json name -q '.[].name' | sort
# count total commits in a repo
git rev-list --all --count