Skip to content

Instantly share code, notes, and snippets.

View drnw's full-sized avatar

Neil Williams drnw

View GitHub Profile
@drnw
drnw / kibana.log
Created September 28, 2021 04:29
"Reporting features are not yet ready" in Kibana
This file has been truncated, but you can view the full file.
{"type":"log","@timestamp":"2021-09-27T18:49:54+02:00","tags":["debug","config"],"pid":45398,"message":"Marking config path as handled: execution_context"}
{"type":"log","@timestamp":"2021-09-27T18:49:54+02:00","tags":["debug","config"],"pid":45398,"message":"Marking config path as handled: path"}
{"type":"log","@timestamp":"2021-09-27T18:49:54+02:00","tags":["debug","config"],"pid":45398,"message":"Marking config path as handled: csp"}
{"type":"log","@timestamp":"2021-09-27T18:49:54+02:00","tags":["debug","config"],"pid":45398,"message":"Marking config path as handled: elasticsearch"}
{"type":"log","@timestamp":"2021-09-27T18:49:54+02:00","tags":["debug","config"],"pid":45398,"message":"Marking config path as handled: externalUrl"}
{"type":"log","@timestamp":"2021-09-27T18:49:54+02:00","tags":["debug","config"],"pid":45398,"message":"Marking config path as handled: logging"}
{"type":"log","@timestamp":"2021-09-27T18:49:54+02:00","tags":["debug","config"],"pid":45398,"message":"Marking config path as handled:
@drnw
drnw / Drupal 8 Webform & Jekyll.md
Last active August 6, 2017 14:01
Pretotyping Drupal 8 Webforms in Jekyll

I like using Jekyll to pretotype web portals before they are built in Drupal. Markdown works well for quickly building pages and Jekyll provides a lot of good features for adding site structure. However, I have had to cut alot of HTML when adding forms to the pretotype.

I've searched for other solutions but can't find any. Therefore, I've now embarked on creating my own solution. In a nutshell, I am building pretotype forms in Jekyll using the YAML format specified by the Webform module from Drupal 8. When I am ready to build the site in Drupal I can take the form YAML from Jekyll as the initial cut of the webform.

The simplest thing possible in Jekyll is to use it’s in built support for YAML along with it’s Liquid templating. You'll catch my drift from the files in this Gist.

Moving forwards, I aim to bring Jekyll Data Files and Plugins into the mix.

@drnw
drnw / SQL-Challenge.md
Last active July 28, 2017 07:34
An SQLite view where a row depends on the previous row

A friend asked me for help with writing a database query. SQL is one of my staples but it is not my strongest programming language. So I enjoy getting opportunities to increase my knowledge and experience in this area and was up for the challenge.

The story goes that ACME Energy Co has a number of customers that are disconnecting and reconnecting their prepayment services on a revolving basis. They collect raw data in their database and have some ideas about the management information they would like to extract from this.

Below you'll find more detail on the raw data (aka the input data), the business requirement and the desired output. Finally I give the gist of the solution. As is not uncommon for programmers, I have not commented my code. That is left as an exercise for the reader ;-)

The Input Data

In the input data (see table below) shows line entries for connecting disconnecting and reconnecting on the same or different days (-1 movement is for disconnection and 1 movement is for reconnection).