This file contains 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
""" | |
Support for Sherlock.bike GPS trackers. | |
For more details about this platform, please refer to the documentation at | |
https://home-assistant.io/components/device_tracker.sherlock_bike/ | |
""" | |
from datetime import timedelta | |
import logging | |
import voluptuous as vol |
This file contains 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 bash | |
usage() { | |
echo "Usage: $(basename "$0") ARGS" | |
echo | |
echo "Arguments:" | |
echo " -v|-h Vertical or horizontal split" | |
echo " --fail Error out if there is no SSH session in the current pane" | |
echo " --verbose Display a message when spawning a new SSH session/pane" | |
echo " --no-shell Don't spawn a shell after the SSH command" |
This file contains 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
"""Nuki.io lock platform.""" | |
from abc import ABC, abstractmethod | |
from datetime import timedelta | |
import logging | |
from pynuki import NukiBridge, NukiLock, NukiOpener | |
from requests.exceptions import RequestException | |
import voluptuous as vol | |
from homeassistant.components.lock import ( |
This file contains 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
# Usage | |
# | |
# - service: python_script.set_state | |
# data_template: | |
# entity_attr: | |
# nuki_id: '{{ trigger.json.nukiId }}' | |
# state: '{{ trigger.json.stateName }}' | |
# # Attributes | |
# battery_critical: '{{ trigger.json.batteryCritical }}' | |
# updated_by: python_script.set_state |
This file contains 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
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<fontconfig> | |
<match target="font"> | |
<edit mode="assign" name="rgba"> | |
<const>rgb</const> | |
</edit> | |
</match> | |
<match target="font"> | |
<edit mode="assign" name="hinting"> |
This file contains 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
map <C-b> :buffer<Space> |
This file contains 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
Setting debug level to 2 | |
DEBUG:root:Using endpoint http://sony-living-room-speaker.lan:54480/sony | |
DEBUG:songpal.device:Endpoint: http://sony-living-room-speaker.lan:54480/sony | |
DEBUG:songpal.device:Guide endpoint: http://sony-living-room-speaker.lan:54480/sony/guide | |
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): sony-living-room-speaker.lan | |
DEBUG:urllib3.connectionpool:http://sony-living-room-speaker.lan:54480 "POST /sony/guide HTTP/1.1" 200 5630 | |
DEBUG:songpal.device:Got getSupportedApiInfo: {'id': 1, | |
'result': [[{'apis': [{'name': 'getMethodTypes', | |
'versions': [{'version': '1.0'}]}, | |
{'name': 'getVersions', |
This file contains 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
# docker build -t find3 . | |
# mkdir /tmp/find3 | |
# docker run -p 11883:1883 -p 8003:8003 -v /tmp/find3:/data -t find3 | |
FROM resin/rpi-raspbian:stretch | |
ENV GOLANG_VERSION 1.10 | |
ENV PATH="/usr/local/go/bin:/usr/local/work/bin:${PATH}" | |
ENV GOPATH /usr/local/work |
This file contains 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 bash | |
HA_URL="$1" | |
HA_PASSWORD="$2" | |
_api_call() { | |
if [[ -n "$3" ]] | |
then # WITH DATA | |
curl -qs -X "$1" \ | |
-H "x-ha-access: $HA_PASSWORD" \ |
This file contains 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 asyncio | |
import pyteleloisirs | |
loop = asyncio.get_event_loop() | |
prg = loop.run_until_complete(pyteleloisirs.async_get_current_program('M6')) | |
dur = pyteleloisirs.get_program_duration(prg) | |
rem = pyteleloisirs.get_remaining_time(prg) | |
print('{} - Remaining time: {}/{}'.format(prg.get('name'), rem, dur)) |