Skip to content

Instantly share code, notes, and snippets.

View nikunjvaidya's full-sized avatar

Nikunj Vaidya nikunjvaidya

View GitHub Profile
@magnetikonline
magnetikonline / gittruncatehistory.sh
Last active February 27, 2020 22:29
Truncate Git history to after specific SHA1, dropping everything at and before it.
#!/bin/bash -e
# Inspired by: https://github.com/adrienthebo/git-tools/blob/master/git-truncate
if [[ (-z $1) || (-z $2) ]]; then
echo "Usage: $(basename "$0") DROP_AT_SHA1 BRANCH"
exit 1
fi
if [[ ! $1 =~ ^[0-9a-f]{7,40}$ ]]; then
echo "Error: invalid Git commit SHA1" >&2
@eerohele
eerohele / mosh-cygwin.md
Last active March 3, 2024 04:20
Compiling Mosh (http://mosh.mit.edu/) under Cygwin

NOTE: You don't need to compile Mosh on Cygwin yourself anymore; just install the package with Cygwin's setup.exe.

  1. Download Cygwin.

  2. Run setup.exe and install the following packages in addition to the default ones:

    • make
    • boost
    • libncurses-devel
    • pkg-config
  • perl