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
let getCommentURL = (user) => { | |
let comments = document.querySelectorAll(".athing.comtr"); | |
let selected = [...comments].filter(node => node.querySelector("a.hnuser").text == user); | |
if (selected.length) { | |
return `https://news.ycombinator.com/item?id=${selected[0].id}`; | |
} else { | |
return undefined; | |
} | |
} |
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 | |
LOCATION=$(curl -s https://api.github.com/repos/keepassxreboot/keepassxc/releases/latest \ | |
| jq -r '.assets[] | select(.name | endswith("x86_64.dmg")) | .browser_download_url') | |
curl -s -L -O "$LOCATION" | |
curl -s -L -O "$LOCATION.DIGEST" | |
DIGEST=`ls *.DIGEST` | |
shasum -a 256 -c "$DIGEST" |
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
FROM python:3.9-slim | |
LABEL maintainer="YOUR_NAME_HERE <YOUR_EMAIL_HERE>" | |
# Run as non-root user | |
RUN useradd -ms /bin/bash appuser | |
USER appuser | |
# Upgrade pip | |
RUN pip install --upgrade pip |