Skip to content

Instantly share code, notes, and snippets.

View gonzafirewall's full-sized avatar
🏠
Working from home

Gonzalo gonzafirewall

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python
"""Simple script to merge multiple RRD files together.
Accepts any number of RRD file names as arguments. Produces an "rrdtool dump"
style file on stdout. The last RRD file should have a slot for every possible
record in the resulting merged RRD.
Run something like:
$ python simple-merge-rrd.py filea.rrd fileb.rrd filec.rrd | \
@gonzafirewall
gonzafirewall / boto_sns.py
Last active June 13, 2016 04:57 — forked from gjedeer/boto_sns.py
How to send a push notification directly to device using Python, Boto and SNS
import boto
import boto.exception
import boto.sns
import pprint
import re
def send_push(device_id, body):
region = [r for r in boto.sns.regions() if r.name==u'eu-west-1'][0]
sns = boto.sns.SNSConnection(