Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
#
# kubensenter(1) is a utility to start a shell on the host of
# a kubernetes pod
[[ -n $DEBUG ]] && set -x
set -eou pipefail
IFS=$'\n\t'
\{ # { character
(?: # non-capturing group
[^{}] # anything that is not a { or }
| # OR
(?R) # recurses the entire pattern
)* # previous group zero or more times
\} # } character
import java.io.{ ByteArrayInputStream, DataInputStream }
import java.util
import scala.collection.mutable.ListBuffer
import scala.util.{ Failure, Success, Try }
import org.apache.kafka.common.serialization.Deserializer
class ListDeserializer[T](valueDeserializer: Deserializer[T]) extends Deserializer[List[T]] {
override def configure(configs: util.Map[String, _], isKey: Boolean): Unit = {
# Reference https://www.terraform.io/docs/providers/aws/
# Reference https://github.com/hashicorp/terraform/pull/8506
provider "aws" {
assume_role {
role_arn = "arn:aws:iam::${var.account_a_id}:role/${var.role}"
}
name = "accountA"
profile = "${var.role}"
}
@imduffy15
imduffy15 / policy.json
Created September 13, 2016 18:01
Packer AWS IAM policy
{
"Statement": [
{
"Action": [
"ec2:Describe*",
"ec2:CreateKeyPair",
"ec2:DeleteKeyPair",
"ec2:CreateImage",
"ec2:DescribeKeyPairs",
"ec2:CreateSecurityGroup",
users:
- default
disable_root: 1
ssh_pwauth: 0
locale_configfile: /etc/sysconfig/i18n
mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']
resize_rootfs_tmp: /dev
ssh_deletekeys: 0

F5 (BYOL)

Features          : Reserved
FileFormatVersion : 65536
HeaderOffset      : -1
TimeStamp         : 2016-04-18 20:53:19 +0000 UTC
CreatorApplication: win 
CreatorVersion    : 393218
CreatorHostOsType : Windows
PhysicalSize      : 136365211648 bytes
#!/usr/bin/python
import sys
import boto.sts
import boto.s3
import boto.iam
import requests
import getpass
import ConfigParser
import base64
#!/usr/bin/env bash
set -eux
# set a default HOME_DIR environment variable if not set
HOME_DIR="${HOME_DIR:-/root}";
case "$PACKER_BUILDER_TYPE" in
virtualbox-iso|virtualbox-ovf)
yum -y install autoconf bison flex gcc gcc-c++ kernel-devel-$(uname -r) kernel-headers-$(uname -r) m4 patch perl
<html>
<body>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'lalalalalala',
xfbml : true,
version : 'v2.5'
});