Skip to content

Instantly share code, notes, and snippets.

@jyaw
jyaw / nightscout-mlab-maintenance-backup-and-reduce-size.md
Last active April 25, 2019 11:24
Nightscout mLab Maintenance, Backup and Reduce

#Nightscout mLab Maintenance ###How to backup and reduce the size of your mLab sandbox

This gist documents the method I use to maintain the size of my MongoDB collections used with my Nightscout instance. I've noticed that I occasionally run out of space on my sandbox mLab account (the devicestatus collection is typically the culprit). This may be due to the use of multiple rigs at once... not sure exactly. If you have a sandbox mLab account you're capped at 496 MB, preallocated to contain the aggregate of storageSize and indexSize and some magical margin of MBs 😄. You can find those sizes on the mLab site under Stats. When my devicestatus collection gets too large, the smaller collections tend to keep functioning but the devicestatus quits updating. Currently, with heroku mLab, I don't get any notification that I'm running out of space, so I have to keep checking in on it.

These instructions were completed with a Windows 10 laptop. Much of it will be similar for other systems (including approach an

@jyaw
jyaw / raspberry-pi-3-openaps-setup.md
Last active May 1, 2019 20:13
Raspberry Pi 3 OpenAPS Setup

#How to Setup a Raspberry Pi 3 for OpenAPS

Much of the information here is derived from the hard work of others at the following sources:

These instructions detail how to configure the Raspberry Pi 3 for OpenAPS using a USB-serial cable. Most of these changes are unnecessary for the Raspberry Pi 2 models. Note that a Windows machine was used to interface with the Pi 3 in developing these instructions and use of a wireless things RF module (e.g. Slice of Radio) is assumed (requires UART access). I've attempted to keep the instructions generic enough so they can be applied to multiple platforms.

  1. 🍟 Write the latest Raspbian Jessie to your SD card as you would for the OpenAPS Raspberry Pi Setup in the latest [OpenAPS docs](https://openap