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
wifi-scan() { | |
setopt localoptions pipefail errreturn | |
local device="$(wifnames | tail -1)" | |
local raw | |
zparseopts -D -K -E \ | |
r=raw -raw=raw | |
if [[ -z "$device" ]] |
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
{ | |
"meta": { | |
"theme": "elegant", | |
"canonical": "https://gist.github.com/pschmitt/0ab646d4a39b16393db354c6e1082305", | |
"version": "0.1", | |
"easter-egg": "Hello, recruiter! You made it. I'm honnestly amazed you actually just ran this random command you've seen on a resume! Cheers!" | |
}, | |
"basics": { | |
"name": "Philipp Schmitt", | |
"label": "Cloud Automation Engineer / DevOps", |
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 |