Skip to content

Instantly share code, notes, and snippets.

💭
Not much

Philipp Schmitt pschmitt

💭
Not much
Block or report user

Report or block pschmitt

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
@pschmitt
pschmitt / living_room_speaker
Created Jun 9, 2018
Songpal debug output for Sony SRS-ZR7
View living_room_speaker
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',
@pschmitt
pschmitt / Dockerfile
Created Apr 3, 2018
ARMHF Dockerfile for find3
View Dockerfile
# 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
@pschmitt
pschmitt / enable-all-automations.sh
Created Oct 23, 2017
Enable all automations on your HASS instance
View enable-all-automations.sh
#!/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" \
@pschmitt
pschmitt / test.py
Created Oct 23, 2017
pyteleloisir snippet. Why is pylint complaining about missing members?
View test.py
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))
@pschmitt
pschmitt / Dockerfile
Created Oct 10, 2017
ARMHF Dockerfile for zabbix-proxy-sqlite3
View Dockerfile
FROM resin/raspberrypi3-alpine:3.4
LABEL maintainer "Alexey Pustovalov <alexey.pustovalov@zabbix.com>"
ARG APK_FLAGS_COMMON="-q"
ARG APK_FLAGS_PERSISTANT="${APK_FLAGS_COMMON} --clean-protected --no-cache"
ARG APK_FLAGS_DEV="${APK_FLAGS_COMMON} --no-cache"
ARG DB_TYPE=sqlite3
ENV TERM=xterm
ENV MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL
@pschmitt
pschmitt / roomba.py
Last active Jul 27, 2017
Home Assistant - Roomba Vacuum
View roomba.py
"""
Support for Wi-Fi enabled iRobot Roombas.
For more details about this platform, please refer to the documentation
https://home-assistant.io/components/vacuum.roomba/
"""
from functools import partial
import asyncio
import logging
import os
@pschmitt
pschmitt / proxmox-get-vm-ip.sh
Created Jul 15, 2017
Get the IP address of a VM hosted on Proxmox
View proxmox-get-vm-ip.sh
#!/usr/bin/env bash
usage() {
echo "$(basename $0) VM"
}
get_vm_id() {
qm list | awk '/'"${1}"'/ { print $1 }'
}
@pschmitt
pschmitt / PKGBUILD
Created Jul 2, 2017
AUR teleport 2.2.3
View PKGBUILD
# Maintainer: Johannes Pfrang <johannespfrang+arch @ gmail.com>
# Co-Maintainer: Emanuele 'Lele aka eldios' Calo' <xeldiosx@gmail.com>
pkgname=teleport
pkgver=2.2.3
pkgrel=1
pkgdesc="Modern SSH server for teams managing distributed infrastructure"
arch=('x86_64')
url="https://gravitational.com/teleport"
license=('Apache')
@pschmitt
pschmitt / android_ip_webcam.json
Last active May 19, 2017
Shinobi JSON Templates
View android_ip_webcam.json
{"mode":"start","mid":"SxENKrZAHr","name":"IP Webcam","type":"h264","protocol":"http","host":"ip-webcam.lan","port":"8080","path":"/video","ext":"mp4","fps":"1","width":"640","height":"480","details":"{\"fatal_max\":\"\",\"notes\":\"\",\"rtsp_transport\":\"tcp\",\"muser\":\"USERNAME\",\"mpass\":\"PASSWORD\",\"port_force\":null,\"sfps\":\"1\",\"aduration\":\"\",\"stream_type\":\"b64\",\"stream_mjpeg_clients\":\"\",\"stream_vcodec\":\"libx264\",\"stream_acodec\":\"no\",\"hls_time\":\"2\",\"preset_stream\":\"ultrafast\",\"hls_list_size\":\"3\",\"signal_check\":\"10\",\"signal_check_log\":\"0\",\"stream_quality\":\"15\",\"stream_fps\":\"2\",\"stream_scale_x\":\"640\",\"stream_scale_y\":\"480\",\"svf\":\"\",\"snap\":null,\"snap_fps\":\"\",\"snap_scale_x\":\"\",\"snap_scale_y\":\"\",\"vcodec\":\"libx264\",\"crf\":\"1\",\"preset_record\":\"\",\"acodec\":\"none\",\"dqf\":\"0\",\"cutoff\":\"15\",\"vf\":\"\",\"timestamp\":\"0\",\"timestamp_font\":\"\",\"timestamp_font_size\":\"10\",\"timestamp_color\":\"white\",\"times
@pschmitt
pschmitt / docker-compose.yml
Last active May 18, 2017
docker-compose file for Shinobi with data persistence
View docker-compose.yml
version: '2'
services:
shinobi:
container_name: shinobi
build:
context: .
depends_on:
- mysql
restart: always
environment:
You can’t perform that action at this time.