Skip to content

Instantly share code, notes, and snippets.

View mcgarrah's full-sized avatar

Michael McGarrah mcgarrah

  • Raleigh, NC, US
View GitHub Profile
@JoeyG1973
JoeyG1973 / aws_saml.py
Last active September 9, 2023 10:15
aws saml login with session that auto refreshes.
# Took this:
# https://s3.amazonaws.com/awsiammedia/public/sample/SAMLAPICLIADFS/samlapi_formauth_adfs3.py
# converted to boto3 and smooshed it together with this:
# https://gist.github.com/kapilt/ac8e222081f63ba64e93
# which gave birth too this:
import sys
import botocore
import boto3
import requests
@atuttle
atuttle / _readme.md
Last active October 1, 2018 12:34
Push Packt Free Book of the Day alert into your slack channel

Push alerts about the daily 🆓 Packt eBook into Slack

Install this globally. Yes, globally.

$ npm install -g scrape-html

Now create a local project somewhere:

@katemonkeys
katemonkeys / gist:e17580777b57915f5068
Last active February 20, 2024 15:36
Everything Wrong With The Withings API

Top Six Things You Need To Know About The Withings API*

*where “you” is probably a developer, or at least a strange user

I should preface this by saying that I got a Withings Smart Body Analyzer for Christmas last year and I’ve been generally happy with it. It purports to be able to take my heart rate through my bare feet and that seems not to work for my physiology, but overall I’m a fan. If if their Wikipedia page is to be believed they are having a pretty rad impact on making the Quantified Self movement more for normal people and they only have 20 full time employees. Also they try hard to use SI units, which I can get behind. Anyway, on to the rant.

I originally called this post “Everything wrong with the Withings API” and I meant it. For every useful field I can extract from their “award winning” app, I have spent an hour screaming at the inconsistencies in their implementation or inexplicable holes in their data