Skip to content

Instantly share code, notes, and snippets.

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

Johan Louwers louwersj

🏠
Working from home
View GitHub Profile
@louwersj
louwersj / V001_GW_API.py
Last active January 24, 2019 09:35
Buggy working version for the Goodwe Inverter API
import json
import logging
import time
from datetime import datetime, timedelta
import requests
''' this work is based upon the groundwork done by Mark Ruys on his original GW_API '''
__author__ = "Mark Ruys"
__copyright__ = "Copyright 2017, Mark Ruys"
__license__ = "MIT"
/**
* Copyright (c) 2018, Johan Louwers. Licensed under GNU GENERAL PUBLIC LICENSE
* code based upon the Oracle example viewModel file incidents.js for Oracle JET.
*/
define(['ojs/ojcore', 'knockout', 'jquery'],
function(oj, ko, $) {
this.someVariable0 = ko.observable();
<!--
Copyright (c) 2018, Johan Louwers. Licensed under GNU GENERAL PUBLIC LICENSE
code based upon the Oracle example view file incidents.html for Oracle JET.
-->
<div class="oj-hybrid-padding">
<h1>data-bind example</h1>
<div>
<!--
Copyright (c) 2018, Johan Louwers. Licensed under GNU GENERAL PUBLIC LICENSE
code based upon the Oracle example view file incidents.html for Oracle JET.
-->
<div class="oj-hybrid-padding">
<h1>data-bind example</h1>
<div>
/**
* Copyright (c) 2018, Johan Louwers. Licensed under GNU GENERAL PUBLIC LICENSE
* code based upon the Oracle example viewModel file incidents.js for Oracle JET.
*/
define(['ojs/ojcore', 'knockout', 'jquery'],
function(oj, ko, $) {
this.someVariable0 = ko.observable();
@louwersj
louwersj / a1bb0b71dc3fa68dee2403a267d2630309b7b5ea.xml
Created February 26, 2018 16:40
jing-trang package xml for YUM repo
<?xml version="1.0" encoding="UTF-8"?>
<package pkgid="a1bb0b71dc3fa68dee2403a267d2630309b7b5ea" name="jing-trang" arch="src">
<version epoch="0" ver="20091111" rel="14.el7" />
<changelog author="Jan Pokorný &lt;jpokorny@redhat.com&gt; - 20091111-14" date="1389096000">
- Resync with recent spec file changes in Fedora by Ville Skyttä:
- BuildRequire ant instead of -trax (non-EL).
- Depend on headless JRE where available.
- Fix build (#1048867) and depend on headless JRE on EL7
</changelog>
@louwersj
louwersj / bubbelchart_optimized
Created February 24, 2018 10:54
Original Oracle JET bubbleSeries chart data
/* chart data -- optimized */
var bubbleSeries = [{"name" : "Identity Fraud", "items" : [{"x":15, "y":25, "z":5}, {"x":25, "y":30, "z":12}, {"x":25, "y":45, "z":12}]},
{"name" : "Credential Fraud", "items" : [{"x":15, "y":15, "z":8}, {"x":20, "y":35, "z":14}, {"x":40, "y":55, "z":35}]},
{"name" : "Data Fraud", "items" : [{"x":10, "y":10, "z":8}, {"x":18, "y":55, "z":10}, {"x":40, "y":50, "z":18}]},
{"name" : "Hack attempt", "items" : [{"x": 8, "y":20, "z":6}, {"x":11, "y":30, "z": 8}, {"x":30, "y":40, "z":15}]}];
@louwersj
louwersj / bubbelchart_original
Created February 24, 2018 10:52
Original Oracle JET bubbleSeries chart data
/* chart data */
var bubbleSeries = [{name : "Series 1", items : [{x:15, y:25, z:5}, {x:25, y:30, z:12}, {x:25, y:45, z:12}]},
{name : "Series 2", items : [{x:15, y:15, z:8}, {x:20, y:35, z:14}, {x:40, y:55, z:35}]},
{name : "Series 3", items : [{x:10, y:10, z:8}, {x:18, y:55, z:10}, {x:40, y:50, z:18}]},
{name : "Series 4", items : [{x: 8, y:20, z:6}, {x:11, y:30, z: 8}, {x:30, y:40, z:15}]}];
<script src="js/libs/custom/go.js"></script>
<script id="code">
// This variation on ForceDirectedLayout does not move any selected Nodes
// but does move all other nodes (vertexes).
function ContinuousForceDirectedLayout() {
go.ForceDirectedLayout.call(this);
this._isObserving = false;
}
go.Diagram.inherit(ContinuousForceDirectedLayout, go.ForceDirectedLayout);
/** @override */
@louwersj
louwersj / OracleJETDataBindExample
Created February 4, 2018 19:15
Example for a Oracle JET data-bind
<div class="oj-flex-bar-middle oj-sm-align-items-baseline">
<span role="img" class="oj-icon demo-oracle-icon" title="Oracle Logo" alt="Oracle Logo"></span>
<h1 class="oj-sm-only-hide oj-web-applayout-header-title" title="Application Name" data-bind="text: appName"></h1>
</div>