Skip to content

Instantly share code, notes, and snippets.

View devdazed's full-sized avatar

Russ Bradberry devdazed

View GitHub Profile
@devdazed
devdazed / slack-pagerduty-oncall.py
Last active February 11, 2026 20:43
Updates a Slack User Group with People that are on call in PagerDuty
#!/usr/bin/env python
from __future__ import print_function
import json
import logging
from urllib2 import Request, urlopen, URLError, HTTPError
from base64 import b64decode
@devdazed
devdazed / gist:749d046b1a1da8869d68
Last active February 12, 2016 17:12
Jupyter on DSE

On your client machine

As the root user

  1. Install DSE
  2. In the cassandra.yml file, ensure the datacenter and cluster match your analytics datacenter
  3. In the cassandra-env.sh file add this configuration line toward the bottom JVM_OPTS="$JVM_OPTS -Dcassandra.join_ring=false" This will make your DSE node a coordinator only, it will not own any data. You can use this node to submit jobs to DSE locally without the need to know which is the master node.
  4. start DSE
@devdazed
devdazed / ri-audit.py
Created December 7, 2016 15:38
EC2 Reserved Instance auditing
import boto.ec2
def get_running_instances(region):
ec2 = boto.ec2.connect_to_region(region)
instances = [i for r in ec2.get_all_reservations() for i in r.instances]
return filter(lambda i: i.state == 'running', instances)
def get_reserved_instances(region):
ec2 = boto.ec2.connect_to_region(region)
reserved_instances = ec2.get_all_reserved_instances()