Skip to content

Instantly share code, notes, and snippets.

View gist:3e44a17be2134df0ba8aefc7f4682d09
{
"version": "0",
"id": "xxxxxxxxxxxx-7288-8259-a251d0d4f872",
"detail-type": "GuardDuty Finding",
"source": "aws.guardduty",
"account": "xxxxxxxxxxxx",
"time": "2019-03-04T08:55:11Z",
"region": "us-east-1",
"resources": [],
"detail": {
View gist:39126ce798a64f55f184e0846f0ae57f
{
"eventVersion": "1.05",
"UserIdentity": {
"type": "AssumedRole",
"principalId": "xxxxxxxxxxxxxxxxx:Maish",
"arn": "arn:aws:sts::xxxxxxxxxxxx:assumed-role/Some_Role/Maish",
"accountId": "xxxxxxxxxxxx",
"accessKeyId": "xxxxxxxxxxxx",
"sessionContext": {
"attributes": {
View gist:f79d27571a4b6500f184eec7e3f9c418
{
"eventVersion": "1.05",
"userIdentity": {
"type": "IAMUser",
"principalId": "xxxxxxxxxxxxx7NSXUYG",
"arn": "arn:aws:iam::xxxxxxxxxxxx:user/some_username",
"accountId": "xxxxxxxxxxxx",
"accessKeyId": "AKIAJTMN5LKN3KSNDOPA",
"userName": "some_username"
},
@maishsk
maishsk / maishsk.sh
Created Jan 13, 2019
Create solution
View maishsk.sh
#!/bin/bash
# create structure
mkdir -p mysql/sql-scripts nginx node
## Download Files
# docker-compose
curl -L "https://gist.githubusercontent.com/maishsk/252c7d77502604ee9c4d3520b65f5cfb/raw/84ccae8b94dfb0e2bcbd4fd78b97aba31ce479bc/docker-compose.yml" -o docker-compose.yml
## mysql
View docker-compose.yml
version: '3'
services:
mysql:
image: "maishsk/mysql"
ports:
- "3306:3306"
expose:
- 3306
environment:
- MYSQL_ROOT_PASSWORD=my-secret-pw
@maishsk
maishsk / Dockerfile
Created Jan 13, 2019
nginx Docker image
View Dockerfile
FROM nginx
COPY nginx.conf /etc/nginx/nginx.conf
@maishsk
maishsk / Dockerfile
Created Jan 13, 2019
MYSQL docker image
View Dockerfile
# Derived from official mysql image (our base image)
FROM mysql:5.6
EXPOSE 3306
# Add a database
ENV MYSQL_DATABASE maishsk
# Add the content of the sql-scripts/ directory to your image
# All scripts in docker-entrypoint-initdb.d/ are automatically
# executed during container startup
COPY ./sql-scripts/ /docker-entrypoint-initdb.d/
View Dockerfile
FROM node:8
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
View create_data.sql
CREATE TABLE mytable ( id smallint unsigned not null auto_increment, name varchar(20) not null, constraint pk_example primary key (id) );
INSERT INTO mytable ( id, name ) VALUES ( null, 'Hello World' );
View Dockerfile
# Derived from official mysql image (our base image)
FROM mysql:5.6
EXPOSE 3306
# Add a database
ENV MYSQL_DATABASE maishsk
# Add the content of the sql-scripts/ directory to your image
# All scripts in docker-entrypoint-initdb.d/ are automatically
# executed during container startup
COPY ./sql-scripts/ /docker-entrypoint-initdb.d/
You can’t perform that action at this time.