Skip to content

Instantly share code, notes, and snippets.

View ikwattro's full-sized avatar

Christophe Willemsen ikwattro

View GitHub Profile
@ikwattro
ikwattro / output.txt
Created December 5, 2014 23:52
koans build
airbook:koans ikwattro$ /usr/local/ant/bin/ant -v
Apache Ant(TM) version 1.9.3 compiled on December 23 2013
Trying the default build file: build.xml
Buildfile: /Users/ikwattro/dev/formations/neo4j-tutorial/koans/build.xml
Detected Java version: 1.8 in: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre
Detected OS: Mac OS X
parsing buildfile /Users/ikwattro/dev/formations/neo4j-tutorial/koans/build.xml with URI = file:/Users/ikwattro/dev/formations/neo4j-tutorial/koans/build.xml
Project base dir set to: /Users/ikwattro/dev/formations/neo4j-tutorial/koans
parsing buildfile jar:file:/usr/local/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/usr/local/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Importing file /Users/ikwattro/dev/formations/neo4j-tutorial/koans/settings/install-ant-eclipse.xml from /Users/ikwattro/dev/formations/neo4j-tutorial/koans/build.xml
@ikwattro
ikwattro / cypher.statement
Created December 5, 2014 23:42
get subgraph cypher
match (n)-[r:KNOWS]-(m) WITH {node:n,neighbours:collect({type:type(r),node1:m})} as neighbours
UNWIND {neighbours} AS rels
create (node)-[:rels.type]->(node1)
@ikwattro
ikwattro / post.md
Last active April 28, 2025 04:36
Discover Graph Databases with Neo4j & PHP

Discover Graph Databases with Neo4j and PHP

Graph databases are now one of the core technologies of companies dealing with highly connected data.

Business graphs, social graphs, knowledge graphs, interest graphs and media graphs are frequently in the (technology) news. And for a reason. The graph model represents a very flexible way of handling relationships in your data. And graph databases provide fast and efficient storage, retrieval and querying for it.

Neo4j, the most popular graph database, has proven that ability to deal with massive amount of high connected data in many use-cases.

@ikwattro
ikwattro / hashtags.csv
Created October 17, 2014 22:26
CSV of Hashtags, handy for testing or faking purposes
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
#live
#iwannaget
#love
#nature
#1000likes
#letmewin
#tryingtobreakthedeal
#emotion
#juss
#cricket

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@ikwattro
ikwattro / README.md
Last active August 29, 2015 14:07
Heroku & NeoClient

Using with PHP and NeoClient

Require the NeoClient dependency in your composer.json :

{
  "require": {
    "neoxygen/neoclient": "~1.5"
    }
}
@ikwattro
ikwattro / graphenedbsite.php
Last active August 29, 2015 14:06
GrapheneDB driver snippet for NeoClient
<?php
require_once('vendor/autoload.php');
use Neoxygen\NeoClient\Client;
// Assuming "default" is your connection alias
$client = new Client();
$client->addConnection('default','https', '{graphenedb_url}', '{graphenedb_port}', true, '{user}', '{password}')
->build();
@ikwattro
ikwattro / index.php
Created September 21, 2014 19:47
Cloning subtree of graph in PHP
<?php
$clearQuery = 'MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE r,n';
$setupQuery = "CREATE (root:Root)
CREATE (n1:Child {id:'left1'})-[:CHILD_OF]->(root)
CREATE (n2:Child {id:'right1'})-[:CHILD_OF]->(root)
CREATE (n3:Child {id:'left2'})-[:CHILD_OF]->(n1)
CREATE (n4:Child {id:'left3'})-[:CHILD_OF]->(n3)";
@ikwattro
ikwattro / dream_structure.txt
Created September 15, 2014 13:40
future structure
- src/
-- Acme/
--- Command/
---- GetRootCommand.php
---- PostHelloCommand.php
--- Connection/
---- SingleConnection.php
--- DependencyInjection/
---- AcmeExtension.php
---- Configuration.php
<?php
namespace Acme\Integration\DependencyInjection;
use Acme\DependencyInjection\AcmeExtension;
class AcmeBundleExtension extends AcmeExtension
{
public function load(array $configs, ContainerBuilder $container)