-
Enable IAM Authentication in existing RDS using the link here: Enabling and Disabling IAM Database Authentication
-
Login to RDS with master username password.
mysql -h <RDS_ENDPOINT> --user <MASTER_USERNAME> --password
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>現在位置をGoogle Mapに表示</title> | |
<style> | |
#map { | |
height: 100vh; | |
width: 100%; |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# Usage: GetZip.py 0.0.0.0 1337 [--xor 255] --md5 --parse | |
# Requirements: pip3 install tqdm pypykatz | |
import os | |
import socket | |
import zipfile | |
import hashlib | |
from argparse import ArgumentParser |
This file contains hidden or 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Deny", | |
"Action": "elasticloadbalancing:*", | |
"Resource": "*", | |
"Condition": { | |
"StringEquals": { |
This file contains hidden or 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 | |
t() { | |
#DATETIME_FORMAT=$(date --iso-8601="minutes") | |
DATETIME_FORMAT=$(date +%T) | |
echo -n "$DATETIME_FORMAT [info]:" | |
"$@" | |
return $? | |
} | |
t echo "A" | |
t echo "A" |
This file contains hidden or 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
fun fizzBuzz(i: Int): String { | |
return when { | |
(i % 5 == 0 && i % 3 == 0) -> "FizzBuzz" | |
(i % 3 == 0) -> "Fizz" | |
(i % 5 == 0) -> "Buzz" | |
else -> i.toString() | |
} | |
} | |
fun main() { |
This file contains hidden or 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 | |
cd /tmp | |
curl https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm -o amazon-ssm-agent.rpm | |
yum install -y amazon-ssm-agent.rpm | |
tee -a /etc/yum.repos.d/mongodb-org-3.2.repo << EOF | |
[mongodb-org-3.2] | |
name=MongoDB Repository | |
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.2/x86_64/ | |
gpgcheck=1 | |
enabled=1 |
This file contains hidden or 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
# | |
# Configuration for Autoscaling group. | |
# | |
resource "aws_launch_template" "eks-cluster-worker-nodes" { | |
iam_instance_profile = { name = "${aws_iam_instance_profile.eks-cluster-worker-nodes.name}" } | |
image_id = "${data.aws_ami.eks-worker.id}" | |
name = "${var.cluster-name}-eks-cluster-worker-nodes" | |
vpc_security_group_ids = ["${aws_security_group.eks-cluster-worker-nodes.id}"] | |
key_name = "${var.ssh-key-name}" | |
instance_type = "${local.host-types[0]}" |
This file contains hidden or 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 | |
prev_p=\"\$\{ | |
aftr_p=\}\" | |
sed s/$prev_p//g $1 | sed s/aftr_p//g |
This file contains hidden or 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 | |
# install | |
sudo apt install -y awscli | |
sudo apt install -y jq | |
# setup | |
cat << EOF > ~/.aws/config | |
[default] | |
region = ap-northeast-1 |
NewerOlder