Skip to content

Instantly share code, notes, and snippets.

View srathbone's full-sized avatar

Stephen Rathbone srathbone

  • East Midlands, UK
View GitHub Profile
@srathbone
srathbone / keybase.md
Created June 18, 2024 09:56
keybase.md

Keybase proof

I hereby claim:

  • I am srathbone on github.
  • I am krystalsrathbone (https://keybase.io/krystalsrathbone) on keybase.
  • I have a public key whose fingerprint is 20D2 B109 9586 B540 63EB 3157 51A6 DA4F 6DB6 54A8

To claim this, I am signing this object:

#!/bin/bash
main() {
local uptime
uptime="$(cat /proc/uptime)"
uptime="${uptime%%.*}"
local minutes
minutes="$(( uptime / 60 ))"
printf "%d:%d\n" "$(( minutes / 60 ))" "$(( minutes % 60 ))"
@srathbone
srathbone / theme.sh
Last active May 1, 2019 12:53
Bash theme
# Colours - 38;2;r;g;bm - true colour (48 for bg)
colour_end=$'\[\E[0m\]'
colour_green=$'\[\E[0;2;38;2;112;156;52m\]'
colour_bold_green=$'\[\E[0;1;38;2;112;156;52m\]'
colour_blue=$'\[\E[0;2;38;2;82;148;226m\]'
colour_bold_blue=$'\[\E[0;1;38;2;82;148;226m\]'
colour_bold_orange=$'\[\E[0;1;38;2;210;133;57m\]'
colour_bold_yellow=$'\[\E[0;1;38;2;170;143;57m\]'
colour_red=$'\[\E[0;2;38;2;170;75;57m\]'
colour_bold_red=$'\[\E[0;1;38;2;170;75;57m\]'
@srathbone
srathbone / slack-arc-theme.txt
Last active May 11, 2023 15:07
Slack desktop sidebar theme for matching Linux Arc Dark GTK theme.
#2F343F,#2C3849,#5294E2,#FFFFFF,#494D58,#FFFFFF,#94E864,#78AF8F
@srathbone
srathbone / pre-commit
Last active April 20, 2016 09:14
git hooks
#!/bin/sh
echo 'Running pre-commit hook'
echo
# create empty errors array
declare -a errors
# Check if we're on a semi-secret empty tree
rev=$(git rev-parse --verify HEAD)
# http://david-peter.de/parachuting-robots/
start: left
skipNext
goto start
goto lefttwo
lefttwo: left
left
goto lefttwo