Skip to content

Instantly share code, notes, and snippets.

View zacchiro's full-sized avatar

Stefano Zacchiroli zacchiro

View GitHub Profile
@atoponce
atoponce / examples.md
Last active November 5, 2023 17:08
Three password generators in ZSH

Each generator yields 128-bit security passwords. Each generator can take an optional numeric password to generate that many passwords. They should be placed in your ~/.zshrc. They are not portable across other shells.

gen-monkey-pass generates visually unambiguous random meaningless strings using Crockford's base32. Requires only ZSH:

% gen-monkey-pass 
9cws91tjck93f0xymjn33cjt7m

% gen-monkey-pass 3

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: