Skip to content

Instantly share code, notes, and snippets.

View peterneubauer's full-sized avatar

Peter Neubauer peterneubauer

View GitHub Profile

The simplest GraphGist

This Neo4j GrgaphGist shows the basics of using AsciiDoctor syntax and a few additions for GraphGists, namely //console for a live console, and //table1, //graph1 and //output1 comment elements to visualize queries with the corresponding number.

Click on the upper navbar to see the source for this Gist.

Show a live query console

//console

@peterneubauer
peterneubauer / H1 ASCIIDOCTOR problem
Last active December 19, 2015 00:18
= ASCIIDOC = problem
= This first heading is not displayed, @mojavelinux! =
This part under the first heading _is_ rendered
== The level2 heading is rendered ==
Click on the upper navbar to see the source for this.
// console
== Page view query ==
// console
This is the setup
[source,cypher]
----
CREATE (pn1:p_n { name:'pn1',oldid:1 })
CREATE (vn1:v_n { name:'vn1', oldid:2 })
== Order relationship types ==
This is the setup
// console
[source,cypher]
----
CREATE (c1 { name:'c1' })
++++
<script src="https://gist.github.com/peterneubauer/5877172.js"></script>
++++
== Script HTML inclusion not working ==
Trying to embed the Javscript tag for this gist below, it seems things are not inserted at top level and thus not working?
= Money Laundering with graphs
== The setup
Let's set up some data in the Money Laundering industry.
//setup
//hide
[source,cypher]
----
== Max you rock.
++++
<a href = "http://maxdemarzi.com/2013/06/26/neo4j-2-0-is-coming/" target="_blank"><img src="http://maxdemarzidotcom.files.wordpress.com/2013/06/neoiscoming.jpg?w=580"/></a>
++++
[source,cypher]
----
CREATE ({name:'MaxDeMarzi'})-[:WRITES]->(blogs{name:'awesome blogs'})
CREATE (blogs)-[:ABOUT]->({name:'neo4j'})

The Neo4j GraphGist Console

This is a sample GraphGist explaining some of the base concepts of sharing graphs using the Cypher query language.

CREATE ({name:'you'})-[:SEE]->({name:'This GraphGist'})-[:FORK_ON_GITHUB]->(your_gistfile{name:'Your Gist'})
CREATE (your_gistfile)-[:INSERT_ID_HERE]->({name:'Your GraphGist'})

The Neo4j GraphGist Console

This is a sample GraphGist explaining some of the base concepts of sharing graphs using the Cypher query language.

CREATE ({name:'you'})-[:SEE]->({name:'This GraphGist'})-[:FORK_ON_GITHUB]->(your_gistfile{name:'Your Gist'})
CREATE (your_gistfile)-[:INSERT_ID_HERE]->({name:'Your GraphGist'})

Upgrading to a Neo4j database from 1.9 to 2.0

This Gist is inspired by Neo4j 2.0 is coming blog post by Max De Marzi

The Neo4j 1.9 Sample Data - Movies

Let’s use a sample dataset related to the Movie Industry (Movies, Actors, Directors, etc.) that looks like: