Skip to content

Instantly share code, notes, and snippets.

View scarolan's full-sized avatar
🤸‍♂️
In whatever position one is in...one must find balance. -BKS Iyengar

Sean Carolan scarolan

🤸‍♂️
In whatever position one is in...one must find balance. -BKS Iyengar
View GitHub Profile
@scarolan
scarolan / show_all_instances.sh
Created January 29, 2018 16:04
List all AWS instances in all regions
#!/bin/sh
getRegions() {
aws ec2 describe-regions --output text --query 'Regions[*].RegionName'
}
getInstances() {
REGION=$1
if [ "$#" -ne 1 ]; then
echo "USAGE: getInstances us-west-2"
@scarolan
scarolan / screenrc config
Created December 29, 2017 21:57
screenrc config
#shelltitle ''
vbell on
autodetach on
startup_message off
defscrollback 2048
#termcapinfo xterm* ti@:te@
termcapinfo xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< %=%D %M %d %c"
#hardstatus string '%{= kK}%-Lw%{= KW}%50>%n%f %t%{= kK}%+Lw%< %{=kG}%-= %d%M %c:%s%{-}'
@scarolan
scarolan / hpe_oneview_synergy.rb
Created November 10, 2017 17:30
Chef recipe to stand up Synergy infrastructure
chef_gem 'oneview-sdk' do
compile_time true
end
require 'oneview-sdk'
my_client = { url: 'https://192.168.20.20', user: 'Administrator', password: '*******', api_version: 500 }
# Create a new fiber channel network
oneview_fc_network 'FCNetwork1' do
@scarolan
scarolan / aws_inspec_sample.rb
Created September 5, 2017 17:25
Sample code for demonstrating inspec-aws
# encoding: utf-8
# copyright: 2015, The Authors
title 'AWS Inspec Demo Profile'
control 'aws-production-instances' do
impact 1.0
title 'Check Production Instances'
desc 'Make sure the status of production AWS instances is set to running.'
@scarolan
scarolan / .kitchen.yml
Created June 23, 2017 00:31
Test Kitchen Config file for Chef Workshop
---
driver:
name: ec2
aws_ssh_key_id: chef_demo_2x
region: us-west-2
subnet_id: subnet-da4bd3bf
security_group_ids: sg-1cea9178
associate_public_ip: true
instance_type: t2.micro
tags:
---
driver:
name: ec2
require_chef_omnibus: true
region: us-west-2
security_group_ids: <REPLACE>
subnet_id: <REPLACE>
associate_public_ip: true
instance_type: c3.large
aws_ssh_key_id: chef_demo
@scarolan
scarolan / config.json
Created March 28, 2017 14:14
No-op .delivery/config.json
{
"version": "2",
"build_cookbook": {
"name": "build_cookbook",
"path": ".delivery/build_cookbook"
},
"skip_phases": [
"unit","lint","syntax","quality","security","publish","provision","deploy","smoke","functional"
],
"dependencies": []
---
driver:
name: ec2
aws_ssh_key_id: gramsay_bot
region: us-east-1
security_group_ids: sg-e5bafc83
subnet_id: subnet-977469ce
availability_zone: us-east-1a
associate_public_ip: true
instance_type: t2.micro
---
driver:
name: ec2
aws_ssh_key_id: gramsay_bot
region: us-east-1
security_group_ids: sg-e5bafc83
subnet_id: subnet-977469ce
availability_zone: us-east-1a
associate_public_ip: true
instance_type: t2.micro
@scarolan
scarolan / plan.sh
Last active October 9, 2016 20:23 — forked from nathenharvey/plan.sh
pkg_origin=firstnamelastname
pkg_name=mytutorialapp
pkg_version=0.2.0
pkg_maintainer="First Last <[email protected]>"
pkg_license=()
pkg_source=nosuchfile.tar.gz
pkg_upstream_url=https://github.com/scarolan/habitat-example-plans
pkg_deps=(core/node)
pkg_expose=(8080)