Skip to content

Instantly share code, notes, and snippets.

View Paulchen-Panther's full-sized avatar
:electron:

Paulchen-Panther

:electron:
  • hyperion-project
View GitHub Profile
@Paulchen-Panther
Paulchen-Panther / Effect.cpp
Last active October 3, 2017 18:25
PyErr_Occurred
// Python include
#include <Python.h>
#include <frameobject.h>
// stl includes
#include <iostream>
#include <sstream>
#include <cmath>
// Qt includes
@Paulchen-Panther
Paulchen-Panther / Effect.cpp
Last active October 5, 2017 13:27
PyErr_Occurred
// Python include
#include <Python.h>
#include <frameobject.h>
// stl includes
#include <iostream>
#include <sstream>
#include <cmath>
// Qt includes
@Paulchen-Panther
Paulchen-Panther / service.py
Created January 2, 2018 22:35
Python callback
from plugin import *
import time
def onCompStateChanged(comp, state):
print(comp, state)
def onSettingsChanged(settings):
None # or do somthing else with settings
log("Register callback functions ...")
@Paulchen-Panther
Paulchen-Panther / fire2012.json
Last active January 2, 2018 22:47
Fire2012 for Hyperion
{
"name" : "Fire 2012",
"script" : "fire2012.py",
"args" :
{
"fps" : 60,
"cooling" : 55,
"sparking" : 120
}
}
@Paulchen-Panther
Paulchen-Panther / service.py
Created January 9, 2018 18:21
Python callback
from enum import Enum
from plugin import *
import time
import random
def onCompStateChangedAllEvents(comp, state):
log("onCompStateChangedAllEvents called")
def onCompStateChangedSpecificEvents(comp, state):
log("specific event " + comp + " called")
@Paulchen-Panther
Paulchen-Panther / ServerDiscover.java
Created May 31, 2018 16:45
Discover Hyperion Server over Zeroconf
package com.abrenoch.hyperiongrabber.wizard;
import android.content.Context;
import android.net.nsd.NsdManager;
import android.net.nsd.NsdServiceInfo;
import android.util.Log;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@Paulchen-Panther
Paulchen-Panther / Ambilight.ino
Created August 23, 2016 20:53
Ambilight teensy
#define USE_OCTOWS2811
#include<OctoWS2811.h>
#include<FastLED.h>
// Led strip lengths, (0 if there is no strip):
#define STRIP_1 123
#define STRIP_2 69
#define STRIP_3 123
#define STRIP_4 69
#define STRIP_5 0
@Paulchen-Panther
Paulchen-Panther / QJsonUtils.h
Created December 29, 2016 16:23
delete or modify JSON value
#pragma once
#include <string>
#include <stdlib.h>
// QT include
#include <QString>
#include <QJsonObject>
#include <QJsonValue>
#include <QJsonArray>
@Paulchen-Panther
Paulchen-Panther / example.js
Created April 6, 2020 16:10
example Json-Editor
var cfg = {
"first": {
"label": "Habitat",
"children": ["water", "air", "ground"]
},
"water": {
"title": "Animal",
"label": "In Water",
"children": ["fish", "squid", "crab"]
},
@Paulchen-Panther
Paulchen-Panther / compile_LE.sh
Created September 13, 2020 13:01
Script for compiling Hyperion.NG inside a Docker container on LibreElec (RPi)
#!/bin/sh
# Script for compiling Hyperion.NG inside a Docker container on LibreElec (RPi)
# Fixed variables
DOCKER="docker"
# Set welcome message
echo '*******************************************************************************'
echo 'This script will compile Hyperion.NG inside a Docker container on LibreELEC'
echo 'Created by Paulchen-Panther - hyperion-project.org - the official Hyperion source.'