Skip to content

Instantly share code, notes, and snippets.

jonblack /
Created February 7, 2024 08:30
Garmin HRV/sleep Plot

Garmin Connect only supports showing a maximum 4-week plot of HRV data. This script scrapes HRV and sleep data and plots it on a single graph, making it much easier to see the trend over time.

In order for the script to work, you need to provide the correct values for the Authorization and Cookie headers. To get these:

  • Log in to Garmin Connect and navigate to the HRV status report
  • Open the browser developer tools and select the network tab
  • In the HRV status report, click to a previous period. This will cause a network request to update the report
  • In the developer tools, click on the network request and look for the request header.
jonblack / file.rb
Last active November 15, 2019 21:59
### Keybase proof
I hereby claim:
* I am jonblack on github.
* I am jonblack ( on keybase.
* I have a public key ASA7Np1e3MTaf6MrhICPXGWH3Qq3Jz8Ugq12SHiqeUHTDwo
To claim this, I am signing this object:
jonblack / components.dialog-step-one.js
Last active April 19, 2017 18:31
Bulma Liquid Tether
import Ember from 'ember';
export default Ember.Component.extend({
jonblack / components.dialog-step-one.js
Last active November 14, 2017 19:20
Elsewhere Liquid Dialog Steps
import Ember from 'ember';
export default Ember.Component.extend({
jonblack /
Created March 9, 2017 08:34
Test core dump creation
/usr/bin/g++ -x c++ - -o crash -g <<SOURCE
int main(int argc, const char **argv)
int *p = 0;
int r = *p + 1;
return 0;
jonblack /
Created January 21, 2016 15:30
Parse XML using xml-rs
extern crate xml;
use std::fs::File;
use std::io::BufReader;
use xml::reader::{EventReader, XmlEvent};
struct Book {
title: String,
author: String,
jonblack /
Created May 22, 2014 16:09
Convert inline links to reference links in markdown
import os
import re
import sys
RE_MD_INLINE_LINK = re.compile(' \[(?P<name>[\w -_]*)\]\((?P<link>[\w \-/\.:]*)\)')
if __name__ == "__main__":
src_path = sys.argv[1]
jonblack /
Created May 15, 2014 08:28
Useful shell commands for manipulating source code
# Remove trailing whitespace from all files with a given extension
find . -name "*.h" | xargs sed -i 's/[ \t]*$//'
# Convert tabs to spaces in all files with a given extension
find . -name "*.h" | xargs sed -i 's/\t/ /g'
jonblack /
Last active August 29, 2015 14:01
Outputs the names and levels of all configured loggers
import logging
_log = logging.getLogger(__name__)
for logger_name in logging.Logger.manager.loggerDict.keys():
print logger_name, logging.getLevelName(logging.getLogger(logger_name).level)