Skip to content

Instantly share code, notes, and snippets.

View bobveznat's full-sized avatar

Bob Van Zant bobveznat

  • Bracket Computing
View GitHub Profile
@bobveznat
bobveznat / nvz_upload.py
Created June 25, 2012 04:39
NVZ uploader
import boto
import cStringIO
import gzip
import hashlib
import logging
import os
import sys
from boto.s3.connection import S3Connection
from boto.s3.key import Key
@bobveznat
bobveznat / gist:8423992
Created January 14, 2014 19:15
vagrant ssh cert error
DEBUG ssh: Checking whether SSH is ready...
INFO subprocess: Starting process: ["/Applications/VMware Fusion.app/Contents/Library/vmrun", "list"]
DEBUG subprocess: Command not in installer, not touching env vars.
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: Total running VMs: 2
/Users/bvanzant/work/nucleus/.vagrant/machines/dev-01/vmware_fusion/c60f1c06-8bbb-4ed6-845e-4cc8d31df5f2/precise64.vmx
/Users/bvanzant/work/nucleus/.vagrant/machines/dev-02/vmware_fusion/238312f5-b4f0-441d-b7b8-f19ec8a91de2/precise64.vmx
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31999
DEBUG subprocess: Exit status: 0
DEBUG vmware: VM state requested. Current state: running

Keybase proof

I hereby claim:

  • I am bobveznat on github.
  • I am bobvanzant (https://keybase.io/bobvanzant) on keybase.
  • I have a public key whose fingerprint is B07F 1A09 14AB 04BC A126 78A8 07D2 656A F242 1964

To claim this, I am signing this object:

@bobveznat
bobveznat / flow_to_sumo.py
Last active September 8, 2016 17:23
Send VPC Flow Logs to Sumo Logic via AWS' lambda
"""An AWS lambda function for pushing VPC flow logs to Sumo Logic.
To use this you need to do a few things:
- In the Sumo Logic console create a new Hosted / HTTP collector (https://service.sumologic.com/help/Configuring_an_HTTP_Source.htm)
- Save the secret URL that is generated, you'll need it below
- Enable flow logs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/flow-logs.html)
- Create a new Lambda function. If you're doing this in the console:
- Skip picking a blueprint
- Function name: FlowLogsToSumo
@bobveznat
bobveznat / main.go
Created December 5, 2018 16:02
Using the AWS S3 golang SDK with Google default credentials
package main
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"golang.org/x/oauth2/google"