Skip to content

Instantly share code, notes, and snippets.

View nawroth's full-sized avatar

Anders Nawroth nawroth

View GitHub Profile

Failed merge

Here’s a failed merge that would just render as normal text:

Source:

|==========================================
| hpc          | The High-Performance Cache. Provides means of assigning a specific amount of memory to dedicate to caching loaded nodes and relationships.

Keybase proof

I hereby claim:

  • I am nawroth on github.
  • I am nawroth (https://keybase.io/nawroth) on keybase.
  • I have a public key whose fingerprint is 0B8E 3712 631C B720 A210 437F 7762 533E 3F71 7B33

To claim this, I am signing this object:

= (Product) Hierarchy GraphGist =
This gist is a complement to http://blog.bruggen.com/2014/03/using-neo4j-to-manage-and-calculate.html[blogpost that I wrote] about managing hierarchical data structures in http://www.neo4j.org[neo4j]..
In this example, we are using a "product hierarchy", essentially holding information about the composition of a product (what is it made of, how many of the components are used, and at the lowest level, what is the price of these components). The model looks like this:
image::http://1.bp.blogspot.com/-XIjEXWHpNmc/Uzbhuoo-9xI/AAAAAAABNWE/7zYyn3Vl3i0/s3200/Screen+Shot+2014-03-29+at+16.04.35.png[]
Note that in the graphgist, I have cut the tree depth to 5 levels (product to costs) instead of 6 in the blogpost - and that I also reduced the width of the tree to make it manageable in a gist.

Document Title

Note
Asciidoctor supports font-based admonition icons, powered by Font Awesome!
Note
Note
Tip
Tip
Important
Important
@nawroth
nawroth / colors.adoc
Last active August 29, 2015 14:02
Color test

Color test

CREATE (x:T1),(:T2),(:T3),(:T4),(:T5),(:T6),(:T7),(:T8),(:T9),(:T10),(:T11),(:T12)
WITH x
MATCH (n)
RETURN n;
= Donations to German parties
:neo4j-version: 2.1.0
Data from here: https://github.com/pudo/kompromatron
== Sample Data Set
//setup
[source,cypher]
= The news reads us data in Neo4J
Data by: http://newsreadsus.okfn.de/
== Intro
Interesting data created by http://newsreadsus.okfn.de/.
I converted the data from the links.json file and converted it into two simple csv files.
//setup
[source,cypher]
----
LOAD CSV FROM "https://dl.dropboxusercontent.com/s/riz5hp32mz0jzed/sites.csv?dl=1" AS csvline
@nawroth
nawroth / doctests.adoc
Last active August 29, 2015 13:56
location of doc tests in neo4j

Neo4j Documentation

The Neo4j Manual is versioned and released together with the product. An overview of parts of the documentation workflow is found in the manual itself, in the chapter Writing Neo4j Documentation. We use several different approaches to verify our documentation by tests running in CI when the product is built. Testing as much as possible of examples especially makes sense, as we also provide ways to interactively play with Neo4j, see for example Create nodes and relationships.

The documentation toolchain also makes sure that all cross references have valid targets.

The core tools for our documentation are AsciiDoc and DocBook.

@nawroth
nawroth / attributes.adoc
Last active December 31, 2015 06:19
attributes test

Testing document attributes

{my-attribute}

{someattribute}

Using labels

Labels is a convenient way to group nodes together. They are used to enhance queries, define constraints and indexes.

The following will give an example of how to use labels. Let’s start out adding a constraint — in this case we decided that all Movie nodes should have a unique title.