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}" | |
} | |
} |
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): | |
""" |
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
$ sudo service docker stop | |
$ gksudo gedit /etc/default/docker | |
# Use DOCKER_OPTS to modify the daemon startup options. | |
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -g /home/jokla/docker/docker/" | |
$ sudo service docker start | |
UBUNTU 16.04 |
Typing vagrant
from the command line will display a list of all available commands.
Be sure that you are in the same directory as the Vagrantfile when running these commands!
vagrant init
-- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.vagrant init <boxpath>
-- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example,vagrant init ubuntu/trusty64
.
vagrant up
-- starts vagrant environment (also provisions only on the FIRST vagrant up)
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 | |
version="${VERSION:-0.14.0}" | |
arch="${ARCH:-linux-amd64}" | |
bin_dir="${BIN_DIR:-/usr/local/bin}" | |
wget "https://github.com/prometheus/node_exporter/releases/download/v$version/node_exporter-$version.$arch.tar.gz" \ | |
-O /tmp/node_exporter.tar.gz | |
mkdir -p /tmp/node_exporter |
NewerOlder