Skip to content

Instantly share code, notes, and snippets.

View moofish32's full-sized avatar

Mike Cowgill moofish32

View GitHub Profile
@moofish32
moofish32 / keybase.md
Created March 7, 2017 08:40
github proof

Keybase proof

I hereby claim:

  • I am moofish32 on github.
  • I am moofish32 (https://keybase.io/moofish32) on keybase.
  • I have a public key ASBl4zn7ZSZKszjGuc7vW97e0-GlyuUtSmKYUHm49fSTGAo

To claim this, I am signing this object:

Adding the above rm command to the end of the script will result in cleaning up the PID file after a successful execution. If the script exits any other places this step should be included before the exit command.
Summary of Changes
Now that we have made our changes let's take another look at this script.
#!/bin/bash
PIDFILE=/home/vagrant/forever.pid
if [ -f $PIDFILE ]
then
export class Helper {
public help(): string {
return 'your welcome for the help';
}
}
export interface Helpable {
help: Helper;
}
import dyn = require('@aws-cdk/aws-dynamodb');
import cdk = require('@aws-cdk/cdk');
export class DynamoExport extends cdk.Stack {
public readonly tableNameOutput: cdk.Output;
public readonly tableArnOutput: cdk.Output;
constructor(parent: cdk.App, name: string, props?: cdk.StackProps) {
super(parent, name, props);
@moofish32
moofish32 / app-delivery-example.ts
Last active November 15, 2018 17:27
Simple App Delivery Example
import codebuild = require('@aws-cdk/aws-codebuild');
import codepipeline = require('@aws-cdk/aws-codepipeline');
import s3 = require('@aws-cdk/aws-s3');
import iam = require('@aws-cdk/aws-iam');
import ec2 = require('@aws-cdk/aws-ec2');
import cdk = require('@aws-cdk/cdk');
import cicd = require('@aws-cdk/app-delivery');
const app = new cdk.App();
@moofish32
moofish32 / ingress-control-check.ts
Created April 15, 2019 04:22
cdk aspect for checking for an ingress control issue
import cdk = require('@aws-cdk/cdk');
import ec2 = require('@aws-cdk/aws-ec2');
export class IngressControlCheck implements cdk.IAspect {
constructor(private readonly cidr: string, private readonly port: number) { }
public visit(construct: cdk.Construct) {
if (cdk.CfnResource.isCfnResource(construct) && this.isCfnSecurityGroup(construct)) {
this.check(construct);
// Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Generated from the AWS CloudFormation Resource Specification
// See: docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html
// @cfn2ts:meta@ {"generated":"2019-06-17T20:08:04.438Z","fingerprint":"RRaQrKXriTRnT5GDKdzJRqLngFMESa0HgUFjHJUl2rM="}
// tslint:disable:max-line-length | This is generated code - line lengths are difficult to control
import cdk = require('@aws-cdk/cdk');
/**
// Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Generated from the AWS CloudFormation Resource Specification
// See: docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html
// @cfn2ts:meta@ {"generated":"2019-06-17T20:08:49.014Z","fingerprint":"Y9UchU9pctC6/xWTm7rE/XBp8d05mvBX9wvFf2MixrM="}
// tslint:disable:max-line-length | This is generated code - line lengths are difficult to control
import cdk = require('@aws-cdk/cdk');
/**