This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus feugiat eros ac mi lobortis, eu dignissim leo sagittis. Quisque et convallis elit. Ut ac lorem massa. Aliquam tempor molestie eros vitae lobortis. Nullam dignissim orci et urna cursus, quis placerat mauris facilisis. Praesent scelerisque ligula est, eu venenatis orci vehicula nec. Cras ut nisl condimentum, cursus diam id, mattis elit. Pellentesque vitae neque sit amet tellus vestibulum egestas. Morbi a magna gravida, tincidunt elit non, egestas augue. Suspendisse tincidunt a orci vel bibendum. Cras consequat metus in erat venenatis consequat. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam consequat ex nec laoreet sodales. Nullam porta metus sed rutrum vestibulum. | |
Sed ac orci a est bibendum vehicula. Aliquam eu egestas leo. Vestibulum tempus, neque at lacinia molestie, erat velit scelerisque ipsum, ut tincidunt turpis tellus sed lacus. In rhoncus, ligula in interdum tincidunt, nulla turpis scelerisq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; | |
import App from "./components/app"; | |
import Home from "./components/home"; | |
ReactDOM.render( | |
<Router> | |
<Switch> | |
<Route path="/home" component={Home} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Experiment from './experiment'; | |
const ExperimentUsage = () => ( | |
<Experiment | |
isInTestGroup={false} | |
renderA={() => ( | |
<p>Output of renderA()!</p> | |
)} | |
renderB={() => ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PropTypes from 'prop-types'; | |
const Experiment = ({ isInTestGroup, renderA, renderB }) => { | |
if (isInTestGroup) { | |
return renderB(); | |
} | |
return renderA(); | |
}; | |
Experiment.propTypes = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function HelloWorld(props) { | |
return <div>Hello {props.name}!</div>; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from troposphere import Ref, Template | |
import troposphere.ec2 as ec2 | |
t = Template() | |
instance = ec2.Instance("myinstance") | |
instance.ImageId = "ami-951945d0" | |
instance.InstanceType = "t1.micro" | |
t.add_resource(instance) | |
print(t.to_json()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation AMI Look Up Sample Template: Demonstrates how to dynamically specify an AMI ID. This template provisions an EC2 instance with an AMI ID that is based on the instance's type and region. **WARNING** This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters": { | |
"InstanceType" : { | |
"Description" : "EC2 instance type", | |
"Type" : "String", | |
"Default" : "t2.micro", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A sample Lambda function that looks up the latest AMI ID for a given region and architecture. | |
**/ | |
// Map instance architectures to an AMI name pattern | |
var archToAMINamePattern = { | |
"PV64": "amzn-ami-pv*.x86_64-ebs", | |
"HVM64": "amzn-ami-hvm*.x86_64-gp2", | |
"HVMG2": "amzn-ami-graphics-hvm-*x86_64-ebs*" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"logs:CreateLogGroup", | |
"logs:CreateLogStream", | |
"logs:PutLogEvents" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fromAddress = "[email protected]"; // TODO: Change this to your desired from address | |
var aws = require('aws-sdk'); | |
var ses = new aws.SES({ apiVersion: '2010-12-01' }); | |
exports.handler = function (event, context) { | |
// Validate the incoming event | |
if (!event.Records | |
|| event.Records.length == 0 | |
|| !event.Records[0].Sns |
NewerOlder