Skip to content

Instantly share code, notes, and snippets.

View aberonni's full-sized avatar

Domenico Gemoli aberonni

View GitHub Profile
@aberonni
aberonni / git-bisect.md
Created May 1, 2024 07:00
Performing a git bisect

git bisect is a really useful tool when you want to answer the question "when did this thing change?" but it's hard to understand from just looking at the git logs.

The way git bisect works is that you define a "good" and a "bad" commit. The git bisect command then uses a binary search to narrow down the commit that made the repository go from "good" to "bad".

You can further make your life easier by asking git bisect to execute a script for you on each commit, automating the search, and providing the commit in question with no further manual intervention.

Below is an example, with an example script, that illustrates how git-bisect was used on the 121-platform to find the answer to the question "when did typeorm start generating nonsense migrations?".

Setup

const makeRequest = async () => {
const data = await getJSON()
if (data.needsAnotherRequest) {
const moreData = await makeAnotherRequest(data)
console.log(moreData)
return moreData
} else {
console.log(data)
return data
}
@dfontana
dfontana / CmderZSH.md
Last active April 22, 2025 10:13
My setup guide for installing Cgywin, Mintty, Cmder, and ZSH.

What's this?

Instructions to obtain ZSH on a windows environment, without the input funny business presented by some other attempted solutions.

The final result is ZSH running on a mintty terminal, emulated by cygwin, and being handled by the popular cmder.

Why is this here?

For the benefit of myself and others. I've already followed these instructions twice. It took me hours to figure all this out, maybe someone else can save a few.

What exactly is covered?

  • Installing and setting up cmder