Skip to content

Instantly share code, notes, and snippets.

@a7madgamal
a7madgamal / dark.md
Last active November 24, 2024 16:39
Dark mode for Slack on MacOS
@olih
olih / jq-cheetsheet.md
Last active April 15, 2025 17:19
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@smoya
smoya / how_to_move_files_between_repositories_preserving_history.md
Last active February 22, 2016 09:59
How to move files between repositories preserving history
  • Orig repo:
INITCOMMIT=$(git rev-list --parents HEAD | egrep "^[a-f0-9]{40}$")
  • Dest repo:
git format-patch --git-dir=/repo_orig/.git --stdout $INITCOMMIT..HEAD | git am
@smdabdoub
smdabdoub / merge_git_repo_as_subdir
Created June 9, 2015 14:02
Merge one git repository into another repository as a sub-directory
# based on the following:
# http://saintgimp.org/2013/01/22/merging-two-git-repositories-into-one-repository-without-losing-file-history/
# http://blog.caplin.com/2013/09/18/merging-two-git-repositories/
git clone repo_main
git clone repo_sub
cd repo_main
git remote add repo_sub ../repo_sub
git fetch repo_sub