This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""pagerduty.py | |
Usage: | |
pagerduty.py trigger [options] <description> [<incident_key>] | |
pagerduty.py acknowledge [options] <description> <incident_key> | |
pagerduty.py resolve [options] <description> <incident_key> | |
Options: | |
-c --conf=FILE A path to a config file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""supercmd | |
Usage: | |
supercmd [-c <file>] list | |
supercmd [-c <file>] show <environment> [<command>] | |
supercmd [-c <file>] keyring [set|get] <environment> <parameter> | |
supercmd [-c <file>] <environment> <command> [<args>...] | |
supercmd -h | --help |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ssdp | |
import requests | |
from xml.etree import ElementTree | |
class RokuApp(object): | |
def __init__(self, app_id, name, version, remote=None): | |
self.id = app_id | |
self.name = name | |
self.version = version | |
self._remote = remote |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2014 Dan Krause | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
class HoverException(Exception): | |
pass | |
class HoverAPI(object): | |
def __init__(self, username, password): | |
params = {"username": username, "password": password} | |
r = requests.post("https://www.hover.com/api/login", params=params) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import socket | |
import struct | |
def enum(*args, **kwargs): | |
kwargs["__getitem__"] = lambda self, key: args[key] | |
return type('Enum', (object,), dict(zip(args, values), **kwargs))() | |
class IPCClient(object): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import json, optparse, sys | |
try: | |
import PIL.Image, PIL.PngImagePlugin | |
except: | |
print >> sys.stderr, "Unable to import Python Imaging Library. Please ensure that it is installed." | |
sys.exit(1) |
NewerOlder