Skip to content

Instantly share code, notes, and snippets.

View rpdelaney's full-sized avatar
🏠
Working nomad

Ryan Delaney rpdelaney

🏠
Working nomad
View GitHub Profile
@rpdelaney
rpdelaney / include.sh
Created December 20, 2017 21:18 — forked from aguy/include.sh
shell script trap functions
# Debugging tools. REMOVE THIS LATER. {{{1
set -o errexit # exit on errors
set -o nounset # exit on use of uninitialized variable
set -o errtrace # inherits trap on ERR in function and subshell
trap 'traperror $? $LINENO $BASH_LINENO "$BASH_COMMAND" $(printf "::%s" ${FUNCNAME[@]:-})' ERR
trap 'trapexit $? $LINENO' EXIT
trapexit() {
log "EXIT on line $2 (exit status $1)" "INFO "
@rpdelaney
rpdelaney / tiebreaker.md
Created October 26, 2020 00:57 — forked from Rapptz/tiebreaker.md
Median-Buchholz

How Median-Buchholz tie breaker works.

Assumptions:

  1. We are talking about 2 different players, P1 and P2.
  2. They each played 6 rounds.
  3. They each won 4 of them and lost two of them (i.e. they're tied).

After all 6 rounds, the opponents for P1 ended up with the following track record:

@rpdelaney
rpdelaney / updateRepos.py
Created August 10, 2021 20:02 — forked from eeeady/updateRepos.py
Update ALL THE REPOS
import yaml
import os
import requests
import tempfile
import subprocess
from github import Github
g = Github(os.environ["GITHUB_TOKEN"])
@rpdelaney
rpdelaney / README.md
Last active October 24, 2022 16:15 — forked from marceloalmeida/.gitattributes
How to show git diffs for gpg-encrypted files?

How to show diffs for gpg-encrypted files?

Git supports showing diffs for encrypted files, but has to be told to do so.

git config --global diff.gpg.textconv "gpg --no-tty --decrypt"
echo "*.gpg filter=gpg diff=gpg" >> .gitattributes
echo "*.asc filter=gpg diff=gpg" >> .gitattributes
@rpdelaney
rpdelaney / using-details-summary-github.md
Created April 5, 2023 16:43 — forked from scmx/using-details-summary-github.md
Using <details> <summary> expandable content on GitHub with Markdown #details #summary #markdown #gfm #html

How to use <details> <summary> expandable content on GitHub with Markdown

Firstly, what is <details> <summary>?

The HTML Details Element (<details>) creates a disclosure widget in which information is visible only when the widget is toggled into an "open" state. A summary or label can be provided using the <summary> element. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details.

Example