Skip to content

Instantly share code, notes, and snippets.

View crossfireprod's full-sized avatar

Zach Cross crossfireprod

View GitHub Profile
@crossfireprod
crossfireprod / main.ino
Created July 13, 2019 17:32
Manually Configuring Particle WiFi Credentials (WiFi.setCredentials)
/*
* Project: Manually Configuring Particle WiFi Credentials From Application Code
*
* Description: Particle WiFi credentials can be set from the application code using the "WiFi.setCredentials()" function.
* There are, however, some caveats to actually making this work, as detailed by: https://patrick.ble.si/particle-manual-wifi-creds
* Additionally, that solution clears and re-stores all credentials every time the device starts up, theoretically
* contributing to unnecessary flash wear on the WiFi module. Additionally, if there are cached WiFi credentials actively
* in use that are not present in the application code, the device will not be able to re-connect to WiFi after the new
* application code is flashed. So, this implementation first attempts to connect to WiFi using existing credentials, then
* falls back to attempting to store and use the new ones.
@crossfireprod
crossfireprod / coinmarketcapapiparse.php
Last active July 13, 2019 17:14
CoinMarketCap API Parse For Spreadsheet Use
<?php
/*
Simple wrapper for the OpenMarketCap API that extracts
a single parameter for a given currency. Intended for
use as an easy way to update off-line spreadsheet(s)
with current market data.
Example Use In LibreOffice Spreadsheet:
=WEBSERVICE("https://[InsertHostHere]/[InsertFilenameHere].php?symbol=BTC&param=price_usd")