Skip to content

Instantly share code, notes, and snippets.

View eritbh's full-sized avatar

Erin eritbh

View GitHub Profile
@vimkin
vimkin / Cleanup up local git branches.md
Created May 14, 2025 09:02
A guide for cleaning up stale local Git branches. This gist explains how to remove branches whose upstream remotes have been deleted, covering differences between git branch --merged and git branch -v based on the [gone] marker.

In case you are using a typical Git workflow, where merged branches are removed from the remote repository (e.g., GitHub, GitLab), you may find yourself with a lot of stale local branches that have no upstreams.

A common suggestion to clean up these local branches is to run:

git fetch --prune
git branch --merged | egrep -v 'master|dev|main|staging' | xargs git branch -d

This command works only if you use a merge (not rebase) strategy and it only deletes branches that have been merged into your current branch (for example, you are in main now).

@132ikl
132ikl / README.md
Last active July 28, 2022 09:54
Weenie Hut General Messaging Protocol

What is Weenie Hut General Messaging Protocol (WHGMP)?

WHGMP is a message protocol which uses 2 Discord bots and 9 channels.

(pssst... click here to see a more detailed project, with the main bot in addition to the messaging protocol)

How does it work?

WHGMP uses the read/unread badge* in a channel to represent a bit (unread = 1, read = 0). By using 8 channels, one byte can be stored.

The sender waits for a message from the user, then begins to send messages to the data channels. After storing a single byte, a message is sent to the "clock" channel, letting the receiver know to check the read/unread status. Based off of that, a single byte is constructed. When a null-byte is received, the resulting string is printed.