Skip to content

Instantly share code, notes, and snippets.

View tleilax's full-sized avatar

Jan-Hendrik Willms tleilax

  • Universität Oldenburg
  • Oldenburg, Germany
View GitHub Profile
@tleilax
tleilax / lightpack2.gist
Created November 20, 2019 12:09 — forked from mlava/lightpack2.gist
Lightpack 2 Bluetooth Low Energy (BLE) characteristics
https://www.kickstarter.com/projects/woodenshark/lightpack-2-ultimate-light-orchestra-for-your-livi/
All characteristics:
handle: 0x0002, char properties: 0x02, char value handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0004, char properties: 0x02, char value handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb
handle: 0x0007, char properties: 0x20, char value handle: 0x0008, uuid: 00002a05-0000-1000-8000-00805f9b34fb
handle: 0x000b, char properties: 0x1a, char value handle: 0x000c, uuid: f5d0bf71-9670-4b25-97f1-861f5ebf0500
handle: 0x000f, char properties: 0x1a, char value handle: 0x0010, uuid: f5d0bf71-9670-4b25-97f1-861f5ebf0400
handle: 0x0013, char properties: 0x12, char value handle: 0x0014, uuid: f5d0bf71-9670-4b25-97f1-861f5ebf0300
<?
interface SomeRole {
public function foo();
public static function bar();
}
class A extends Plugin {}
class B extends A {
@tleilax
tleilax / halt.php
Created July 19, 2013 11:34 — forked from luniki/halt.php
<?
function words($string)
{
return preg_split('/ /', $string, -1, PREG_SPLIT_NO_EMPTY);
}
function halt($status = 200, $headers = array(), $body = '')
{
$args = func_get_args();
$result = array();
@tleilax
tleilax / lib-classes-AlertView.php
Created January 25, 2012 19:20 — forked from luniki/lib-classes-AlertView.php
AlertView4Stud.IP (fixed template)
<?php
/*
* AlertView.php - render an alert message to the user
*
* Copyright (c) 2011 mlunzena@uos.de
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
@tleilax
tleilax / get_barcode_from_image.js
Created January 12, 2012 20:47 — forked from tbtlr/get_barcode_from_image.js
Barcode recognition with JavaScript - Demo: http://bit.ly/djvUoy
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',