Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Nate Fonseka nfons

🏠
Working from home
View GitHub Profile
View config.h
/**
* 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
@nfons
nfons / sample.js
Last active Dec 31, 2019
test react comp
View sample.js
import React from 'react'
export default class MySampleComponent extends React.Component {
render() {
return <h1> Hello Nate, Welcome to {this.props.name}</h1>;
}
}
@nfons
nfons / addon.json
Created Oct 26, 2019
ring mqtt addon config
View addon.json
{
"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": ""
}
View Service-Yacht.yaml
apiVersion: v1
kind: Service
metadata:
name: helloweb
labels:
app: hello
spec:
selector:
app: hello
tier: web
View service.yaml
apiVersion: v1
kind: Service
metadata:
name: helloweb
labels:
app: hello
spec:
selector:
app: hello
tier: web
@nfons
nfons / orders.js
Last active May 21, 2018
orders.module.js
View orders.js
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["orders-orders-module"],{
/***/ "./src/app/orders/order-list/order-list.component.css":
/*!************************************************************!*\
!*** ./src/app/orders/order-list/order-list.component.css ***!
\************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = ""
View ugly.js
for(var o="myname",a=[1,2,3,4,5,6],e=0;e<6;e++)console.log(a[e]);
View minified.js
var index,longvariable="myname",longArray=[1,2,3,4,5,6] for(index=0;6>index;index++)console.log(longArray[index])
@nfons
nfons / basefily.js
Created Apr 12, 2018
before minify
View basefily.js
var longvariable = "myname"
var longArray = [1,2,3,4,5,6]
//some comment about functionality perhaps?
for(var index = 0; index < 6; index++){
console.log(longArray[index]);
}
View optimize.js
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 {
You can’t perform that action at this time.