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 datetime import datetime | |
import time | |
while True: | |
print("Hello there, it is {}".format(datetime.now())) | |
time.sleep(10) |
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: busybox | |
namespace: default | |
spec: | |
containers: | |
- image: busybox:1.28.4 | |
command: | |
- sleep |
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
# Copyright: Sudheera Satyanarayana. 2019. | |
# License. Apache 2. | |
# You need 3 AWS components to get this to work | |
# 1. DynamoDB Table 2. Lambda function 3. AWS CloudWatch Event Rule that triggers the Lambda function with specific inputs | |
# Following code is the lambda function | |
# When you create the lambda function, create two environment variables named `region` and `table_name` | |
# `region` is your AWS region | |
# `table_name` is the DynamoDB table | |
# Assign an IAM role with permissions to start/stop EC2 instances, read from DynamoDB table and write to CloudWatch logs | |
# The DynamoDB table should have three columns a) instance_id (string) b) start_morining(Boolean) c) stop_evening(Boolean) |
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
all: | |
hosts: | |
test1 | |
children: | |
webservers: | |
hosts: | |
redmine: | |
nginx_bind_ip: 0.0.0.0 | |
ansible_user: vagrant | |
ansible_become: true |
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
--- | |
- name: redmine | |
hosts: redmine | |
vars: | |
- centos_base_enable_epel: true | |
- centos_base_basic_packages: true | |
- centos_base_selinux_packages: true | |
- centos_base_debug_packages: true | |
- centos_base_utility_packages: true | |
- redmine_sql_username: redmine |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "centos/7" | |
config.vm.post_up_message = "Happy Redmine development" | |
config.vm.network "private_network", ip: "192.168.100.51" | |
config.vm.network :forwarded_port, guest: 22, host: 7101, id: 'ssh', auto_correct: false | |
# https://gist.github.com/amccarty/2137ae65ddada56c0865 |
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
--- | |
- hosts: all | |
tasks: | |
- name: Create a data container | |
docker_container: | |
name: my-test-container | |
image: python:2.7 | |
command: /bin/sleep 600 |
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 | |
# | |
# Ansible role test shim. | |
# | |
# Usage: [OPTIONS] ./tests/test.sh | |
# - distro: a supported Docker distro version (default = "centos7") | |
# - playbook: a playbook in the tests directory (default = "test.yml") | |
# - cleanup: whether to remove the Docker container (default = true) | |
# - container_id: the --name to set for the container (default = timestamp) | |
# - test_idempotence: whether to test playbook's idempotence (default = true) |
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
python -c 'import sys; print(sys.path)' |
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> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
font: 10px sans-serif; | |
} | |
.axis path, | |
.axis line { |
NewerOlder