http://docs.python-guide.org/en/latest/dev/virtualenvs/ http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
To create a virtualenv
inside your project directory
virtualenv venv
const mapping = (f) => (reducing) => (result, input) => reducing(result, f(input)); | |
const filtering = (predicate ) => (reducing) => (result, input) => predicate(input) ? reducing(result, input) : result; |
[slack] | |
hook_url = https://hooks.slack.com/services/xxxxxxx/yyyyyyyy/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | |
username = alert_bot | |
channel = #alert | |
icon_emoji = :guardsman: |
# Copyright (c) Productize | |
# This is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License version 3 | |
# as published by the Free Software Foundation. | |
# You can get the license at <http://www.gnu.org/licenses/gpl.html> | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. |
http://docs.python-guide.org/en/latest/dev/virtualenvs/ http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
To create a virtualenv
inside your project directory
virtualenv venv
#!/bin/bash | |
set -e -x | |
yum -y update | |
yum -y upgrade | |
yum -y groupinstall "Development Tools" | |
yum -y install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel git | |
export HOME=/home/ec2-user |
$ aws configure set preview.sdb true
$ aws sdb create-domain skv
$ aws sdb put-attributes --domain-name skv --item-name ami_idx --attributes Name=app-mwios-asg,Value=1
$ aws sdb put-attributes --domain-name skv --item-name ami_idx --attributes Name=app-ccand-asg,Value=5
$ aws sdb get-attributes --domain-name skv --item-name ami_idx --attribute-names app-mwios-asg
{
"Attributes": [
{
const http = require('http'); | |
const https = require('https'); | |
var webhookURLs = { | |
// Every minute | |
'* * * * *': [ | |
'http://requestb.in/testing-here' | |
], | |
// Every half hour |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"ec2:AttachVolume", | |
"ec2:AuthorizeSecurityGroupIngress", | |
"ec2:CreateTags", | |
"ec2:CreateVolume", |
const obj = { a: 1, c: 3, b: 2 } | |
// Map from object. | |
const myMap = new Map(Object.entries(obj)) | |
// Map to Object. | |
// NOTE: Keys will be cast to strings by `.toString`, so any "complex" key like for example `[1, 2]` will become `1,2` | |
const newObj = [...myMap.entries()] | |
.reduce((acc, [key, value]) => (Object.assign(acc, { [key]: value })), {}) |