Skip to content

Instantly share code, notes, and snippets.

View ayltai's full-sized avatar

Alan Tai ayltai

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.
@baconpat
baconpat / RecycleViewMatcher.java
Created March 30, 2016 01:13
RecycleViewMatcher (updated for scrolling)
package com.foo.RecyclerViewMatcher;
import android.content.res.Resources;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
@guycalledseven
guycalledseven / osx_yosemite_disable_features.sh
Last active August 16, 2021 01:57
Disabling OSX Yosemite annoyances / features I have no use of
# Tested on OSX Yosemite 10.10.4
# there is also an updated version (work in progress) for El Capitan here https://gist.github.com/guycalledseven/31ffe35eca056838b06b
# XXX TODO
# should I disable com.google.Keystone.Agent ??
# http://applehelpwriter.com/2014/07/13/how-to-remove-googles-secret-update-software-from-your-mac/
# Stop DS_Store file creation on network connections
# restart Finder afterwards
@steve-jansen
steve-jansen / README.md
Last active February 23, 2024 22:38
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 27, 2024 06:33
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx