Skip to content

Instantly share code, notes, and snippets.

View angelogladding's full-sized avatar

Angelo Gladding angelogladding

View GitHub Profile
const SELECTOR = '#main'
const currentContainer = document.querySelector(SELECTOR)
const upgradeLinks = links => {
for (let i = 0; i < links.length; i++) {
links[i].addEventListener('click', event => {
event.preventDefault()
const url = this.href
const scroll = 0
history.replaceState({scroll: window.pageYOffset}, null, window.location.href)
import re
def autotag(match):
tag = match.groups()[0]
return f"<a href=https://jamesg.blog/tag/{tag}>{tag}</a>"
def autopersontag(match):
person = match.groups()[0]
import re
import mf
def summarize_github_profile(user):
name = mf.get(f"https://github.com/{user}").card["name"]
return f"GitHub profile for {name}"
url_summary_templates = [
(
r"https://github.com/(?P<user>\w+)/(?P<project>[\w-]+)/pulls/(?P<pull>\d+)",