Skip to content

Instantly share code, notes, and snippets.

View Morrisai's full-sized avatar

Aaron Morris Morrisai

  • Toronto, Ontario
View GitHub Profile
@Morrisai
Morrisai / lambda-basic-auth.js
Created March 7, 2018 19:53 — forked from lmakarov/lambda-basic-auth.js
Basic HTTP Authentication for CloudFront with Lambda@Edge
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';
@Morrisai
Morrisai / giratchive.sh
Created December 1, 2015 21:53 — forked from markrickert/giratchive.sh
Git Archive Bash Script
#!/bin/bash
# Takes one parameter: a remote git repository URL.
#
# This is the stuff this script does:
#
# 1. Clones the repository
# 2. Fetches all remote branches
# 3. Compresses the folder
# 4. Deletes the cloned folder.