Skip to content

Instantly share code, notes, and snippets.

Sean Dague sdague

Block or report user

Report or block sdague

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View waterfurnace.py
"""
Support for Waterfurnace
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.waterfurnace/
"""
import asyncio
from datetime import timedelta
import json
import logging
View waterfurnace.py
"""
Support for Waterfurnace
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.waterfurnace/
"""
import asyncio
from datetime import timedelta
import json
import logging
View request_id.org
View gist:863d31d4dba44193c6095b21566cd7fa
diff --git a/nova/api/openstack/compute/hide_server_addresses.py b/nova/api/openstack/compute/hide_server_addresses.py
index 07f23599df..6ea55be27f 100644
--- a/nova/api/openstack/compute/hide_server_addresses.py
+++ b/nova/api/openstack/compute/hide_server_addresses.py
@@ -59,7 +59,7 @@ class Controller(wsgi.Controller):
return
if 'server' in resp.obj and 'addresses' in resp.obj['server']:
- instance = req.get_db_instance(id)
+ instance = req.get_db_instance(resp.obj['server']['id'])
View ha-state-icon.html
<link rel="import" href="../../../bower_components/polymer/polymer.html">
<link rel="import" href="../../../bower_components/iron-icon/iron-icon.html">
<dom-module id="ha-state-icon">
<template>
<iron-icon icon="[[computeIcon(stateObj)]]"></iron-icon>
</template>
</dom-module>
@sdague
sdague / discover_scenes.py
Created Nov 21, 2016
Discover hue groups and scenes
View discover_scenes.py
#!/usr/bin/env python
# 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, WITHOUT
View hue.py
import os
import json
import logging
# The domain of your component. Should be equal to the name of your component.
DOMAIN = 'hue'
_LOGGER = logging.getLogger(__name__)
_CONFIGURED_BRIDGE = None
View combine-yaml.py
#!/usr/bin/python
import argparse
import yaml
parser = argparse.ArgumentParser(description='Merge parameter yaml files')
parser.add_argument('files', metavar='F', nargs='+',
help='files to process')
View parameters.yaml
# variables in header
x-openstack-request-id:
description: >
A unique ID for tracking the request. The request ID associated with the request
appears in the log lines for that request. By default, the middleware configuration
ensures that the request ID appears in the log files.
in: header
required: false
type: string
x-openstack-request-id_1:
View bashrc.sh
# -*- shell-script -*-
# .bashrc
export TERM=xterm-256color
# this creates a unified history across all bash instances on your
# system. It takes a little getting used to, but is pretty incredible
# in combination with ctrl-R to reverse search history.
shopt -s histappend
export PROMPT_COMMAND="history -a; history -n; $PROMPT_COMMAND"
You can’t perform that action at this time.