Skip to content

Instantly share code, notes, and snippets.

View PopeFelix's full-sized avatar

Aurelia Peters PopeFelix

View GitHub Profile
@PopeFelix
PopeFelix / github-webhook-listener.js
Created February 21, 2020 18:00
Github webhook listener using Node.js and Express.
const express = require('express')
const app = express()
const port = 80
const bodyParser = require('body-parser')
const crypto = require('crypto')
const secret = process.env.WEBHOOK_SECRET
app.use(
bodyParser.urlencoded({
extended: true
})
@PopeFelix
PopeFelix / deploy-lamba.sh
Created August 7, 2019 17:52
Shell script to deploy a Lambda function
#!/usr/bin/env bash
deploy-lambda $1
# A little shell script I worked up to deploy Lambda functions from my local dev box
function deploy-lambda {
basedir=$HOME/work
dir=$1
role=${LAMBDA_ROLE:-arn:aws:iam::123456789012:role/default-role-goes-here}
runtime=${LAMBDA_RUNTIME:-provided}