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
const express = require('express') | |
mysql = require('mysql') | |
const app = express() | |
const port = 3000 | |
let winston = require('winston'); | |
let logger = winston.createLogger({ | |
level: 'info', | |
format: winston.format.combine( | |
winston.format.timestamp(), | |
winston.format.printf(info => { |
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
const express = require('express') | |
mysql = require('mysql') | |
const app = express() | |
const port = 3000 | |
let winston = require('winston'); | |
let logger = winston.createLogger({ | |
level: 'info', | |
format: winston.format.combine( | |
winston.format.timestamp(), | |
winston.format.printf(info => { |
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
CREATE DATABASE maishsk; | |
USE maishsk; | |
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' ); |
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
const express = require('express') | |
const app = express() | |
const port = 3000 | |
let winston = require('winston'); | |
let logger = winston.createLogger({ | |
level: 'info', | |
format: winston.format.combine( | |
winston.format.timestamp(), | |
winston.format.printf(info => { | |
return `${info.timestamp} ${info.level}: ${info.message}`; |
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
const express = require('express') | |
const app = express() | |
const port = 3000 | |
app.get('/hello', (request, response) => { | |
response.send('Hello from Express!') | |
}) | |
app.listen(port, (err) => { | |
if (err) { |
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
for number in {1..100} | |
do | |
if (( $number % 15 == 0 )); then | |
echo "pinklemonade" | |
elif (( $number % 5 == 0 )); then | |
echo "lemonade" | |
elif (( $number % 3 == 0 )); then | |
echo "pink" | |
else |
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
changed_files=$(git diff --numstat HEAD~1 HEAD | awk '{ print $NF }') |
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
--- | |
- name: Launch haproxy EC2 instances | |
hosts: localhost | |
connection: local | |
gather_facts: True | |
vars: | |
component_name: "{{ component_name }}" | |
stack_name: "{{ stack_name }}" | |
vars_files: | |
- vars/vars.yml |
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
a4b | |
acm | |
amazon-mq | |
apigateway | |
appstream2 | |
appsync | |
artifact | |
athena | |
awsautoscaling | |
batch |
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
#!/bin/bash | |
## Create a IAM policy as follows and attach it to your instance | |
# | |
# { | |
# "Version": "2012-10-17", | |
# "Statement": [ | |
# { | |
# "Sid": "UpdateRecords", | |
# "Effect": "Allow", |