Skip to content

Instantly share code, notes, and snippets.

WEBVTT
00:00:00.500 --> 00:00:02.000
Sample caption from 00 to 02 seconds
00:00:02.500 --> 00:00:04.000
This one plays between 02.500 to 04.000
00:00:04.500 --> 00:00:10.000
This one is going to be a bit longer caption
service: alexa-home
provider:
name: aws
runtime: nodejs6.10
stage: ${opt:stage, self:custom.defaultStage}
profile: ${self:custom.profiles.${self:provider.stage}}
region: us-east-1
environment:
DYNAMODB_TABLE_EXPENSES: ${self:service}-expenses-${opt:stage, self:provider.stage}
'use strict';
const AWS = require('aws-sdk');
const Alexa = require("alexa-sdk");
const lambda = new AWS.Lambda();
const dynamoDb = new AWS.DynamoDB.DocumentClient();
const uuid = require('uuid');
exports.handler = function(event, context, callback) {
const alexa = Alexa.handler(event, context);
alexa.appId = "amzn1.ask.skill.XXXX";
{
"interactionModel": {
"languageModel": {
"invocationName": "my expenses",
"intents": [
{
"name": "AddExpense",
"slots": [
{
"name": "Amount",
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Launches a Jenkins server",
"Parameters": {
"InstanceType": {
"Description": "EC2 instance type",
"Type": "String",
"Default": "t2.small",
"AllowedValues": [
"t1.micro",
def sns_transcode_completed
amz_message_type = request.headers['x-amz-sns-message-type']
amz_sns_topic = request.headers['x-amz-sns-topic-arn']
if !amz_sns_topic.nil? &&
amz_sns_topic.to_s.downcase == Settings.aws.transcode.sns_topic_arn
request_body = JSON.parse(request.body.read, {:symbolize_names => true})
@randika
randika / swagger-type-variance.md
Created December 10, 2016 09:38 — forked from leedm777/swagger-type-variance.md
Type variance in Swagger models

This document describes how to extend Swagger data models to allow the types of fields to vary.

Given that Swagger models need to map cleanly to a statically typed object model, a subclassing approach seems like it would be a good fit.

Inheritance

Inheritance allows a model (the derived type) to inherit all of the

<html>
<head>
<!-- modal dialog error handling -->
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"
></script>
<script type='text/javascript' >
// Host App
var serviceEndpoint = "http://path/to/endpoint"; // Or this could be array => settings = { domain: "", assignmentId: "" }
<div id="player"></div>
...
<AssignmentPlayer
configServiceEndpoint = {this.serviceEndpoint}
/>
//React component
brew install nvm
source $(brew --prefix nvm)/nvm.sh
echo "source $(brew --prefix nvm)/nvm.sh" >> .zshrc
nvm install 4.2.1
node --version