Skip to content

Instantly share code, notes, and snippets.

View ikwattro's full-sized avatar

Christophe Willemsen ikwattro

View GitHub Profile
@ikwattro
ikwattro / gist.adoc
Created January 23, 2015 14:30
Gist test

CHANGE THIS TO YOUR GIST TITLE

Setup

Your Gist Title

Setup

@ikwattro
ikwattro / ggist.adoc
Created January 22, 2015 23:33
Graphgist

Your Gist Title

:labels:Person,Skill,Company,Country

airbook:commandr ikwattro$ curl -vvv -H "Accept: application/json" -H "Content-TypRETURN count(n)", "parameters":[]]}' http://localhost:7474/db/data/transaction/commit
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 7474 (#0)
> POST /db/data/transaction/commit HTTP/1.1
> User-Agent: curl/7.38.0
> Host: localhost:7474
> Accept: application/json
> Content-Type: application/json
> Content-Length: 74
// Enter the day you would like to create
WITH { day: 18, month: 1, year: 2014 } as dayMap
// Merge hours in a day
MERGE (thisDay:Day { day: dayMap.day, month: dayMap.month, year: dayMap.year })
MERGE (firstHour:Hour { day: dayMap.day, month: dayMap.month, year: dayMap.year, hour: 1 })
CREATE (thisDay)-[:FIRST]->(firstHour)
FOREACH (i IN tail(range(1, 24)) |
MERGE (thishour:Hour { day: dayMap.day, month: dayMap.month, year: dayMap.year, hour: i })
MERGE (lasthour:Hour { day: dayMap.day, month: dayMap.month, year: dayMap.year, hour: i - 1 })
Warning
Wolpertingers are known to nest in server racks. Enter at your own risk.
@ikwattro
ikwattro / stops.csv
Created January 10, 2015 13:58
ratps stops
stop_id stop_code stop_name stop_desc stop_lat stop_lon location_type parent_station
3747933 CHARONNE - CHANZY 44 RUE FAIDHERBE - 75111 48.85300708608977 2.38311038576739 0
3747934 FAIDHERBE - CHALIGNY 12 RUE DE REUILLY - 75112 48.84958214338538 2.384932204803839 0
3747935 FAIDHERBE - CHALIGNY 1 RUE DE REUILLY - 75112 48.84973489237593 2.3850276733110722 0
3747936 REUILLY - DIDEROT FACE 31 RUE DE REUILLY - 75112 48.84764923526842 2.3864011455122154 0
3747930 VOLTAIRE - LEON BLUM 6 BIS PLACE LEON BLUM - 75111 48.85828368072684 2.380527147829766 0
3747931 GYMNASE JAPY 35 RUE RICHARD LENOIR - 75111 48.85600953662013 2.381410546966965 0
3747932 CHARONNE - CHANZY 41 R FAIDHERBE - 75111 48.852881366237064 2.38283789208868 0
3747938 MONTGALLET 64 RUE DE REUILLY - 75112 48.84417842225694 2.390210573103677 0
3747937 REUILLY - DIDEROT 35 BIS-35 RUE DE REUILLY - 75112 48.84690293855667 2.3872038743131854 0
<?php
$result = $client->sendCypherQuery($q, $p)->getResult();
$app = $result->get('app');
$users = $result->get('users');
Object Orbit Alt Program Manned Launched Status
Sputnik 1 Elliptical LEO Soviet N 04 Oct 1957 0
Mir Circular LEO Soviet Y 19 Feb 1986 0
ISS Circular LEO International Y 20 Nov 1998 1
SkyLab Circular LEO NASA Y 14 May 1973 0
Telstar 1 Elliptical MEO International N 10 Jul 1962 0
GPS USA-66 Circular MEO International N 26 Nov 1990 1
Vela 1A Circular HEO NASA N 17 Oct 1963 0
Landsat 8 Circular LEO NASA N 11 Feb 2013 1
Hubble Circular LEO International N 08 Feb 1990 1
@ikwattro
ikwattro / baseUser.php
Created December 30, 2014 12:02
simple entity generation
<?php
namespace Ikwattro\Play\Model\Base;
use GraphAware\Vertix\Vertix;
use Ikwattro\Play\Model\Base\UserMap;
use Neoxygen\NeoClient\Exception\HttpException;
class BaseUser
{