start new:
tmux
start new with session name:
tmux new -s myname
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # vim:fileencoding=utf-8 | |
| # vim:tabstop=2 | |
| from random import Random | |
| from optparse import OptionParser | |
| from pydhcplib.dhcp_packet import DhcpPacket | |
| from pydhcplib.dhcp_network import DhcpClient | |
| from pydhcplib.type_hw_addr import hwmac |
| """Utilities for with-statement contexts. See PEP 343.""" | |
| import sys | |
| from functools import wraps | |
| __all__ = ["contextmanager", "nested", "closing"] | |
| class GeneratorContextManager(object): | |
| """Helper for @contextmanager decorator.""" |
| #!/bin/sh | |
| # | |
| # The MIT License | |
| # | |
| # Copyright 2014-2017 Jakub Jirutka <[email protected]>. | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-nameservice.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefixservice.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)| #!/bin/bash | |
| REGION=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document|grep region|awk -F\" '{print $4}') | |
| INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) | |
| aws ec2 describe-instances \ | |
| --instance-id $INSTANCE_ID \ | |
| --query 'Reservations[*].Instances[*].Tags[?Key==`aws:cloudformation:stack-name`].Value' \ | |
| --region $REGION \ | |
| --output text |
| variable "object_list" { | |
| type = "map" | |
| default = { | |
| content1 = "this is example content 1", | |
| content2 = "this is example content 2" | |
| } | |
| } | |
| resource "local_file" "local_files" { | |
| count = "${length(var.object_list)}" # perform this action based on the amount of items in the map |