Skip to content

Instantly share code, notes, and snippets.

John Creecy zugdud

Block or report user

Report or block zugdud

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zugdud
zugdud / awsCliMfa.sh
Created Feb 14, 2019
MFA profile config script for aws cli
View awsCliMfa.sh
#!/bin/bash
if [[ $1 -eq 0 ]] ; then
echo 'Error Must provide MFA code as param1'
exit 0
fi
tokenCode=$1
awsAccessKey=""
awsSecretKey=""
@zugdud
zugdud / OpenVPNWalkthrough-Part3.yaml
Last active Jan 22, 2019
OpenVPNWalkthrough-Part3.yaml
View OpenVPNWalkthrough-Part3.yaml
AWSTemplateFormatVersion: '2010-09-09'
Description: OpenVPN Stack
Parameters:
OpenVPNPort:
Type: Number
Default: 1194
Description: OpenVPN UDP port
ClientIPCIDR:
@zugdud
zugdud / OpenVPNWalkthrough-Part2.yaml
Last active Aug 24, 2019
OpenVPNWalkthrough-Part2.yaml
View OpenVPNWalkthrough-Part2.yaml
AWSTemplateFormatVersion: '2010-09-09'
Description: OpenVPN Stack
Parameters:
OpenVPNPort:
Type: Number
Default: 1194
Description: OpenVPN UDP port
SSHKeyName:
@zugdud
zugdud / OpenVPNWalkthrough-Part1.yaml
Last active Aug 24, 2019
OpenVPNWalkthrough-Part1.yaml
View OpenVPNWalkthrough-Part1.yaml
AWSTemplateFormatVersion: '2010-09-09'
Description: OpenVPN Stack
Parameters:
OpenVPNPort:
Type: Number
Default: 1194
Description: OpenVPN UDP port
SSHKeyName:
View simpleVPC
AWSTemplateFormatVersion: '2010-09-09'
Description: Simple VPC
Parameters:
VPCName:
Type: String
Default: My VPC
Description: Name for the VPC
Resources:
@zugdud
zugdud / accessPolicyListCharactersDynamoDbCharacterData
Created Oct 17, 2017
accessPolicyListCharactersDynamoDbCharacterData
View accessPolicyListCharactersDynamoDbCharacterData
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "accessPolicyListCharactersDynamoDbCharacterData",
"Effect": "Allow",
"Action": [
"dynamodb:GetItem",
"dynamodb:GetRecords",
"dynamodb:Query"
@zugdud
zugdud / serverlessExample-lambda-listCharacters-testEvent
Last active Oct 17, 2017
serverlessExample-lambda-listCharacters-testEvent
View serverlessExample-lambda-listCharacters-testEvent
{
"body": "{\"testamundo\":\"body\"}",
"resource": "/{proxy+}",
"requestContext": {
"resourceId": "123456",
"apiId": "1234567890",
"resourcePath": "/{proxy+}",
"httpMethod": "POST",
"requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef",
"accountId": "123456789012",
@zugdud
zugdud / serverlessExample-dynamoDB-table-characterData
Last active Oct 17, 2017
serverlessExample-dynamoDB-table-characterData
View serverlessExample-dynamoDB-table-characterData
Resources:
DBLookupTable:
Type: "AWS::DynamoDB::Table"
Properties:
AttributeDefinitions:
-
AttributeName: "gameId"
AttributeType: "S"
-
AttributeName: "characterName"
@zugdud
zugdud / serverlessExample-lambda-listCharacters.js
Last active Oct 17, 2017
serverlessExample-lambda-listCharacters.js
View serverlessExample-lambda-listCharacters.js
'use strict';
const AWS = require('aws-sdk');
const dynamoClient = new AWS.DynamoDB.DocumentClient({
region: 'us-east-1'
});
function buildResponse(dynamoData) {
console.log("dynamoData: " + JSON.stringify(dynamoData));
return dynamoData;
}
@zugdud
zugdud / serverlessExample-dynamoDB-data.json
Last active Oct 17, 2017
serverlessExample-dynamoDB-data
View serverlessExample-dynamoDB-data.json
{
"characters": [{
"gameId": "1",
"characterClass": "rogue",
"characterName": "tarnug",
"intelligence": 12,
"level": 50,
"strength": 16,
"dexterity": 16,
"constitution": 12
You can’t perform that action at this time.