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
/*==== The VPC ======*/ | |
resource "aws_vpc" "vpc" { | |
cidr_block = "${var.vpc_cidr}" | |
enable_dns_hostnames = true | |
enable_dns_support = true | |
tags = { | |
Name = "${var.environment}-vpc" | |
Environment = "${var.environment}" | |
} | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
-- # users table | |
SELECT * FROM ab_user; | |
-- # role table | |
SELECT * FROM ab_role; | |
-- # user and role mapping | |
SELECT * FROM ab_user_role; | |
-- # update role_id for user |
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 | |
if [[ "$OSTYPE" == "linux-gnu"* ]]; then | |
alias gsed=sed | |
fi | |
NEW_PATTERN="_v2" | |
# find . -type f -exec gsed -i '/^data /s/" {/_v2" {/' {} + | |
# find . -type f -exec gsed -i '/^resource /s/" {/_v2" {/' {} + | |
find . -type f -exec gsed -i "/^data /s/\" {/${NEW_PATTERN}\" {/" {} + |
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/sh | |
# ============================================================================= | |
# Author: Chu-Siang Lai / chusiang (at) drx.tw | |
# Filename: teams-chat-post.sh | |
# Modified: 2018-03-28 15:04 | |
# Description: Post a message to Microsoft Teams. | |
# Reference: | |
# | |
# - https://gist.github.com/chusiang/895f6406fbf9285c58ad0a3ace13d025 | |
# |
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
from functools import wraps | |
import time | |
import logging | |
import random | |
logger = logging.getLogger(__name__) | |
def retry(exceptions, total_tries=4, initial_wait=0.5, backoff_factor=2, logger=None): | |
""" |
NewerOlder