Skip to content

Instantly share code, notes, and snippets.

Efrén chefren

Block or report user

Report or block chefren

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.
chefren / GPSExif.swift
Created Oct 11, 2017 — forked from nitrag/GPSExif.swift
Generate Metadata Exif for GPS
View GPSExif.swift
// Generate EXIF GPS metadata
// Swift 3
// Exif Version supports decimal degrees
import Foundation
import CoreLocation
import ImageIO
extension CLLocation {
chefren / pre-commit
Last active Nov 23, 2018 — forked from jeekl/gist:5083519
git pre-commit hook to validate json objects so you don't commit broken json.
View pre-commit
#!/usr/bin/env bash
# Runs all .json files through pythons json lint tool before commiting,
# to make sure that you don't commit broken json objects.
git_dir=$(git rev-parse --show-toplevel)
for file in $(git diff-index --name-only --diff-filter=ACM --cached HEAD -- \
| grep -P '\.(json)$'); do
python -mjson.tool $file 2> /dev/null
if [ $? -ne 0 ] ; then
You can’t perform that action at this time.