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
#!/usr/bin/env python | |
import boto3 | |
import botocore | |
from itertools import product | |
client = boto3.client('glue') | |
def get_projected_dict(op_name, pm_name, src_dict, structure=None): | |
if structure: |
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
FROM python:2.7-alpine | |
COPY logout.py /app/ | |
COPY config.ini /app/ | |
WORKDIR /app | |
CMD ["./logout.py"] |
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 | |
LOGINPATH=`mysql_config_editor print --all | grep '^[[]' | tr -d '[]' | fzf` | |
mysql --login-path=$LOGINPATH |
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
import os | |
import logging | |
import requests | |
import json | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
env_webhook = os.environ['SLACK_WEBHOOK'] | |
env_channel = os.environ['SLACK_CHANNEL'] |
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 | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 [AlarmBaseName] [Region]" | |
echo "Region: ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-central-1 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2" | |
exit | |
fi | |
ALARM_BASE_NAME=$1 | |
METRIC_NAME=StatusCheckFailed_System |
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
<!doctype html> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>Cloud Watch Flowlog</title> | |
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/r/bs/jq-2.1.4,dt-1.10.8/datatables.min.css"/> | |
<script type="text/javascript" src="https://cdn.datatables.net/r/bs/jq-2.1.4,dt-1.10.8/datatables.min.js"></script> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> |
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
/** | |
* 日付をフォーマットする | |
* @param {Date} date 日付 | |
* @param {String} [format] フォーマット | |
* @return {String} フォーマット済み日付 | |
*/ | |
var formatDate = function (date, format) { | |
if (!format) format = 'YYYY-MM-DD hh:mm:ss.SSS'; | |
format = format.replace(/YYYY/g, date.getFullYear()); | |
format = format.replace(/MM/g, ('0' + (date.getMonth() + 1)).slice(-2)); |