Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jwhazel's full-sized avatar

Jesse Hazel jwhazel

View GitHub Profile
@jwhazel
jwhazel / inspindel-mac.md
Last active May 31, 2022 19:51
Step by step instructions for flashing iSpindel on a Mac

Step by step instructions to flash iSpindel on a Mac 🍎⚡🧪

I compiled this list after quite a while of flipping back and forth between opensourcedistilling.com/ispindel.de/reddit/homebrewtalk/youtube trying to piece together what exactly was needed to make this work on MacOS. Follow the steps below and you'll have a flashed iSpindel.

Quick Notes

  • Charging is done via USB-A > USB-C cable. This will not charge via USB-C > USB-C. You'll know it's charging when you see a solid red light. Fully charged = solid blue light.
  • This process may not work on the new M1 macs.

Flashing procedure

Open a new terminal window and enter each of these commands one at a time:

  • mkdir ispindel
@jwhazel
jwhazel / index.js
Created October 16, 2019 02:03
KY utility outages scraper
/**
* In-browser scraper for KY utility outages
* 1.) Goto: https://psc.ky.gov/ors/PublicInfo_OutageIncidents.aspx
* 2.) Type: all, Other: other, From: 01/01/1999, To: today
* 3.) Copy this code into console and run
* 4.) Copy output into something like http://www.convertcsv.com/json-to-csv.htm
*/
(function() {
let output = [];
{
"version": 8,
"name": "Custom Style",
"metadata": {
"mapbox:sdk-support": {
"js": "latest",
"android": "latest",
"ios": "latest"
}
},
@jwhazel
jwhazel / gist:ddfed7bceb3af75d8ce7c348dddaee6f
Created November 30, 2016 16:01
PHP function for converting web mercator (X,Y coords) to WGS84
//Convert Web Mercator to WGS84
function toGeographic($X, $Y){
if (abs($X) < 180 && abs($Y) < 90){
return array('lat'=>0,'lng'=>0);
}
if (abs($X) > 20037508.3427892 || abs($Y) > 20037508.3427892){
return array('lat'=>0,'lng'=>0);
}