Skip to content

Instantly share code, notes, and snippets.

View nfons's full-sized avatar
🏠
Working from home

Nate Fonseka nfons

🏠
Working from home
View GitHub Profile
@nfons
nfons / addon.json
Created October 26, 2019 04:17
ring mqtt addon config
{
"host": "[[YOUR HA LOCAL IP FROM ROUTER]]",
"port": 1883,
"ring_topic": "ring",
"hass_topic": "hass/status",
"mqtt_user": "[[MQTT USER FROM HA]]",
"mqtt_pass": "[[MQTT USER PW]]",
"ring_user": "",
"ring_pass": ""
}
@nfons
nfons / sample.js
Last active December 31, 2019 18:26
test react comp
import React from 'react'
export default class MySampleComponent extends React.Component {
render() {
return <h1> Hello Nate, Welcome to {this.props.name}</h1>;
}
}
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
var syncDep;
function getLottery() {
return new Promise((resolve, reject) =>{
if (syncDep === undefined) { //check of we already have this data...if not THEN go get
setTimeout(function() {
syncDep = [1,22,34,56,5];
resolve(syncDep);
}, 2000);
} else {