Skip to content

Instantly share code, notes, and snippets.

View pschmitt's full-sized avatar
🧠
spaces > tabs

Philipp Schmitt pschmitt

🧠
spaces > tabs
View GitHub Profile
@pschmitt
pschmitt / keybase.md
Created November 22, 2016 08:15
keybase.md

Keybase proof

I hereby claim:

  • I am pschmitt on github.
  • I am pschmitt (https://keybase.io/pschmitt) on keybase.
  • I have a public key ASCivWMgDoWgg2SEg4WDF3ldZh6jwRrlfyZ0RqnkddfVRAo

To claim this, I am signing this object:

@pschmitt
pschmitt / PKGBUILD
Created March 10, 2017 08:09
PKGBUILD for python2-picamera
# Maintainer: Philipp Schmitt <philipp@schmitt.co>
pkgname=python2-picamera
pkgver=1.13
pkgrel=1
pkgdesc="A pure Python interface to the Raspberry Pi camera module"
arch=('any')
url="https://github.com/waveform80/picamera"
license=('BSD')
depends=('python2')
@pschmitt
pschmitt / docker-compose.yml
Last active May 18, 2017 11:41
docker-compose file for Shinobi with data persistence
version: '2'
services:
shinobi:
container_name: shinobi
build:
context: .
depends_on:
- mysql
restart: always
environment:
@pschmitt
pschmitt / android_ip_webcam.json
Last active May 19, 2017 08:27
Shinobi JSON Templates
{"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 / PKGBUILD
Created July 2, 2017 08:28
AUR teleport 2.2.3
# 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 / roomba.py
Last active July 27, 2017 14:24
Home Assistant - Roomba Vacuum
"""
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 / test.py
Created October 23, 2017 17:12
pyteleloisir snippet. Why is pylint complaining about missing members?
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 / enable-all-automations.sh
Created October 23, 2017 19:19
Enable all automations on your HASS instance
#!/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 / Dockerfile
Created April 3, 2018 12:05
ARMHF Dockerfile for find3
# 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 / living_room_speaker
Created June 9, 2018 15:46
Songpal debug output for Sony SRS-ZR7
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',