Skip to content

Instantly share code, notes, and snippets.

View stieg's full-sized avatar

Andrew Stiegmann stieg

View GitHub Profile
@stieg
stieg / variables.csv
Last active April 17, 2020 02:06
Uptime Robot Template Variables
Variable Description Example
*monitorID* The ID of the monitor 0011223344
*monitorURL* The URL of the monitor https://uptimerobot.com/dashboard.php#0011223344
*monitorFriendlyName* The friendly name of the monitor My Site Monitor
*alertType* Numeric value representing alert 1 -> down; 2 -> up; 3 -> SSL expiry notification
*alertTypeFriendlyName* Human readbable description of alert Down or Up
*alertDetails* Supplemental information about the alert The service on port 22 is not responsive
*alertDuration* Amount of time the alert was active for (in seconds) 42
*alertDateTime* Seconds since Unix epoch (Jan 1 1970 UTC) 5843285963
@stieg
stieg / Winston_3_Error_Printing.js
Last active October 29, 2019 14:41
Winston 3 setup with error stack printing.
const logform = require('logform');
const tripleBeam = require('triple-beam');
const winston = require('winston');
const errorHunter = logform.format(info => {
if (info.error) return info;
const splat = info[tripleBeam.SPLAT] || [];
info.error = splat.find(obj => obj instanceof Error);
@stieg
stieg / errorPrinter.js
Created September 12, 2018 23:20
Adds errors into our logging message
const errorPrinter = logform.format(info => {
if (!info.error) return info;
// Handle case where Error has no stack.
const errorMsg = info.error.stack || info.error.toString();
info.message += `\n${errorMsg}`;
return info;
});
@stieg
stieg / errorHunter.js
Last active September 12, 2018 23:18
Winston 3 Error Hunter Format
const errorHunter = logform.format(info => {
if (info.error) return info;
const splat = info[tripleBeam.SPLAT] || [];
info.error = splat.find(obj => obj instanceof Error);
return info;
});

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

### Keybase proof
I hereby claim:
* I am stieg on github.
* I am stieg (https://keybase.io/stieg) on keybase.
* I have a public key whose fingerprint is 2397 94BA C38A C92C 23DD 6C4F CC52 C03B 23D1 FAEE
To claim this, I am signing this object: