Skip to content

Instantly share code, notes, and snippets.

View nerd190's full-sized avatar
🤓
coding to music 🎵

Scott nerd190

🤓
coding to music 🎵
  • London
View GitHub Profile
@nerd190
nerd190 / install-dotfiles.zsh
Created May 1, 2022 10:34
install my dotfiles
#!/bin/env sh
url='git@github.com:nerd190/dots.git'
if [[ ! -d $HOME/dots ]]; then
if git clone $url $TMPDIR/dots --separate-git-dir=~/dots >/dev/null 2>&1; then
if rsync --recursive --verbose --exclude '.git' $TMPDIR/dots $HOME/; then
printf 'SUCCESS'
else
printf 'ERROR'
@nerd190
nerd190 / ahead-forks.js
Created September 18, 2021 20:09
show forks that are ahead, save this bookmarklet on PC, if using Android, paste directly into address bar (Chrome-based browsers) on the page that lists forks. Source: https://stackoverflow.com/questions/54868988/how-to-determine-which-forks-on-github-are-ahead
javascript:(async () => { /* while on the forks page, collect all the hrefs and pop off the first one (original repo) */ const aTags = [...document.querySelectorAll('div.repo a:last-of-type')].slice(1); for (const aTag of aTags) { /* fetch the forked repo as html, search for the "This branch is [n commits ahead,] [m commits behind]", print it directly onto the web page */ await fetch(aTag.href) .then(x => x.text()) .then(html => aTag.outerHTML += `${html.match(/This branch is.*/).pop().replace('This branch is', '').replace(/([0-9]+ commits? ahead)/, '<font color="#0c0">$1</font>').replace(/([0-9]+ commits? behind)/, '<font color="red">$1</font>')}` + " <a " + `${html.match(/href="[^"]*\.zip">/).pop() + "Download ZIP</a>"}`) .catch(console.error); } })();
@nerd190
nerd190 / NOTE
Last active November 7, 2023 18:15
Setup SSH and GPG.
private gpg signing key > github
public gpg authorisation key > ssh and github?
break into individual?