Skip to content

Instantly share code, notes, and snippets.

View ptone's full-sized avatar

Preston Holmes ptone

View GitHub Profile
@ptone
ptone / vpcgraph.py
Last active August 29, 2015 13:56 — forked from j3tm0t0/vpcgraph.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import boto.ec2
import boto.vpc
def dprint (body):
# print >> sys.stderr, body
return
@ptone
ptone / vpcgraph.py
Created February 20, 2014 17:30 — forked from j3tm0t0/vpcgraph.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import boto.ec2
import boto.vpc
def dprint (body):
# print >> sys.stderr, body
return
@ptone
ptone / gist:9119047
Created February 20, 2014 17:30 — forked from apsoto/gist:2869888
require 'rubygems'
require 'activesupport'
require 'aws'
require 'graphviz'
ec2 = Aws::Ec2.new(ENV["AMAZON_ACCESS_KEY_ID"], ENV["AMAZON_SECRET_ACCESS_KEY"])
g = ec2.describe_security_groups
gv = GraphViz::new( "structs", "type" => "graph" )

Keybase proof

I hereby claim:

  • I am ptone on github.
  • I am ptone (https://keybase.io/ptone) on keybase.
  • I have a public key whose fingerprint is B518 8473 483A CADF 7504 A871 41FE AC7C 7B5A 8F8E

To claim this, I am signing this object:

@ptone
ptone / ctab
Created September 26, 2014 19:04
A quick CLI tool to work with too many tabs
#!/bin/bash
export BROWSER='Google Chrome'
stab "$@"
#!/usr/bin/env python
# encoding: utf-8
"""
Created by Preston Holmes on 2009-10-28.
preston@ptone.com
Copyright (c) 2009
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
#!/usr/bin/env python
# encoding: utf-8
"""
Created by Preston Holmes on 2009-11-18.
preston@ptone.com
Copyright (c) 2009
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
#!/usr/bin/env python
# encoding: utf-8
import sys
import os
from optparse import OptionParser,OptionGroup
from pygments import highlight
from pygments.lexers import DiffLexer
from pygments.formatters import HtmlFormatter
from subprocess import Popen, call, STDOUT, PIPE
#!/usr/bin/env python
# encoding: utf-8
"""
Created by Preston Holmes on 2010-01-07.
preston@ptone.com
Copyright (c) 2010
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
#!/usr/bin/env python
# encoding: utf-8
"""
Created by Preston Holmes on 2010-01-13.
preston@ptone.com
Copyright (c) 2010
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the