Skip to content

Instantly share code, notes, and snippets.

view : Model -> Html msg
view model =
renderItemsWithDefault renderList emptyState model.strings
renderList : List String -> Html msg
renderList strings =
ul [] <| List.map (\s -> li [] [ text s ] ) strings
emptyState : Html msg
emptyState =

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.
@joshhornby
joshhornby / controllers.application.js
Last active May 29, 2017 09:12
Global query params
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Component.extend({
});
@joshhornby
joshhornby / App.elm
Last active October 17, 2023 08:56
JSON decoding over ports in Elm.
port module App exposing (..)
import Html exposing (..)
import Json.Decode.Pipeline exposing (..)
import Json.Decode exposing (..)
port workerUpdated : (Json.Decode.Value -> msg) -> Sub msg
import Ember from 'ember';
export default Ember.Component.extend({
});
@joshhornby
joshhornby / create-controller.js
Created May 7, 2015 20:58
Ember Modal - Multiple models
import Ember from 'ember';
export default Ember.Controller.extend({
isValid: Ember.computed(
'model.name',
function() {
return !Ember.isEmpty(this.get('model.name'));
}),