Skip to content

Instantly share code, notes, and snippets.

@acumenix
acumenix / instance.py
Created October 9, 2019 05:54 — forked from alq666/instance.py
Compute the count of instances per zone
import simplejson as json
import sys
#{
# "results": 91,
# "rows": [
# {
# "ec2": {
# "instance_action": "none",
# "instance_id": "i-f9069c96",
@acumenix
acumenix / aws-resource-count-ucsf.sh
Created October 9, 2019 05:55 — forked from pavgup/aws-resource-count-ucsf.sh
Updated RedLock Count Resources (command line argument for credentials profile)
#!/bin/bash
aws_regions=(us-east-1 us-east-2 us-west-1 us-west-2 ap-south-1 ap-northeast-1 ap-northeast-2 ap-southeast-1 ap-southeast-2 eu-central-1 eu-west-1 sa-east-1 eu-west-2 ca-central-1)
echo "Total regions: "${#aws_regions[@]}
ec2_instance_count=0;
rds_instance_count=0;
elb_count=0;
elasticache_count=0;
redshift_count=0;
@acumenix
acumenix / jira_template.md
Created November 6, 2019 08:30 — forked from crittermike/jira_template.md
JIRA ticket template in the 3 C's format (Card, Conversation, and Confirmation)

h2. Card

Also known as the User Story. Explain the requirement in a sentence or two. This should just enough text to identify the requirement, including any crucial information about site/environment.

As a [user role], I want [function], so that [value].

If this doesn't fit as a user story (e.g., a bug ticket), that's fine, just explain it as a concise sentence.

h2. Conversation

function _inspec() {
local curcontext="$curcontext" state line
typeset -A opt_args
local -a _top_level_commands _msccm_commands _scap_commands _secrets_chef_vault_commands _compliance_commands _init_commands _supermarket_commands
_top_level_commands=(
'help:Describe available commands or one specific command'
'json:read all tests in PATH and generate a JSON summary'
'check:verify all tests at the specified PATH'
@acumenix
acumenix / aws-ssm-ec2-proxy-command.sh
Created February 10, 2020 18:31
AWS SSM SSH Proxy Command
#!/usr/bin/env sh
set -eu -o pipefail
######## Usage #################################################################
#
# #1 Install the AWS CLI
# https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
#
# #2 Install the Session Manager Plugin for the AWS CLI
# https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html
@acumenix
acumenix / aws-cloudformation-deploy-watcher.sh
Created February 10, 2020 18:32 — forked from qoomon/aws-cloudformation-deploy-watcher.sh
Watch CloudFormation Events during `aws cloudformation deploy`
#!/usr/bin/env bash
set -e
function echo_help {
echo "usage: $0 [options]"
echo ""
echo "example: aws cloudformation deploy ... | $0 [options]"
echo ""
echo "options:"
echo " --stack-name"
@acumenix
acumenix / openshift-cheatsheet.md
Created February 17, 2020 03:44 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet

My Openshift Cheatsheet

Openshift build secrets for cloning git repos using SSH Keys

  • To create ssh secret:
oc create secret generic sshsecret \
    --from-file=ssh-privatekey=$HOME/.ssh/id_rsa
@acumenix
acumenix / DO425.md
Created March 15, 2020 05:42 — forked from luckylittle/DO425.md
Red Hat DO425 Notes

Red Hat Security: Securing Containers & OpenShift (DO425)

Last update: Tue Jan 14 23:15:49 UTC 2020 by @luckylittle


Objectives

  1. Understand, identify, and work with containerization features
  2. Deploy a preconfigured application and identify crucial features such as namespaces, SELinux labels, and cgroups