Skip to content

Instantly share code, notes, and snippets.

View gigenthomas's full-sized avatar
🎯
Focusing

Gigen Thomas gigenthomas

🎯
Focusing
View GitHub Profile
MATCH (s)
WHERE ID(s) = 85
DETACH DELETE s
MATCH (f1:File {name:'Home'}) , (f2:File {name:'t1.txt'})
CREATE (f1)-[:CHILD]->(f2)
CREATE (f2)-[:PARENT]->(f1)
EXTRACT - returns a list containing the values resulting from an expression which has been applied to each element in a list
==================================================================================================================
MATCH p =(a)-->(b)-->(c)
WHERE a.name = 'Alice' AND b.name = 'Bob' AND c.name = 'Daniel'
RETURN extract(n IN nodes(p)| n.age) AS extracted
@gigenthomas
gigenthomas / neo4j_cypher_cheatsheet.md
Created May 29, 2019 03:11 — 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)
@gigenthomas
gigenthomas / acl.adoc
Created May 30, 2019 04:56 — forked from jexp/acl.adoc
Neo4j directed path through multiple relationships with property filter

Neo4j directed path through multiple relationships with property filter

Being new to Cypher and Neo4j, I am having trouble constructing my query for my use-case. I am building a simple ACL (access control list) and am looking for a path through permission relationships an up a hierarchy as well. A picture may better explain it:

cC8KN

Key:

HOWTO: Installing Vault On AWS Linux

This is quick howto for installing vault on AWS Linux, mostly to remind myself. At the end of this tutorial, you'll have a working vault server, using s3 for the backend, self signed certificates for tls, and supervisord to ensure that the vault server is always running, and starts on reboot.

Setting up S3

First things first, let's set up an s3 bucket to use as the storage backend for our s3 instance.

  1. From the AWS Mangement Console, go to the S3 console.

  2. Click on the Create Bucket button

@gigenthomas
gigenthomas / react.md
Last active July 23, 2023 23:41
React

React Basics

The useEffect Hook is React’s main approach to handling Side Effects. Side Effects refer to anything that affects something outside the scope of the function being executed.

React Layout

package main
import (
"context"
"fmt"
"log"
"os"
"os/signal"
"sync"
"syscall"
package main
import (
"fmt"
"sync"
)
// Define a struct for map operations
type MapOperation struct {
Key int