Skip to content

Instantly share code, notes, and snippets.

@morugu
morugu / server.py
Last active Dec 6, 2021 — forked from mdonkers/server.py
Simple Python 3 HTTP server for logging all GET and POST requests
View server.py
#!/usr/bin/env python3
"""
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
import logging
@morugu
morugu / snsToSlack.js
Created Nov 10, 2016 — forked from terranware/snsToSlack.js
AWS Lambda function to Slack Channel hookup
View snsToSlack.js
var https = require('https');
var util = require('util');
exports.handler = function(event, context) {
console.log(JSON.stringify(event, null, 2));
console.log('From SNS:', event.Records[0].Sns.Message);
var postData = {
"channel": "#aws-sns",
"username": "AWS SNS via Lamda :: DevQa Cloud",