Skip to content

Instantly share code, notes, and snippets.

View esokullu's full-sized avatar
☀️
shining

Emre Barack Sokullu esokullu

☀️
shining
View GitHub Profile
GraphJS.sendMessage(
"48760696099368953dd71a90b727acba", // the recipient's ID
"hey Emre, how is life?", // the message
function(response) {
// Do something
});
@esokullu
esokullu / graph.html
Last active August 12, 2018 20:36
GraphJS in action
<!-- Step 1 -->
<graphjs-messages-composer
to="47d2b770e7dfc24d87a0a38df78b222a"
anonymity="on"
style="min-width:100%;width:100%;"
></graphjs-messages-composer>
<!-- Step 2 -->
<script type="text/javascript" src="https://graphjs.com/v1/graph.js"></script>
@esokullu
esokullu / neo4j_cypher_cheatsheet.md
Created January 6, 2018 12:14 — forked from DaniSancas/neo4j_cypher_cheatsheet.md
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
vagrant init phonetworks/xenial-php71-pho
vagrant up
vagrant ssh
# now we’re in the virtual machine.
cd /opt/pho-kernel
php -a
# now this is PHP shell
include “play.php”;
# pho-graphql-v1
type Tweet implements ObjectNode
@edges(in:"User:Post, User:Like, User:Consume", out:"Mention")
@permissions(mod: "0x07555", mask:"0xfffff")
@properties(expires: 0, editable: false, volatile: false, revisionable: false)
{
id: ID!,
content: String! @constraints(maxLength: 140),
create_time: Date! @now
Array
(
[status] => 1
[content] => Array
(
[0] => Array
(
[id] => 47961989
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
#default-character-set = utf8
[mysqld_safe]
open-files-limit = 32768
[mysqld]
port = 3306
@esokullu
esokullu / test.qml
Last active September 29, 2017 01:20
GPage {
Text {
id: counter
// ...
MouseArea {
id: theCounter
anchors.fill: parent
onClicked: {
@esokullu
esokullu / vagrant-clean.sh
Created September 28, 2017 17:31 — forked from yuki-takei/vagrant-clean.sh
Script to clean up Ubuntu Vagrant box before packaging
#!/bin/bash
# This script zeroes out any space not needed for packaging a new Ubuntu Vagrant base box.
# Run the following command in a root shell:
#
# bash <(curl -s https://gist.github.com/yuki-takei/4b0823c6e882ef030ad46e534fc6cc7c/raw/vagrant-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
@esokullu
esokullu / lmdb.tcl
Created April 30, 2017 17:16 — forked from antirez/lmdb.tcl
LMDB -- First version of Redis written in Tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!