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 / kafka
Created December 31, 2017 08:04
Apache Kafka startup script
#! /bin/bash
# simple startup script for Apache Kafka on Oracle Linux 7.
# Do remember to add this as a service with chkconfig
### BEGIN INIT INFO
# Provides: kafka
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications with XML.</description>
</book>
{
"catalog": {
"book": [{
"@id": "bk101",
"author": "Gambardella, Matthew",
"title": "XML Developer's Guide",
"genre": "Computer",
"price": "44.95",
"publish_date": "2000-10-01",
"description": "An in-depth look at creating applications \n with XML."
@louwersj
louwersj / weblogic_error.txt
Created January 24, 2018 14:59
Weblogic installation error
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at jdk.internal.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:260)
@louwersj
louwersj / local.conf
Created January 24, 2018 15:07
content for /etc/fonts/local.conf to resolve Oracle universal installer error.
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>serif</family>
<prefer><family>Utopia</family></prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer><family>Utopia</family></prefer>
@louwersj
louwersj / appController.js
Created February 4, 2018 19:03
Basic Oracle JET appController.js
/**
* Copyright (c) 2014, 2017, Oracle and/or its affiliates.
* The Universal Permissive License (UPL), Version 1.0
*/
/*
* Your application specific code will go here
*/
define(['ojs/ojcore', 'knockout', 'ojs/ojknockout'],
function(oj, ko) {
function ControllerViewModel() {
@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>
<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 / 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}]}];
@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}]}];