Skip to content

Instantly share code, notes, and snippets.

View aschmidt75's full-sized avatar

Andreas Schmidt aschmidt75

View GitHub Profile

Keybase proof

I hereby claim:

  • I am aschmidt75 on github.
  • I am aschmidt75 (https://keybase.io/aschmidt75) on keybase.
  • I have a public key whose fingerprint is 6BAA 9A33 D6E4 31F8 E8AE 0038 70AA 383A F141 07AD

To claim this, I am signing this object:

@aschmidt75
aschmidt75 / thngstruction_dimmableColorLight_app.c
Created April 25, 2018 13:17
THNG:STRUCTION Application part for a DimmableColorLight on an ESP8266
// ------------------------------------------------------------------------------------------------------------------
// Application Handlers
// TODO: Implement application functionality here
// ------------------------------------------------------------------------------------------------------------------
/** Pushes a new event to the event FIFO */
void wot_events_push(const char *name, const char *description, const char *time);
/** TODO: Implement application-specific code here by filling the app_...(...) functions */
@aschmidt75
aschmidt75 / thngstruction_humidity_bme280_app
Created June 25, 2018 18:25
THNG:STRUCTION - application part for HumidityAlerter template, using a BME280 via I2C.
/**
* Generated by THNG:STRUCTION, provided as a Creative Commons 1.0 Universal (CC0 1.0) Public Domain Dedication.
*
* Code is as-is and without any warranty; without even the implied
* warranty of merchantability or fitness for a particular purpose.
* See LICENSE file or visit https://creativecommons.org/publicdomain/zero/1.0/deed.en
*/
@aschmidt75
aschmidt75 / thingmqttbinding.py
Created July 16, 2018 11:59
Micropython binding class between MQTT client and WebThing API Thing class
import json
from action import Action
from event import Event
from property import Property
from thing import Thing
from value import Value
class ThingMQTTBinding:
@aschmidt75
aschmidt75 / main.py
Created July 16, 2018 12:01
Micropython main script for MQTT/WebThingAPI sample
from action import Action
from event import Event
from property import Property
from thing import Thing
from value import Value
import json
import time
import uuid
@aschmidt75
aschmidt75 / csr_INTERMEDIATE_CA.json
Created March 19, 2019 14:23
Simple setup for CFSSL
{
"CN": "Test-Intermediate CA",
"key": {
"algo": "ecdsa",
"size": 256
},
"names": [
{ "C": "DE", "L": "Koenigswinter", "O": "aschmidt75", "OU": "Tesing Dptd" }
],
"ca": {
@aschmidt75
aschmidt75 / invoke.new.sh
Last active April 4, 2019 14:44
hyperledger fabric-samples test scripts
#!/bin/bash
if [[ $# -ne 1 ]]; then
echo 'Usage: cat inputdata.json | ./invoke.sh FUNCTIONNAME'
exit 1
fi
FUNCTION="$1"
INPUTDATA0=`cat`
INPUTDATA=$(echo $INPUTDATA0 | sed 's/\"/\\"/g')
@aschmidt75
aschmidt75 / pcs.go
Last active April 3, 2019 10:40
Blank Fabric golang chaincode template with logging
/**
*/
package main
import (
"encoding/json"
"log"
"os"
"github.com/hyperledger/fabric/core/chaincode/shim"
@aschmidt75
aschmidt75 / hlf-functions.go
Last active April 8, 2019 10:16
medium-fabric
func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response {
...
}
func (t *SimpleChaincode) invoke(stub shim.ChaincodeStubInterface, args []string) pb.Response {
...
}
func (t *SimpleChaincode) invoke(stub shim.ChaincodeStubInterface, args []string) pb.Response {
...
}