openpgp4fpr:52A59FB334967177D8E425D5FDD468F7EF117819
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
repo="$1" | |
subpath="$2" | |
if [[ -z "${repo}" || -z "${subpath}" ]]; then | |
echo "usage: git-download-subpath <repo> <subpath> [destination]" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
FIRMWAREURL="https://raw.githubusercontent.com/raspberrypi/firmware/master/boot/" | |
DIR="$1" | |
[ ! -d "${DIR}" ] && { echo "First argument should be a directory that exists"; exit 1; } | |
for firmware in LICENCE.broadcom bootcode.bin fixup.dat start.elf; do | |
firmware_dest="${DIR}/${firmware}"; | |
if [ ! -f "${firmware_dest}" ]; then | |
echo "Downloading RPi firmware: ${firmware}"; | |
curl --silent --output "${firmware_dest}" "${FIRMWAREURL}${firmware}"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Place in your path and invoke with a deep southern accent: `git into staging` | |
mergeinto="$1" | |
if [[ $(git status -s) ]]; then | |
echo "Your working directory is not clean, please commit or stash first." | |
exit 1 | |
else | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
git fetch > /dev/null | |
git checkout "$mergeinto" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
/* | |
Some really shonky code that looks for looping moments within a set of frames from animated TV shows. | |
Find out more here: https://twitter.com/jphastings/status/1096915446702489600 | |
*/ | |
import ( | |
"fmt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
port = ARGV[0].downcase.split(//).reduce(0) do |sum, char| | |
sum * 10 + case char | |
when *%w[a b c] then 2 | |
when *%w[d e f] then 3 | |
when *%w[g h i] then 4 | |
when *%w[j k l] then 5 | |
when *%w[m n o] then 6 | |
when *%w[p q r s] then 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/go-gonic/gin" | |
) | |
var Routes struct { | |
Homepage func() string | |
CreateWidget func() string |
The following Manager Code™ will let you walk through your Jira Project board person by person, in a 'random order' (deterministic on a per-day basis) and show only their tickets.
It works in my Chrome browser; your mileage may vary… (forks of this gist very welcome!)
To use it:
- Copy the code below
- Create a new bookmark in Chrome
Github uses a CODEOWNERS
file in the root of a repo as a declaration of individuals or teams that should be notified if files are changed.
This is very useful when working on a project with a large number of contributors; but it can be a bit hard to make use of as a human.
This Sublime Text plugin adds a status bar hint to let you know who you might want to talk to about the file you're editing.
I hereby claim:
- I am jphastings on github.
- I am jphastings (https://keybase.io/jphastings) on keybase.
- I have a public key ASDEkcXgO-mkOUUYhp5pQXwbBdnaxvyz32b74GKEVd-PAQo
To claim this, I am signing this object:
NewerOlder