Skip to content

Instantly share code, notes, and snippets.

@marvinpinto
marvinpinto / cleanup-ami.py
Created July 6, 2015 12:52
Python script to clean up and update the Jenkins AMIs after a successful Packer run
#!/usr/bin/python
import requests
import os
import boto.ec2
import sys
import re
build_url = os.environ['BUILD_URL']
jenkins_base_url = os.environ['JENKINS_URL']
@glyphobet
glyphobet / engineering_guidelines.md
Last active December 11, 2015 15:38
Technical Maxims
@codification
codification / graphite-client.py
Last active April 29, 2019 17:21
Graphite client in python
import time
import socket
def collect_metric(name, value, timestamp):
sock = socket.socket()
sock.connect( ("localhost", 2003) )
sock.send("%s %d %d\n" % (name, value, timestamp))
sock.close()
def now():
return int(time.time())