Skip to content

Instantly share code, notes, and snippets.

View aaronshaf's full-sized avatar

Aaron Shafovaloff aaronshaf

View GitHub Profile

🔐 DatPubkeyFile

An API for libsodium pubkey crypto operations in the Beaker/Dat ecosystem. Includes mechanisms to:

  • Sign
  • Verify signatures
  • Encrypt blobs
  • Decrypt blobs
  • Validate pubkey ownership
@aaronshaf
aaronshaf / JavaScript.md
Last active April 11, 2022 18:01
All Things JavaScript
@nikreiman
nikreiman / gist:5458386
Last active July 16, 2020 17:50
A quick script to clean up Gerrit branches. I tend to have 1 branch per commit for Gerrit reviews, which means that after some time there are a ton of stale branches sitting around. This script examines all your branches, looking for ones which have a change-id that also exists in the current branch. If it has found such a commit, it prompts you…
function git-branch-current() {
printf "%s\n" $(git branch 2> /dev/null | grep -e ^* | tr -d "\* ")
}
function git-branch-cleanup() {
local currentBranch=$(git-branch-current)
local otherBranch=
for otherBranch in $(git branch | grep -v $currentBranch) ; do
printf "Branch %s:\n" "$otherBranch"
printf " HEAD commit is: %s\n" "$(git log --oneline -n 1 $otherBranch)"