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
View dijkstra.cpp
struct MatrixPosition
{
int y;
int x;
};
struct orderLeastWeight
{
inline bool operator()(const WeightedNode& weightedNode1, const WeightedNode& weightedNode2)
@zugdud
zugdud / simpleSESIncomingEmailHandler.js
Last active Oct 17, 2017
Simple SES incoming email handler
View simpleSESIncomingEmailHandler.js
// Handle incoming SES email events, persist the message in S3 and forward to specified address
var AWS = require('aws-sdk');
var ses = new AWS.SES();
var s3Bucket = 'your-bucket-name-to-persist-email-data';
var yourEmail = 'yourname@gmail.com'; // your existing email account to forward emails to
exports.handler = (event, context, callback) => {
console.log(JSON.stringify(event));
@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
@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-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-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 / accessPolicyListCharactersDynamoDbCharacterData
Created Oct 17, 2017
accessPolicyListCharactersDynamoDbCharacterData
View accessPolicyListCharactersDynamoDbCharacterData
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "accessPolicyListCharactersDynamoDbCharacterData",
"Effect": "Allow",
"Action": [
"dynamodb:GetItem",
"dynamodb:GetRecords",
"dynamodb:Query"
View simpleVPC
AWSTemplateFormatVersion: '2010-09-09'
Description: Simple VPC
Parameters:
VPCName:
Type: String
Default: My VPC
Description: Name for the VPC
Resources:
@zugdud
zugdud / OpenVPNWalkthrough-Part1.yaml
Last active Jun 20, 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:
@zugdud
zugdud / OpenVPNWalkthrough-Part2.yaml
Last active Jul 18, 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:
You can’t perform that action at this time.