CDK is wrapper on top of AWS Cloudformation that enables developers to infrastructure as code in programming languages(Typescript, Python etx)
npm install -g aws-cdk
cdk --version
npx npm-check-updates -u| run aws cli command with --debug to see where the credentials are coming from |
| /* | |
| * Hamming distance refers to the number of points at which two variables differ, | |
| * calculated by simply adding up the number of spots where two variables differ. | |
| * The variable can be binary or strings. | |
| * Used for finding genetic distance or to find the no of distorted bits to estimate error | |
| */ | |
| const hammingDistance = (x, y) => { | |
| let inc = 0 | |
| let count = 0 | |
| while (x[inc]) { |
| #!/usr/bin/env ruby | |
| if ARGV[0].nil? || ARGV[0].match(/-h/) | |
| puts "Usage : #{$0} github_username dash_sqlite_db char_appended_to_keyword [no_comments]" | |
| exit | |
| end | |
| require 'net/http' | |
| require 'open-uri' | |
| #require 'awesome_print' |
| var AWS = require('aws-sdk'); | |
| AWS.config.update({ | |
| accessKeyId: '{AWS_KEY}', | |
| secretAccessKey: '{AWS_SECRET}', | |
| region: '{SNS_REGION}' | |
| }); | |
| var sns = new AWS.SNS(); |
| import akka.actor.ActorSystem | |
| import akka.event.LoggingAdapter | |
| import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ | |
| import akka.http.scaladsl.marshalling.{ToEntityMarshaller, Marshaller} | |
| import akka.http.scaladsl.model._ | |
| import akka.http.scaladsl.server.Directives._ | |
| import akka.stream.Materializer | |
| import com.oxyme.monitoring.HealthChecker | |
| import com.oxyme.monitoring.model.{Unhealthy, Healthy} | |
| import com.typesafe.config.{ConfigFactory, Config} |
| FROM openjdk:8 | |
| ENV SCALA_VERSION 2.12.1 | |
| ENV SBT_VERSION 0.13.13 | |
| # Scala expects this file | |
| RUN touch /usr/lib/jvm/java-8-openjdk-amd64/release | |
| # Install Scala | |
| ## Piping curl directly in tar | |
| RUN \ | |
| curl -fsL http://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz | tar xfz - -C /root/ && \ |
| alias d="docker" | |
| alias dc="dc" |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.local.brain</groupId> | |
| <artifactId>MavenTestApp</artifactId> | |
| <version>1.0-SNAPSHOT</version> | |
| <packaging>war</packaging> | |
| <name>MavenTestApp</name> |