The procedure below has been tested on a Digital Ocean VM with CentOS 7.4
# Install docker from RHEL’s standard repos
yum install -y docker
#
# We’ll activate the ‘user namespaces’ feature that defends against
| /** | |
| * ANY | |
| */ | |
| fun Any.toJson(): String = GsonInitializer.toJson(this) | |
| /** | |
| * VIEW | |
| */ | |
| fun View.toggleVisibility(setAsVisible: Boolean) = if (setAsVisible) this.visible() else this.gone() |
| # Welcome to Serverless! | |
| # | |
| # Happy Coding! | |
| service: cross-region-sns-subscriber | |
| # Keep environment specific configurations in separate files | |
| custom: ${file(config/${env:STAGE}.json)} | |
| provider: |
| # Export as Text Table | |
| aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --output table > ~/users.txt | |
| # Export as JSON | |
| aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --output json > ~/users.json | |
| # Export User Pool with more than 60 users (pagination) | |
| aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --pagination-token INCREDIBLYLONGSTRINGHERE --output json > ~/users-2.json |
| service: service-name | |
| provider: | |
| name: aws | |
| runtime: nodejs6.10 | |
| functions: | |
| myfunc: | |
| handler: handler.myfunc |
| /** | |
| * Will generate versionCode from versionName that follows Semantic Versioning | |
| */ | |
| ext { | |
| /** | |
| * Application version is located version variable. | |
| * And should follow next policy: | |
| * X1.X2.X3-type-flavor, where X - any digits and type is optional alphabetical suffix. | |
| * X1 - major version | |
| * X2 - minor version |
| #!/bin/sh | |
| echo "generating I18N.swift" | |
| touch tempI18N.swift | |
| echo "struct I18N {" >> tempI18N.swift | |
| inputfile=${SRCROOT}/Pomodoro/Resources/en.lproj/Localizable.strings | |
| while IFS= read -r line |
| # vim:ft=zsh ts=2 sw=2 sts=2 | |
| # | |
| # agnoster's Theme - https://gist.github.com/3712874 | |
| # A Powerline-inspired theme for ZSH | |
| # | |
| # # README | |
| # | |
| # In order for this theme to render correctly, you will need a | |
| # [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). | |
| # Make sure you have a recent version: the code points that Powerline |
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.