Skip to content

Instantly share code, notes, and snippets.

@zhiboz
zhiboz / README.md
Created April 16, 2020 19:54
Automatic delivery time finder for Costco Instacart

Costco.js - An automatic Costco delivery time finder

Usage

  1. Install Tampermonkey
  2. Install the script from GreasyFork: Link
  3. Shop!

Notes

  1. The script refreshes every 5 minutes.
  2. Try checking the console if the script doesn't seem to be running.
  3. The script will log "Loading..." and "Running..." if properly working.
@zhiboz
zhiboz / fetch_tree.adoc
Created April 17, 2020 15:00 — forked from jexp/fetch_tree.adoc
Fetch a Tree with Neo4j

Fetch a Tree with Neo4j

Today I came across a really interesting StackOverflow question:

Given a forest of trees in a Neo4j REST server, I`m trying to return a single tree given the root vertex. Being each tree quite large, I need a de-duplicated list of all vertices and edges in order to be able to reconstruct the full tree on the client side.

@zhiboz
zhiboz / importtaxonomy.cql
Created April 25, 2020 22:49 — forked from rvanbruggen/importtaxonomy.cql
Google Product Taxonomy
//Import Google Product Taxonomy
//WITH IDENTIFIERS
//downloaded from https://support.google.com/merchants/answer/1705911
create index on :Cat1(name);
create index on :Cat2(name);
create index on :Cat3(name);
create index on :Cat4(name);
create index on :Cat5(name);
create index on :Cat6(name);
@zhiboz
zhiboz / 1-contacttracing-import.cql
Created April 25, 2020 22:49 — forked from rvanbruggen/1-contacttracing-import.cql
Contact tracing example #cypher #neo4j
//contact tracing data import
//full spreadsheet with synthetic data
//https://docs.google.com/spreadsheets/d/1R-XVuynPsOWcXSderLpq3DacZdk10PZ8v6FiYGTncIE/edit#gid=0
// person sheet˝
// https://docs.google.com/spreadsheets/u/0/d/1R-XVuynPsOWcXSderLpq3DacZdk10PZ8v6FiYGTncIE/export?format=csv&id=1R-XVuynPsOWcXSderLpq3DacZdk10PZ8v6FiYGTncIE&gid=0
// Person: PersonId PersonName Healthstatus ConfirmedTime
// place sheet
@zhiboz
zhiboz / 1 - loadlineagedata.cql
Created April 25, 2020 22:51 — forked from rvanbruggen/1 - loadlineagedata.cql
Demonstration of how to use the Neo4j Graph Database for Data Lineage
//load nodes
LOAD CSV WITH HEADERS FROM "https://docs.google.com/spreadsheets/u/0/d/1eL3IrbzgvZzkNnQUwDCZ1mwVfA6sypZYvDHBoeq48IM/export?format=csv&id=1eL3IrbzgvZzkNnQUwDCZ1mwVfA6sypZYvDHBoeq48IM&gid=0" AS csv
CALL apoc.create.nodes([csv.Label], [{id: csv.ID, name: csv.Name}]) YIELD node
RETURN count(node);
MATCH (n)
SET n:Node;
CREATE INDEX ON :Node(id);