Skip to content

Instantly share code, notes, and snippets.

View peterneubauer's full-sized avatar

Peter Neubauer peterneubauer

View GitHub Profile

Neo4j Graph Gist

Neo4j GraphGists are a way to share documents including Cypher queries. The queries can be executed in an online console. GraphGists can be used to share examples or ideas or outline a question you have.

You create a GraphGist by creating a GitHub Gist in AsciiDoc and enter the URL to it in the form on this page. The GraphGist is just as private as the GitHub Gist you created. To share a GraphGist, just share the URL the page gets after entering the Gist in the form.

Tracing bus lines with neo4j

The setup

This is a simple bus map, containing one line line1 and line2 and line3, set as a property on the connecting releationships between bus stops.

@peterneubauer
peterneubauer / OneNode
Last active December 21, 2015 20:49 — forked from quagly/OneNode
= One Node Kant
//console
query to create one node with one property
[source,cypher]
----
CREATE (n {name : 'Immanuel'})
----

How to create a GraphGist

You create a GraphGist by creating a GitHub Gist in AsciiDoc and enter the URL to it in the form on this page. Alternatively, you can put an AsciiDoc document in Dropbox and enter the public URL in the form.

This GraphGist shows the basics of using AsciiDoc syntax and a few additions for GraphGists. The additions are entered as comments on their own line. They are: //console for a query console; //hide, //setup and //output to configure a query; //graph and //table to visualize queries and show a result table.

Click on the Page Source button in the menu to see the source for this GraphGist.

Hello Graphgist

create (n{name:'Test'})-[:has]->({name:'Foo'}) return n as node;

The test

H2

Create (a)-[:test]->(b) return a,b

DocGist Example

DocGist is a tool that renders AsciiDoc documents fetched from GitHub gists or other sources. The rendering is performed in the browser using the asciidoctor.js library. The original use case for this was http://gist.neo4j.org/ which has additional features to create examples for the Neo4j graph database.

How To Use

\$`x/x={(1,if x!=0),(text{undefined},if x=0):}`\$

= Product Catalog Peter
Aravind R. Yarram <[email protected]>
v1.0, 17-Sep-2013
== Domain
A product catalog is a collection of products, their categories, manufacturers with their pricing information. Products can be sold separately, included in one or more catalogs or used as substitute products
You can perform the following operations on a product:
Create, Update, Delete (Not recommended, deactivate instead), Deactivate (We should deactivate products that are no longer available instead of deleting them, because they are included in past orders, quotes, or opportunities.), Search etc.

A Simple Meta-Data Model for a Graph Database

Setting up a Meta-Data Framework made shamelessly by Peter

This GraphGist is a quick exploration of a simple meta-data administration which can be used to store the structure of the nodes and relationships in a graph database like neo4j.

The data that is set up here could be used in an application layer to provide tailored

@peterneubauer
peterneubauer / overlap.adoc
Last active December 26, 2015 05:19 — forked from s1ck/overlap.adoc
CREATE INDEX on :User(name)
CREATE (alice:User{name:'Alice'})