Skip to content

Instantly share code, notes, and snippets.

View ChrisHeerschap's full-sized avatar

Chris Heerschap ChrisHeerschap

View GitHub Profile
Requirements:
============
I'm not even sure all the requirements, I might miss some of them.
* GNU date from Homebrew
* curl and xmllint - might be part of base MacOS install, or might be XCode. Dunno.
Put both scripts in the same directory - I use the "bin" subdir under my homedir. Call the "zwift" script.
Ride On!
@ChrisHeerschap
ChrisHeerschap / keybase.md
Created September 5, 2018 18:30
keybase.md

Keybase proof

I hereby claim:

  • I am chrisheerschap on github.
  • I am chrisheerschap (https://keybase.io/chrisheerschap) on keybase.
  • I have a public key ASDtbLc1QWDcquxkToZmaau5pfDpP4dMPpw6Ubufhh9eeAo

To claim this, I am signing this object:

@ChrisHeerschap
ChrisHeerschap / check-backups
Last active April 26, 2016 12:03
fuckin' waaaaah...
#!/bin/bash
# Debugging
exec 2> /mnt/sto/tmp/debug-check-backups
set -x
# Check timemachine backups
# Vars
TMDIR=/mnt/sto/backup/timemachine
@ChrisHeerschap
ChrisHeerschap / gist:97f92474666b842b70d8
Created March 19, 2015 19:53
How to set prompt based on your current directory
PROMPT_COMMAND=$'
# Check if I have "/tmp/" in my current directory
if [[ $PWD == */tmp/* ]]
then
# Strip everything up to *tmp/
env=${PWD##*tmp/}
# Drop everything after the next /
env=${env%%/*}
# Set the PS1 with that env in the prompt, color coded
PS1=\'\[\e[33;44m\] * ${env} * \[\e[m\] [\u@\h] \W\\$ \'