Skip to content

Instantly share code, notes, and snippets.


Abdiel Aviles abdielou

View GitHub Profile
vgeshel / function.js
Last active Mar 6, 2021
AWS Lambda function for forwarding SNS notifications to Slack
View function.js
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = '';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
kdabir / iso_date.groovy
Last active Sep 27, 2020
current date in iso 8601 in groovy
View iso_date.groovy
new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC"))