Skip to content

Instantly share code, notes, and snippets.

🐺
Building robots

Mark Wolfe wolfeidau

🐺
Building robots
Block or report user

Report or block wolfeidau

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
@wolfeidau
wolfeidau / dashboard.json
Created Oct 15, 2019
APIGW - 500 Errors as Percentage of Total Requests
View dashboard.json
{
"metrics": [
[ { "expression": "(m2/m1)*100", "label": "percentage", "id": "e1", "yAxis": "right" } ],
[ "AWS/ApiGateway", "5XXError", "ApiName", "xxx-xxx-xx-xx", { "label": "5xx errors", "id": "m2" } ],
[ "...", { "stat": "SampleCount", "label": "total requests", "id": "m1" } ]
],
"region": "ap-southeast-2",
"title": "APIGW - 500 Errors as Percentage of Total Requests",
"stat": "Sum",
"yAxis": {
@wolfeidau
wolfeidau / dashboard.json
Last active Oct 14, 2019
Cloudwatch Dashboard for Appsync which shows 500 Errors as Percentage of Total Requests
View dashboard.json
{
"metrics": [
[ { "expression": "(m2/m1)*100", "label": "percentage", "id": "e1", "yAxis": "right" } ],
[ "AWS/AppSync", "5XXError", "GraphQLAPIId", "XXXXX", { "label": "5xx errors", "id": "m2" } ],
[ "...", { "stat": "SampleCount", "label": "total requests", "id": "m1" } ]
],
"region": "ap-southeast-2",
"title": "500 Errors as Percentage of Total Requests",
"stat": "Sum",
"yAxis": {
@wolfeidau
wolfeidau / dashboard.json
Created Oct 14, 2019
Cloudwatch Dashboard for Appsync 400 Requests as a Percentage of Total Requests
View dashboard.json
{
"metrics": [
[ { "expression": "(m2/m1)*100", "label": "percentage", "id": "e1", "yAxis": "right" } ],
[ "AWS/AppSync", "4XXError", "GraphQLAPIId", "XXXXXXXX", { "label": "4xx errors", "id": "m2" } ],
[ "...", { "stat": "SampleCount", "label": "total requests", "id": "m1" } ],
[ ".", "5XXError", ".", ".", { "label": "5xx errors", "id": "m3", "visible": false } ]
],
"region": "ap-southeast-2",
"title": "Errors",
"stat": "Sum",
@wolfeidau
wolfeidau / infra-stack.ts
Last active Sep 29, 2019
Parameters fragment from cdk synth'd CDK template... No idea what i would do with this template to be honest
View infra-stack.ts
import { Construct, StackProps, Stack } from '@aws-cdk/core';
import { Function, Runtime, Code } from '@aws-cdk/aws-lambda';
import { Table, AttributeType, BillingMode } from '@aws-cdk/aws-dynamodb';
import { Bucket, BucketEncryption, EventType } from '@aws-cdk/aws-s3';
import { LambdaRestApi } from '@aws-cdk/aws-apigateway';
import { S3EventSource } from '@aws-cdk/aws-lambda-event-sources';
export class InfraStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
@wolfeidau
wolfeidau / coverage.go
Created Sep 17, 2019
Demo file for parsing and presenting test coverage
View coverage.go
package coverage
type Coverage struct {
XMLName xml.Name `xml:"coverage"`
Text string `xml:",chardata"`
LinesValid string `xml:"lines-valid,attr"`
LinesCovered string `xml:"lines-covered,attr"`
LineRate string `xml:"line-rate,attr"`
BranchesValid string `xml:"branches-valid,attr"`
BranchesCovered string `xml:"branches-covered,attr"`
View MyFirstEcsCluster.template.json
{
"Resources": {
"MyVpcF9F0CA6F": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.0.0.0/16",
"EnableDnsHostnames": true,
"EnableDnsSupport": true,
"InstanceTenancy": "default",
"Tags": [
View build_opencv4.sh
#!/bin/bash
set -e
# provide a folder like ~/temp to build the opencv sources
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <Build Folder>"
exit
fi
folder="$1"
@wolfeidau
wolfeidau / donkeycar.md
Last active Jan 5, 2019
Commands I used to configure donkey car on raspberry pi 3 b+
View donkeycar.md

Install i2c tools to check for PCA9685 board.

sudo apt-get install i2c-tools
sudo i2cdetect -y 1

Install vim and git.

@wolfeidau
wolfeidau / commands.md
Last active Nov 8, 2019
Notes from ROS setup on the deepracer
View commands.md

Load up the ROS environment.

source /opt/aws/deepracer/setup.bash

Listing nodes.

$ rosnode list
@wolfeidau
wolfeidau / cognito.yml
Created Dec 6, 2018
Cognito CFN stack with domain verification
View cognito.yml
AWSTemplateFormatVersion: 2010-09-09
Description: 'authentication: Resources for hosting authentication using AWS Cognito, a @wolfeidau template'
Parameters:
AppName:
Description: Name of application, used in signup emails and naming of aws resources.
Type: String
AllowedPattern: '^[a-zA-Z0-9]*$'
You can’t perform that action at this time.