Skip to content

Instantly share code, notes, and snippets.

Ian Duffy imduffy15

Block or report user

Report or block imduffy15

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View kubensenter.sh
#!/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'
View gist:f2219d233fe9a4263476d69219f98d21
\{ # { character
(?: # non-capturing group
[^{}] # anything that is not a { or }
| # OR
(?R) # recurses the entire pattern
)* # previous group zero or more times
\} # } character
View ListDeserializer.scala
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 = {
View example.tf
# 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 Sep 13, 2016
Packer AWS IAM policy
View policy.json
{
"Statement": [
{
"Action": [
"ec2:Describe*",
"ec2:CreateKeyPair",
"ec2:DeleteKeyPair",
"ec2:CreateImage",
"ec2:DescribeKeyPairs",
"ec2:CreateSecurityGroup",
View gist:f771d5214457d6c85afa420f7a11c0ad
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
View dump.md

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
View aws-saml-adfs.py
#!/usr/bin/python
import sys
import boto.sts
import boto.s3
import boto.iam
import requests
import getpass
import ConfigParser
import base64
View gist:50d276cb4639c4d2958457bacf5006f3
#!/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
View facebook.html
<html>
<body>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'lalalalalala',
xfbml : true,
version : 'v2.5'
});
You can’t perform that action at this time.