Skip to content

Instantly share code, notes, and snippets.

View ikwattro's full-sized avatar

Christophe Willemsen ikwattro

View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
6291101540715
6291101540326
6291101540708
1013110071555
4343282075554
0622356218320
0622356218337
5060121278950
5055923706893
8904247200983
841247106298
850466004308
640206517898
7174117314190
7663995800838
8718868020116
6959144027081
8718868020970
8718868020888
8718868020734
@ikwattro
ikwattro / dummy-web-server.py
Created February 22, 2017 22:00
Dummy Web Server in Python 3
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost
@ikwattro
ikwattro / docker.sh
Created February 15, 2017 21:53 — forked from mneedham/docker.sh
function config {
mkdir -p /tmp/ce/$1/conf
cat > /tmp/ce/$1/conf/neo4j.conf << EOF
unsupported.dbms.edition=enterprise
dbms.mode=CORE
dbms.security.auth_enabled=false
dbms.memory.heap.initial_size=512m
dbms.memory.heap.max_size=512m
dbms.memory.pagecache.size=100M
<?php
use GraphAware\Neo4j\OGM\Annotations as OGM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @OGM\Node(label="Character")
*/
class Character
{
/**
@ikwattro
ikwattro / User.php
Created November 15, 2016 08:11
User domain model PHP OGM
<?php
use GraphAware\Neo4j\OGM\Annotations as OGM;
/**
* @OGM\Node(label="User")
*/
class User
{
/**
@ikwattro
ikwattro / cypher.cql
Created October 10, 2016 00:50
[Cypher] Split class name based on camelCase structure
WITH "RequestMappingException.java" AS class
WITH split(split(class, ".")[0], "") as stringArray
WITH
stringArray,
filter(x IN range(0, size(stringArray)-1) WHERE stringArray[x] =~ "[A-Z]") + size(stringArray) as uppers
UNWIND range(1, size(uppers)-1) AS i
RETURN reduce(text="", x IN range(uppers[i-1], uppers[i]-1) | text + stringArray[x])
╒════════════════════════════════════════════════════╤════╕
│repo.full_name │freq│
╞════════════════════════════════════════════════════╪════╡
│elastic/elasticsearch │92 │
├────────────────────────────────────────────────────┼────┤
│elastic/kibana │44 │
├────────────────────────────────────────────────────┼────┤
│elastic/beats │32 │
├────────────────────────────────────────────────────┼────┤
│elastic/elasticsearch-php │16 │
@ikwattro
ikwattro / query.gql
Created September 15, 2016 15:23
graphql github
# Type queries into this side of the screen, and you will
# see intelligent typeaheads aware of the current GraphQL type schema,
# live syntax, and validation errors highlighted within the text.
# We'll get you started with a simple query showing your username!
query {
repositoryOwner(login: "neo4j") {
repository(name: "neo4j") {
stargazers(first:3, after:"ODk5NDA3") {
totalCount
@ikwattro
ikwattro / file.txt
Created September 15, 2016 13:24
top microsoft github members contributions
╒════════════════════════════════════════════════════╤═════╕
│repo │score│
╞════════════════════════════════════════════════════╪═════╡
│Microsoft/TypeScript │1262 │
├────────────────────────────────────────────────────┼─────┤
│Microsoft/vscode-react-native │604 │
├────────────────────────────────────────────────────┼─────┤
│Microsoft/ChakraCore │586 │
├────────────────────────────────────────────────────┼─────┤
│Microsoft/vsts-tasks │475 │