Skip to content

Instantly share code, notes, and snippets.

View dshack's full-sized avatar

David Shackelford dshack

View GitHub Profile
@dshack
dshack / logsit.js
Last active August 29, 2015 14:12 — forked from ejain/logsit.js
Logsit importer for Zenobase
var csv = require("ya-csv");
var moment = require("moment-timezone");
// set up the csv reader
var reader = csv.createCsvStreamReader(process.openStdin(), {});
// our data will be added to this list
var events = [];
// handle each row in the spreadsheet
@dshack
dshack / gist:2446ffdf9eb5a17f6c21
Last active August 29, 2015 14:01
PagerDuty webhook to dashing alert
--[[ PagerDuty sends a specific webhook format, and we need to translate it into an API call to Dashing.
You can paste this lua script into http://webscript.io to do the translation easily. You might be able to use Zapier to
do the same thing.
]]--
-- Get the incident ID, user, and trigger type from the PagerDuty webhook
local incidentid = json.parse(request.body).messages[1].data.incident.id
local user = json.parse(request.body).messages[1].data.incident.assigned_to_user.name
local desc = json.parse(request.body).messages[1].data.incident.trigger_summary_data.description