Skip to content

Instantly share code, notes, and snippets.

View cice's full-sized avatar
🏠
Working from home

Marian Theisen cice

🏠
Working from home
  • Cisco Systems
  • Düsseldorf, Germany
  • X @em_tyson
View GitHub Profile
@andrey-yantsen
andrey-yantsen / README.md
Last active April 1, 2020 19:54
Workaround for openhab/openhab2-addons#3522

This script monitors openhab log for messages like Terminating homekit connection and New homekit connection and saving connection state to specified MQTT. I'm running it with following parameters:

python3 homekiter.py --mqtt_host wb.286.su --mqtt_topic_prefix /custom/homekit_connected --logfile /usr/src/logs/openhab.log

In the openhab I have created following things and items:

Thing exec:command:openhab_refresh_homekit [ command="ssh -i /openhab/conf/id_rsa openhab@localhost -p 8101 bundle:refresh org.openhab.io.homekit", interval=0, autorun=false ]
@fernandoaleman
fernandoaleman / fix-libv8-mac.txt
Created May 5, 2016 15:14
Fixing libv8 and therubyracer on Mac
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install
@Willmo36
Willmo36 / rx.observable.to$q.js
Created May 26, 2015 16:00
RxJS to$q for angular 1.2.XXX
rx.Observable.prototype.to$q = function(onFulfiled, onRejected) {
var source = this;
var deferred = $q.defer();
var value, hasValue = true;
source.subscribe(function(v) {
value = v;
hasValue = true;
}, deferred.reject, function () {
hasValue && deferred.resolve(value);
@csexton
csexton / xvfb.conf
Created February 28, 2012 20:02
Ubuntu Upstart Script for Xvfb
description "Xvfb X Server"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
exec /usr/bin/Xvfb :99 -screen 0 1024x768x24