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
/** | |
* _Complete_ example of a Slackbot | |
*/ | |
export class DemoSlackbotStack extends cdk.Stack { | |
constructor(scope: Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
// Secrets created separately | |
const secret = secretsmanager.Secret.fromSecretNameV2(this, "secrets", "DemoSlackBot" ); |
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
export class CdkStack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
/** | |
* SPA | |
* Uses https://www.npmjs.com/package/cdk-spa-deploy | |
*/ | |
new SPADeploy(this, 'SPA') | |
.createSiteFromHostedZone({ |
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
.git | |
.gitignore | |
/doc | |
.yardoc | |
coverage | |
jsdoc | |
/tmp | |
/log | |
Dockerfile | |
Dockerfile.prod |
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
class ElastiCache | |
# | |
# Our connection to the AWS region. | |
# @return [AWSConnection] The AWS connection to the region in which this ElastiCache resides. | |
# | |
attr_reader :aws | |
# | |
# Unique identifier of ElastiCache cluster | |
# @return [String] name associated to the ElastiCache cluster |
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
module ConfigAccessor | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
# Assumes config will be accessible like an attribute | |
def config_accessor(config, attr) | |
# Define reader | |
define_method(attr) do |
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
package main | |
import ( | |
"fmt" | |
"github.com/google/go-querystring/query" | |
"io/ioutil" | |
"net/http" | |
) | |
// Change constants for yourself |
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
$ ruby complex.rb -h | |
Usage: complex.rb [options] | |
Specific options: | |
-z, --zero ZERO Enforce argument ZERO | |
-o, --one ONE Require argument ONE | |
-t, --two [TWO] This is a multi-line description for | |
option TWO | |
-r, --three THREE Float argument THREE | |
-f, --four FOUR List of arguments for argument FOUR: [:a, :b, :c] |