Skip to content

Instantly share code, notes, and snippets.

View bw-matthew's full-sized avatar

Matthew Franglen bw-matthew

View GitHub Profile
@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 = [email protected]: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:

@spmason
spmason / pr
Last active July 15, 2022 10:54
GitHub "open PR" script. Add somewhere in your path, then opening a PR is as easy as typing `pr` on the branch you want to open a PR for
#!/usr/bin/env bash
# GitHub "Open Pull Request" script
#
# Add somewhere in your path, then opening a PR is as easy as typing `pr` while you're
# on the branch you want to open a Pull Request for
#
# NOTES:
# - Uses the `hub` tool: https://cli.github.com/
# - Assumes that the upstream repository is called 'origin' and your fork is named after your github username
@staltz
staltz / introrx.md
Last active November 14, 2024 11:27
The introduction to Reactive Programming you've been missing
@xsot
xsot / instructions.md
Last active March 3, 2024 13:42
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)