Skip to content

Instantly share code, notes, and snippets.

View StevenACoffman's full-sized avatar

Steve Coffman StevenACoffman

View GitHub Profile
const mapping = (f) => (reducing) => (result, input) => reducing(result, f(input));
const filtering = (predicate ) => (reducing) => (result, input) => predicate(input) ? reducing(result, input) : result;
@matetsu
matetsu / config.ini
Created December 10, 2015 14:32
SES -> S3 -> Lambda -> Slack
[slack]
hook_url = https://hooks.slack.com/services/xxxxxxx/yyyyyyyy/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
username = alert_bot
channel = #alert
icon_emoji = :guardsman:
@seppestas
seppestas / awslambda.mk
Last active February 12, 2017 19:40
AWS Lambda deployment package maker
# 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.
@rickpeyton
rickpeyton / python_aws_lambda.md
Last active February 12, 2017 19:42
Using Python with AWS Lambda
@harai
harai / script.sh
Last active February 13, 2017 23:19
Setting Up Build Environment of AWS Lambda
#!/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
@ambakshi
ambakshi / aws-sdb-example.md
Last active April 24, 2017 14:42
Accessing sdb from the awscli
$ 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": [

{

@shortjared
shortjared / aws-lambda-cron-webhooks.js
Last active June 2, 2017 17:44
AWS Lambda Scheduled Webhook Calls
const http = require('http');
const https = require('https');
var webhookURLs = {
// Every minute
'* * * * *': [
'http://requestb.in/testing-here'
],
// Every half hour
  1. kubeadm
  1. bootkube
  • https://github.com/kubernetes-incubator/bootkube
  • a helper tool for launching self-hosted Kubernetes clusters. when launched, bootkube will act as a temporary Kubernetes control-plane (api-server, scheduler, controller-manager), which operates long enough to bootstrap a replacement self-hosted control-plane.
  1. kops
@chrislovecnm
chrislovecnm / iam-master.json
Last active October 2, 2017 20:29
kubernetes master iam policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:AttachVolume",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:CreateTags",
"ec2:CreateVolume",
@alvaropinot
alvaropinot / map-to-object.js
Created October 3, 2017 17:58
"FUNctional" 😜 Map 🗺 to object 🔑
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 })), {})