Skip to content

Instantly share code, notes, and snippets.

@paulstuart
paulstuart / gitcheatsheet.md
Created April 25, 2024 15:03 — forked from dhei/gitcheatsheet.md
Git cheetsheet
undo git merge
git reset --hard HEAD~1
delete a tag in remote
git tag -d mytag
git push origin :refs/tags/mytag
Remove local branches no longer on remote
@paulstuart
paulstuart / flatten.sh
Created June 25, 2019 19:18
A script to "flatten" and "unflatten" JSON structures
#!/bin/bash
# Convert json data to a dotted notation for line-based manipulation and visualization
#
# Adapted from dialog here: https://news.ycombinator.com/item?id=20245913
# jq code by @jolmg
#
flat() {
jq -r '