Skip to content

Instantly share code, notes, and snippets.

Avatar

Greg Cockburn gergnz

View GitHub Profile
@gergnz
gergnz / export_aws_credetials_from_config.py
Last active Dec 7, 2018
export_aws_credetials_from_config
View export_aws_credetials_from_config.py
#!/usr/bin/env python3
import boto3
import configparser
import logging
import os
import sys
import pprint
LOG = logging.getLogger()
@gergnz
gergnz / docker_data_to_cw.py
Last active Oct 8, 2018
push docker data used to cloudwatch custom metric
View docker_data_to_cw.py
#!/usr/bin/env python
import subprocess
import json
import boto3
import urllib2
instanceid = urllib2.urlopen('http://169.254.169.254/latest/meta-data/instance-id').read()
region = urllib2.urlopen('http://169.254.169.254/latest/meta-data/placement/availability-zone').read()[:-1]
def multiply(multiplier, value):
View keybase.md

Keybase proof

I hereby claim:

  • I am gergnz on github.
  • I am gergnz (https://keybase.io/gergnz) on keybase.
  • I have a public key whose fingerprint is DB50 528C 744F 745F D5F9 9F47 8771 E373 BB31 CC3B

To claim this, I am signing this object:

View -
PLAY [Movember - Build Environment Cloudformation Stack] ***********************
TASK [Check Required Variables] ************************************************
included: /home/gregc/Scratch/dev/movember/ansible/tasks/RequiredVars.yml for localhost
TASK [Fail If Required Variable 'stack_name' Is Not Defined] *******************
skipping: [localhost]
TASK [Fail If Required Variable 'development' Is Not Defined] ******************
View gist:78c3f3985b12d17c33cc
2014/11/28 16:17:55 packer-command-build: 2014/11/28 16:17:55 Debug enabled, so waiting for build to finish: amazon-ebs
2014/11/28 16:17:55 packer-command-build: 2014/11/28 16:17:55 Starting build run: amazon-ebs
2014/11/28 16:17:55 packer-command-build: 2014/11/28 16:17:55 Running builder: amazon-ebs
2014/11/28 16:17:55 ui: ==> amazon-ebs: Inspecting the source AMI...
==> amazon-ebs: Pausing after run of step 'StepSourceAMIInfo'. Press enter to continue. 2014/11/28 16:17:56 ui: ask: ==> amazon-ebs: Pausing after run of step 'StepSourceAMIInfo'. Press enter to continue.
2014/11/28 16:18:17 ui: scan err: unexpected newline
==> amazon-ebs: Creating temporary keypair: packer 54780583-5f30-391c-3cf4-336cdd6cc1b6
2014/11/28 16:18:17 ui: ==> amazon-ebs: Creating temporary keypair: packer 54780583-5f30-391c-3cf4-336cdd6cc1b6
amazon-ebs: Saving key for debug purposes: ec2_amazon-ebs.pem