Skip to content

Instantly share code, notes, and snippets.

@rvanbruggen
Forked from nawroth/tutorial-graphgist
Last active December 19, 2015 04:39

Revisions

  1. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,6 @@ CREATE beerbrand-[:IS_A]->beertype

    //graph1

    == Customize the query with the neo4j console==
    == Customize the query with the neo4j console

    //console
  2. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,6 @@ CREATE beerbrand-[:IS_A]->beertype

    //graph1

    -- Customize the query with the neo4j console--
    == Customize the query with the neo4j console==

    //console
  3. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,6 @@ CREATE beerbrand-[:IS_A]->beertype

    //graph1


    -- Customize the query with the neo4j console--

    //console
  4. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 1 addition and 7 deletions.
    8 changes: 1 addition & 7 deletions My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -15,12 +15,6 @@ CREATE beerbrand-[:IS_A]->beertype

    //graph1

    [source,cypher]
    ----
    MATCH
    beerbrand:beerbrand(name="BeerBrand")-[:HAS_ALCOHOL_PERCENTAGE]->(alcperc)-[:PRECEDES]-(otheralcperc)
    RETURN otheralcperc;
    ----


    //console
    //
  5. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ CREATE beerbrand-[:IS_A]->beertype
    [source,cypher]
    ----
    MATCH
    beerbrand:beerbrand(name:'BeerBrand')-[:HAS_ALCOHOL_PERCENTAGE]->(alcperc)-[:PRECEDES]-(otheralcperc)
    beerbrand:beerbrand(name="BeerBrand")-[:HAS_ALCOHOL_PERCENTAGE]->(alcperc)-[:PRECEDES]-(otheralcperc)
    RETURN otheralcperc;
    ----

  6. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ CREATE beerbrand-[:IS_A]->beertype
    [source,cypher]
    ----
    MATCH
    beerbrand:beerbrand(name="BeerBrand")-[:HAS_ALCOHOL_PERCENTAGE]->(alcperc)-[:PRECEDES]-(otheralcperc)
    beerbrand:beerbrand(name:'BeerBrand')-[:HAS_ALCOHOL_PERCENTAGE]->(alcperc)-[:PRECEDES]-(otheralcperc)
    RETURN otheralcperc;
    ----

  7. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ CREATE beerbrand-[:IS_A]->beertype
    [source,cypher]
    ----
    MATCH
    (beerbrand:beerbrand(name="BeerBrand"))-[:HAS_ALCOHOL_PERCENTAGE]->(alcperc)-[:PRECEDES]-(otheralcperc)
    beerbrand:beerbrand(name="BeerBrand")-[:HAS_ALCOHOL_PERCENTAGE]->(alcperc)-[:PRECEDES]-(otheralcperc)
    RETURN otheralcperc;
    ----

  8. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ CREATE beerbrand-[:IS_A]->beertype
    [source,cypher]
    ----
    MATCH
    (beer:beerbrand(name="BeerBrand"))-[:HAS_ALCOHOL_PERCENTAGE]->(alcperc)-[:PRECEDES]-(otheralcperc)
    (beerbrand:beerbrand(name="BeerBrand"))-[:HAS_ALCOHOL_PERCENTAGE]->(alcperc)-[:PRECEDES]-(otheralcperc)
    RETURN otheralcperc;
    ----

  9. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ CREATE beerbrand-[:IS_A]->beertype
    [source,cypher]
    ----
    MATCH
    beer:beerbrand(name="BeerBrand")-[:HAS_ALCOHOL_PERCENTAGE]-(alcperc)-[:PRECEDES]-(otheralcperc)
    (beer:beerbrand(name="BeerBrand"))-[:HAS_ALCOHOL_PERCENTAGE]->(alcperc)-[:PRECEDES]-(otheralcperc)
    RETURN otheralcperc;
    ----

  10. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -16,3 +16,11 @@ CREATE beerbrand-[:IS_A]->beertype
    //graph1

    [source,cypher]
    ----
    MATCH
    beer:beerbrand(name="BeerBrand")-[:HAS_ALCOHOL_PERCENTAGE]-(alcperc)-[:PRECEDES]-(otheralcperc)
    RETURN otheralcperc;
    ----

    //console
    //
  11. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,18 @@
    = My first try at a graphgist =
    = My simple BeerGraph Datamodel =

    Let's see if I can create a graphgist for my beers

    [source,cypher]
    ----
    CREATE (brewery{name:'Brewery'}), (beerbrand{name:'BeerBrand'}), (alcperc{name:'Percentage'}), (beertype{name:'BeerType'})
    CREATE (alcpercbefore{name:'PercentageBefore'}), (alcpercafter{name:'PercentageAfter'})
    CREATE (brewery:brewery{name:'Brewery'}), (beerbrand:beerbrand{name:'BeerBrand'}), (alcperc:alcoholpercentage{name:'Percentage'}), (beertype:beertype{name:'BeerType'})
    CREATE (alcpercbefore:alcoholpercentage{name:'PercentageBefore'}), (alcpercafter:alcoholpercentage{name:'PercentageAfter'})
    CREATE brewery-[:BREWS]->beerbrand<-[:HAS_ALCHOLHOL_PERCENTAGE]-alcperc
    CREATE alcpercbefore-[:PRECEDES]->alcperc-[:PRECEDES]->alcpercafter
    CREATE beerbrand-[:IS_A]->beertype
    ----

    * Hover over the nodes to see the +name+ node property in the Graph below.
    * Hit the RUN button to execute the query in the console down below.

    //graph1

    [source,cypher]
  12. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,11 @@ Let's see if I can create a graphgist for my beers

    [source,cypher]
    ----
    CREATE (brewery{name:'Brewery'})-[:BREWS]->(beerbrand{name:'BeerBrand'})<-[:HAS_ALCHOLHOL_PERCENTAGE]-(alcperc{name:'Percentage'})
    CREATE (alcpercbefore{name:'PercentageBefore'}-[:PRECEDES]->alcperc-[:PRECEDES]->(alcpercafter{name:'PercentageAfter'})
    CREATE beerbrand-[:IS_A]->(beertype{name:'BeerType'})
    CREATE (brewery{name:'Brewery'}), (beerbrand{name:'BeerBrand'}), (alcperc{name:'Percentage'}), (beertype{name:'BeerType'})
    CREATE (alcpercbefore{name:'PercentageBefore'}), (alcpercafter{name:'PercentageAfter'})
    CREATE brewery-[:BREWS]->beerbrand<-[:HAS_ALCHOLHOL_PERCENTAGE]-alcperc
    CREATE alcpercbefore-[:PRECEDES]->alcperc-[:PRECEDES]->alcpercafter
    CREATE beerbrand-[:IS_A]->beertype
    ----

    * Hover over the nodes to see the +name+ node property in the Graph below.
  13. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -5,8 +5,8 @@ Let's see if I can create a graphgist for my beers
    [source,cypher]
    ----
    CREATE (brewery{name:'Brewery'})-[:BREWS]->(beerbrand{name:'BeerBrand'})<-[:HAS_ALCHOLHOL_PERCENTAGE]-(alcperc{name:'Percentage'})
    CREATE (alcpercbefore{name:'Percentage-1'}-[:PRECEDES]->(alcperc)-[:PRECEDES]->(alcpercafter{name:'Percentage+1'})
    CREATE (beerbrand)-[:IS_A]->(beertype{name:'BeerType'})
    CREATE (alcpercbefore{name:'PercentageBefore'}-[:PRECEDES]->alcperc-[:PRECEDES]->(alcpercafter{name:'PercentageAfter'})
    CREATE beerbrand-[:IS_A]->(beertype{name:'BeerType'})
    ----

    * Hover over the nodes to see the +name+ node property in the Graph below.
  14. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ Let's see if I can create a graphgist for my beers
    [source,cypher]
    ----
    CREATE (brewery{name:'Brewery'})-[:BREWS]->(beerbrand{name:'BeerBrand'})<-[:HAS_ALCHOLHOL_PERCENTAGE]-(alcperc{name:'Percentage'})
    CREATE (alcpercbefore{name:'Percentage-1'}-[:PRECEDES]-(alcperc)-[:PRECEDES]->(alcpercafter{name:'Percentage+1'})
    CREATE (alcpercbefore{name:'Percentage-1'}-[:PRECEDES]->(alcperc)-[:PRECEDES]->(alcpercafter{name:'Percentage+1'})
    CREATE (beerbrand)-[:IS_A]->(beertype{name:'BeerType'})
    ----

  15. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -4,13 +4,13 @@ Let's see if I can create a graphgist for my beers

    [source,cypher]
    ----
    CREATE (brewery{name:'Brewery'})-[:BREWS]->(beerbrand{name:'BeerBrand'})-[:HAS_ALCHOLHOL_PERCENTAGE]->(alcperc{name:'Percentage'})
    CREATE (alcpercbefore{name:'Percentage-1'}-[:PRECEDES]->(alcpercafter{name:'Percentage+1'})
    CREATE (beerbrand)-[:IS_A]-(beertype{name:'BeerType'})
    CREATE (brewery{name:'Brewery'})-[:BREWS]->(beerbrand{name:'BeerBrand'})<-[:HAS_ALCHOLHOL_PERCENTAGE]-(alcperc{name:'Percentage'})
    CREATE (alcpercbefore{name:'Percentage-1'}-[:PRECEDES]-(alcperc)-[:PRECEDES]->(alcpercafter{name:'Percentage+1'})
    CREATE (beerbrand)-[:IS_A]->(beertype{name:'BeerType'})
    ----

    * Hover over the nodes to see the +name+ node property in the Graph below.
    * Hit the RUN button to execute the query in the console down below.

    // graph1
    //graph1

  16. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -4,8 +4,8 @@ Let's see if I can create a graphgist for my beers

    [source,cypher]
    ----
    CREATE (brewery{name:'Brewery'})-[:BREWS]->(beerbrand{name:'BeerBrand'})-[:HAS_ALCHOLHOL_PERCENTAGE]->(alcperc{name:'%'})
    CREATE (alcpercbefore{name:'%-1'}-[:PRECEDES]->(alcpercafter{name:'&+1'})
    CREATE (brewery{name:'Brewery'})-[:BREWS]->(beerbrand{name:'BeerBrand'})-[:HAS_ALCHOLHOL_PERCENTAGE]->(alcperc{name:'Percentage'})
    CREATE (alcpercbefore{name:'Percentage-1'}-[:PRECEDES]->(alcpercafter{name:'Percentage+1'})
    CREATE (beerbrand)-[:IS_A]-(beertype{name:'BeerType'})
    ----

  17. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion My first BeerGist
    Original file line number Diff line number Diff line change
    @@ -12,5 +12,5 @@ CREATE (beerbrand)-[:IS_A]-(beertype{name:'BeerType'})
    * Hover over the nodes to see the +name+ node property in the Graph below.
    * Hit the RUN button to execute the query in the console down below.

    //graph1
    // graph1

  18. rvanbruggen renamed this gist Jul 1, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  19. rvanbruggen revised this gist Jul 1, 2013. 1 changed file with 5 additions and 69 deletions.
    74 changes: 5 additions & 69 deletions tutorial-graphgist
    Original file line number Diff line number Diff line change
    @@ -1,80 +1,16 @@
    = The Neo4j GraphGist Console =
    = My first try at a graphgist =

    This is a sample GraphGist explaining some of the base concepts of sharing graphs using http://docs.neo4j.org/chunked/milestone/cypher-query-lang.html[the Cypher query language].
    Let's see if I can create a graphgist for my beers

    [source,cypher]
    ----
    CREATE ({name:'you'})-[:SEE]->({name:'This GraphGist'})-[:FORK_ON_GITHUB]->(your_gistfile{name:'Your Gist'})
    CREATE (your_gistfile)-[:INSERT_ID_HERE]->({name:'Your GraphGist'})
    CREATE (brewery{name:'Brewery'})-[:BREWS]->(beerbrand{name:'BeerBrand'})-[:HAS_ALCHOLHOL_PERCENTAGE]->(alcperc{name:'%'})
    CREATE (alcpercbefore{name:'%-1'}-[:PRECEDES]->(alcpercafter{name:'&+1'})
    CREATE (beerbrand)-[:IS_A]-(beertype{name:'BeerType'})
    ----

    * Hover over the nodes to see the +name+ node property in the Graph below.
    * Hit the RUN button to execute the query in the console down below.

    //graph1

    == How can I do this? ==

    Try forking and editing http://gist.neo4j.org/#5861321[A very simple GraphGist] to get started.

    Other interesting GraphGists:

    * http://gist.neo4j.org/#5878518[Money Laundering]

    This document is a GraphGist, see https://gist.github.com/nawroth/5880880[This Gist] for the source of this Gist, or click on the Navigation Bar Item.

    == The Rules ==

    * GraphGists are shared via Github, and referenced by their Gist ID, e.g. the Github Gist https://gist.github.com/nawroth/5880880 can be referred to as the Graph Gist http://gist.neo4j.org/#5880880.
    * Everything is valid http://asciidoctor.org/docs/asciidoc-quick-reference/[AsciiDoc syntax], with some magic comments thrown in for extra fun.
    * Cypher queries are added as source blocks, use +[source,cypher]+ as the denominator.
    * All cypher statements are executed against a live, empty Neo4j database in the order they appear. The data is retained between the queries.
    * You can request a live console by using the comment tag +// console+
    * You can request a graph visualization referring to the graph after the corresponding query number, e.g. +// graph1+ will insert the visualization of the graph after the first query block is run.

    == An example Gist ==

    Below see the markup for some examples.

    // The following is a placeholder for a Cypher console.

    // console


    //a cypher query, getting the number 2

    [source,cypher]
    ----
    CREATE (n{name:'first node'});
    ----

    Some more text after the first Query, and using an image:

    http://chinwag.com/files/logos/events/2221/neo4j_logo.png

    Now, let's insert the visualization for the second query.

    //The following is a placeholder for the graph visualisation for query 2.

    //graph2

    [source,cypher]
    ----
    CREATE (movie:Movie { title:"Matrix", year: 1999 })
    CREATE (movie)<-[:ACTED_IN { role:"Neo" }]-(:Actor { name:"Keanu Reeves", age: 48 })
    CREATE (movie)<-[:DIRECTED]-(:Director { name:"Wachowski" }),(movie)<-[:RATED { stars: 5 }]-(:User { login:"Michael" })
    RETURN 1;
    ----

    Let's do it for the above query, too.

    //graph3

    A non-working query:

    [source,cypher]
    ----
    CREATE (movie:Movie RETURN 1;
    ----

    //graph4
  20. @nawroth nawroth revised this gist Jun 28, 2013. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions tutorial-graphgist
    Original file line number Diff line number Diff line change
    @@ -48,10 +48,9 @@ Below see the markup for some examples.
    CREATE (n{name:'first node'});
    ----

    Some more text after the first Query, using an external image,
    ++++
    <img src="http://chinwag.com/files/logos/events/2221/neo4j_logo.png"/>
    ++++
    Some more text after the first Query, and using an image:

    http://chinwag.com/files/logos/events/2221/neo4j_logo.png

    Now, let's insert the visualization for the second query.

  21. @nawroth nawroth revised this gist Jun 28, 2013. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions tutorial-graphgist
    Original file line number Diff line number Diff line change
    @@ -15,17 +15,17 @@ CREATE (your_gistfile)-[:INSERT_ID_HERE]->({name:'Your GraphGist'})

    == How can I do this? ==

    Try forking and editing http://neo4j-contrib.github.io/graphgist/#5861321[A very simple GraphGist] to get started.
    Try forking and editing http://gist.neo4j.org/#5861321[A very simple GraphGist] to get started.

    Other interesting GraphGists:

    * http://neo4j-contrib.github.io/graphgist/#5878518[Money Laundering]
    * http://gist.neo4j.org/#5878518[Money Laundering]

    This document is a GraphGist, see https://gist.github.com/nawroth/5880880[This Gist] for the source of this Gist, or click on the Navigation Bar Item.

    == The Rules ==

    * GraphGists are shared via Github, and referenced by their Gist ID, e.g. the Github Gist https://gist.github.com/nawroth/5880880 can be referred to as the Graph Gist http://neo4j-contrib.github.io/graphgist/#5880880.
    * GraphGists are shared via Github, and referenced by their Gist ID, e.g. the Github Gist https://gist.github.com/nawroth/5880880 can be referred to as the Graph Gist http://gist.neo4j.org/#5880880.
    * Everything is valid http://asciidoctor.org/docs/asciidoc-quick-reference/[AsciiDoc syntax], with some magic comments thrown in for extra fun.
    * Cypher queries are added as source blocks, use +[source,cypher]+ as the denominator.
    * All cypher statements are executed against a live, empty Neo4j database in the order they appear. The data is retained between the queries.
  22. @nawroth nawroth revised this gist Jun 27, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tutorial-graphgist
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ CREATE (your_gistfile)-[:INSERT_ID_HERE]->({name:'Your GraphGist'})
    ----

    * Hover over the nodes to see the +name+ node property in the Graph below.
    * Hit the RUN button to execute the query in the <<cypherdoc-console,console>> down below.
    * Hit the RUN button to execute the query in the console down below.

    //graph1

  23. @nawroth nawroth revised this gist Jun 27, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tutorial-graphgist
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@ This document is a GraphGist, see https://gist.github.com/nawroth/5880880[This G

    == The Rules ==

    * GraphGists are shared via Github, and referenced by their Gist ID, e.g. the Github GIST https://gist.github.com/nawroth/5880880 can be referred to as the Graph Gist http://neo4j-contrib.github.io/graphgist/#5880880.
    * GraphGists are shared via Github, and referenced by their Gist ID, e.g. the Github Gist https://gist.github.com/nawroth/5880880 can be referred to as the Graph Gist http://neo4j-contrib.github.io/graphgist/#5880880.
    * Everything is valid http://asciidoctor.org/docs/asciidoc-quick-reference/[AsciiDoc syntax], with some magic comments thrown in for extra fun.
    * Cypher queries are added as source blocks, use +[source,cypher]+ as the denominator.
    * All cypher statements are executed against a live, empty Neo4j database in the order they appear. The data is retained between the queries.
  24. @nawroth nawroth revised this gist Jun 27, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tutorial-graphgist
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ CREATE (your_gistfile)-[:INSERT_ID_HERE]->({name:'Your GraphGist'})
    ----

    * Hover over the nodes to see the +name+ node property in the Graph below.
    * Hit the RUN button to execute the query in the <<console>> down below.
    * Hit the RUN button to execute the query in the <<cypherdoc-console,console>> down below.

    //graph1

  25. @nawroth nawroth revised this gist Jun 27, 2013. 1 changed file with 14 additions and 25 deletions.
    39 changes: 14 additions & 25 deletions tutorial-graphgist
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,6 @@
    = The Neo4j GraphGist Console. =
    = The Neo4j GraphGist Console =


    This is a sample GraphGist explaining some of the base concepts of sharing graphs using http://docs.neo4j.org/chunked/snapshot/cypher-query-lang.html[the Cypher query language].
    This is a sample GraphGist explaining some of the base concepts of sharing graphs using http://docs.neo4j.org/chunked/milestone/cypher-query-lang.html[the Cypher query language].

    [source,cypher]
    ----
    @@ -22,23 +21,22 @@ Other interesting GraphGists:

    * http://neo4j-contrib.github.io/graphgist/#5878518[Money Laundering]

    This document is a GraphGist, see https://gist.github.com/peterneubauer/5857879[This Gist] for the source of this Gist, or click on the Navigation Bar Item.

    This document is a GraphGist, see https://gist.github.com/nawroth/5880880[This Gist] for the source of this Gist, or click on the Navigation Bar Item.

    == The Rules ==

    * GraphGists are shared via Github, and referenced by their Gist ID, e.g. the Github GIST https://gist.github.com/peterneubauer/5857879[https://gist.github.com/peterneubauer/5857879] can be referred to as the Graph GIST http://neo4j-contrib.github.io/graphgist/#5857879[http://neo4j-contrib.github.io/graphgist/#5857879]
    * everything is valid ASCIIDOC syntax, with some special comments and naming conventions make this work
    * Cypher queries are enumerated in the order they appear, starting at +1+, as source blocks, using +[source,cypher]+ as the denominator.
    * before rendering the page, all cypher statements are run against a live, empty Neo4j database in the order they appear
    * GraphGists are shared via Github, and referenced by their Gist ID, e.g. the Github GIST https://gist.github.com/nawroth/5880880 can be referred to as the Graph Gist http://neo4j-contrib.github.io/graphgist/#5880880.
    * Everything is valid http://asciidoctor.org/docs/asciidoc-quick-reference/[AsciiDoc syntax], with some magic comments thrown in for extra fun.
    * Cypher queries are added as source blocks, use +[source,cypher]+ as the denominator.
    * All cypher statements are executed against a live, empty Neo4j database in the order they appear. The data is retained between the queries.
    * You can request a live console by using the comment tag +// console+
    * You can request a graph vizualisation refering to the graph after the corresponding query number, e.g. +// graph1+ will insert the visualization of the graph after the first query block is run
    * You can request a graph visualization referring to the graph after the corresponding query number, e.g. +// graph1+ will insert the visualization of the graph after the first query block is run.

    == An example Gist ==

    Below see the markup for some examples.

    // Following is a placeholder for a live console.
    // The following is a placeholder for a Cypher console.

    // console

    @@ -50,15 +48,14 @@ Below see the markup for some examples.
    CREATE (n{name:'first node'});
    ----


    Some more text after the first Query, using and external image,
    Some more text after the first Query, using an external image,
    ++++
    <img src="http://chinwag.com/files/logos/events/2221/neo4j_logo.png"/>
    ++++

    Now, let's insert the visualization for the first query.
    Now, let's insert the visualization for the second query.

    //The following is a placeholder for the graph visualisation for query 1
    //The following is a placeholder for the graph visualisation for query 2.

    //graph2

    @@ -70,23 +67,15 @@ CREATE (movie)<-[:DIRECTED]-(:Director { name:"Wachowski" }),(movie)<-[:RATED {
    RETURN 1;
    ----

    Let's do it for the this query, too
    Let's do it for the above query, too.

    //graph3

    [[bonus]]
    == Bonus ==

    you can even insert the graphs at different places, repeatedly

    //graph1


    A non-working query:

    [source,cypher]
    ----
    CREATE (movie:Movie RETURN 1;
    ----

    //graph4
    //graph4
  26. @nawroth nawroth revised this gist Jun 27, 2013. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions tutorial-graphgist
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    == The Neo4j GraphGist Console. ==
    = The Neo4j GraphGist Console. =


    This is a sample GraphGist explaining some of the base concepts of sharing graphs using http://docs.neo4j.org/chunked/snapshot/cypher-query-lang.html[the Cypher query language].
    @@ -14,7 +14,7 @@ CREATE (your_gistfile)-[:INSERT_ID_HERE]->({name:'Your GraphGist'})

    //graph1

    === How can I do this? ===
    == How can I do this? ==

    Try forking and editing http://neo4j-contrib.github.io/graphgist/#5861321[A very simple GraphGist] to get started.

    @@ -25,15 +25,16 @@ Other interesting GraphGists:
    This document is a GraphGist, see https://gist.github.com/peterneubauer/5857879[This Gist] for the source of this Gist, or click on the Navigation Bar Item.


    === The Rules ===
    == The Rules ==

    * GraphGists are shared via Github, and referenced by their Gist ID, e.g. the Github GIST https://gist.github.com/peterneubauer/5857879[https://gist.github.com/peterneubauer/5857879] can be referred to as the Graph GIST http://neo4j-contrib.github.io/graphgist/#5857879[http://neo4j-contrib.github.io/graphgist/#5857879]
    * everything is valid ASCIIDOC syntax, with some special comments and naming conventions make this work
    * Cypher queries are enumerated in the order they appear, starting at +1+, as source blocks, using +[source,cypher]+ as the denominator.
    * before rendering the page, all cypher statements are run against a live, empty Neo4j database in the order they appear
    * You can request a live console by using the comment tag +// console+
    * You can request a graph vizualisation refering to the graph after the corresponding query number, e.g. +// graph1+ will insert the visualization of the graph after the first query block is run

    === An example Gist ===
    == An example Gist ==

    Below see the markup for some examples.

    @@ -74,7 +75,7 @@ Let's do it for the this query, too
    //graph3

    [[bonus]]
    === Bonus ===
    == Bonus ==

    you can even insert the graphs at different places, repeatedly

  27. Peter Neubauer revised this gist Jun 27, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tutorial-graphgist
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ CREATE (your_gistfile)-[:INSERT_ID_HERE]->({name:'Your GraphGist'})

    //graph1

    === Getting started ===
    === How can I do this? ===

    Try forking and editing http://neo4j-contrib.github.io/graphgist/#5861321[A very simple GraphGist] to get started.

  28. Peter Neubauer revised this gist Jun 27, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tutorial-graphgist
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    == The Neo4j GraphGist Console. ==


    This is a sample GraphGist explaining some of the base concepts of sharing graphs.
    This is a sample GraphGist explaining some of the base concepts of sharing graphs using http://docs.neo4j.org/chunked/snapshot/cypher-query-lang.html[the Cypher query language].

    [source,cypher]
    ----
  29. Peter Neubauer revised this gist Jun 27, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tutorial-graphgist
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ Try forking and editing http://neo4j-contrib.github.io/graphgist/#5861321[A very

    Other interesting GraphGists:

    * http://neo4j-contrib.github.io/graphgist/#5857879[Money Laundering]
    * http://neo4j-contrib.github.io/graphgist/#5878518[Money Laundering]

    This document is a GraphGist, see https://gist.github.com/peterneubauer/5857879[This Gist] for the source of this Gist, or click on the Navigation Bar Item.

  30. Peter Neubauer revised this gist Jun 27, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions tutorial-graphgist
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,10 @@ CREATE (your_gistfile)-[:INSERT_ID_HERE]->({name:'Your GraphGist'})

    Try forking and editing http://neo4j-contrib.github.io/graphgist/#5861321[A very simple GraphGist] to get started.

    Other interesting GraphGists:

    * http://neo4j-contrib.github.io/graphgist/#5857879[Money Laundering]

    This document is a GraphGist, see https://gist.github.com/peterneubauer/5857879[This Gist] for the source of this Gist, or click on the Navigation Bar Item.