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
<form method="POST" action="http://localhost:2222/rest/download/png" onSubmit="getSvg(this)"> | |
<input type="hidden" value="" name="data" type="text" /> | |
<button type="submit">GO</button> | |
</form> | |
<div class="svg-wrapper"> | |
<svg height="140" width="500"> | |
<ellipse cx="200" cy="80" rx="100" ry="50" style="fill:yellow;stroke:purple;stroke-width:2" /> | |
</svg> | |
</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
import { CALL_API } from 'api'; | |
import * as type from './types'; | |
const USERS_URL = '/users'; | |
export const getUsers = () => { | |
return { | |
[CALL_API]: { | |
url: USERS_URL, | |
authenticated: true, |
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 https = require('https'); | |
var util = require('util'); | |
var CHANNEL = "#aws-sns"; | |
var PATH = "/services/your-slack-webhook-url-info-goes-here"; | |
exports.handler = function(event, context) { | |
console.log(JSON.stringify(event, null, 2)); | |
console.log('From SNS:', event.Records[0].Sns.Message); |
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 aws = require('aws-sdk'), | |
https = require('https'), | |
zlib = require('zlib'), | |
util = require('util'); | |
// If you've used KMS to encrypt your slack, insert your CiphertextBlob here | |
var ENCRYPTED_URL = 'AQEC1423...'; | |
// IF NOT, you can take the risk to insert your Slack URL here | |
// e.g. '/services/QWERTY/ASDFGHJ/zxYTinNLK'; |
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
sudo apt-get install xdotool | |
sudo apt-get install iceweasel |
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
/* | |
Getting Google Analytics ID from environment variable GA_ID | |
This should be set on the form UA-8401XXXX-X and can be set by: | |
1) in package.json under "scripts": { | |
"start": "GA_ID=UA-8401XXXX-X node server.js" | |
} | |
2) In webpack, under plugins: | |
new webpack.EnvironmentPlugin([ 'API_URL', 'GA_ID' ]) |
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": [ | |
{ | |
"Sid": "ECSAccess", | |
"Effect": "Allow", | |
"Action": [ | |
"ecs:Poll", | |
"ecs:StartTask", | |
"ecs:StopTask", |
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": [ | |
"elasticloadbalancing:DescribeInstanceHealth", | |
"elasticloadbalancing:DescribeLoadBalancers", | |
"elasticloadbalancing:DescribeTargetHealth", | |
"ec2:DescribeInstances", |
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
resource "aws_iam_instance_profile" "beanstalk_service" { | |
name = "beanstalk-service-user" | |
roles = ["${aws_iam_role.beanstalk_service.name}"] | |
} | |
resource "aws_iam_instance_profile" "beanstalk_ec2" { | |
name = "beanstalk-ec2-user" | |
roles = ["${aws_iam_role.beanstalk_ec2.name}"] | |
} |