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 boto3 | |
import json | |
import csv | |
import io | |
def lambda_handler(event, context): | |
s3 = boto3.resource('s3') | |
content_object = s3.Object('src-bucket', 'src-file.json') | |
file_content = content_object.get()['Body'].read().decode('utf-8') | |
lines = file_content.splitlines() |
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
#include <NewPing.h> | |
const int greenPin = 2; | |
const int redPin = 4; | |
const int bluePin = 3; | |
const int trigPin = 11; | |
const int echoPin = 12; | |
enum color { | |
red, |
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", | |
"Parameters" : { | |
"KeyName": { | |
"Type": "AWS::EC2::KeyPair::KeyName", | |
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the ECS instances" | |
}, | |
"SubnetID": { | |
"Type": "List<AWS::EC2::Subnet::Id>", | |
"Description": "List of an existing subnet IDs to use for the load balancer and auto scaling group" |
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
# Dockerfile for openresty | |
FROM centos:7 | |
MAINTAINER matt murphy | |
ENV http_proxy http://10.0.2.2:3128/ | |
ENV https_proxy https://10.0.2.2:3128/ | |
ENV PKG ngx_openresty-${openresty_version:-"1.7.10.1"} | |
RUN yum install -y readline-devel pcre-devel openssl-devel gcc wget perl make | |
RUN wget http://openresty.org/download/${PKG}.tar.gz \ |
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
set nocompatible | |
filetype off | |
set rtp+=%USERPROFILE%/_vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'kien/ctrlp.vim' | |
call vundle#end() |
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
public class ApiOperationDescriptionAttribute : Attribute | |
{ | |
public string Description { get; set; } | |
public ApiOperationDescriptionAttribute(string description) | |
{ | |
Description = description; | |
} | |
} | |
public class LookupOperationFilter : IOperationFilter |
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
#!/bin/sh | |
# | |
# chkconfig: 2345 55 25 | |
# Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx | |
# For Debian, run: update-rc.d -f nginx defaults | |
# For CentOS, run: chkconfig --add nginx | |
# | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all |
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 demo thingy", | |
"Parameters": { | |
"Environment": { | |
"Description": "Environment", | |
"Type": "String", | |
"MinLength": "3", | |
"MaxLength": "4", | |
"Default": "DEV", |
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
{ | |
"variables": { | |
"aws_access_key": "", | |
"aws_secret_key": "" | |
}, | |
"builders": [{ | |
"type": "amazon-ebs", | |
"access_key": "{{user `aws_access_key`}}", | |
"secret_key": "{{user `aws_secret_key`}}", | |
"region": "ap-southeast-2", |
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
{ | |
"taskDefinitionArn": "arn:aws:ecs:us-west-2:<scc number>:task-definition/build-blog:3", | |
"revision": 3, | |
"containerDefinitions": [ | |
{ | |
"volumesFrom": [], | |
"portMappings": [], | |
"command": [], | |
"environment": [ | |
{ |
NewerOlder