Skip to content

Instantly share code, notes, and snippets.

View nikosantis's full-sized avatar
🏠
Working from home Chile

Nikolas Santis nikosantis

🏠
Working from home Chile
View GitHub Profile
@nikosantis
nikosantis / CalendarDay.cql
Created July 14, 2020 20:36 — forked from kbastani/CalendarDay.cql
This gist is a Neo4j Cypher query for merging a calendar graph for a specific year. This query has 4 levels of indexes, consisting of year, month, day, hour.
// 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 })
////////////////////////////////////////////////////////////////////////////////
// Welcome to @reach/tooltip!
//
// Quick definitions:
//
// - "on rest" or "rested on": describes when the element receives mouse hover
// after a short delay (and hopefully soon, touch longpress).
//
// - "activation": describes a mouse click, keyboard enter, or keyboard space.
//
{
"initalState": {
"mylist": [],
"trends": [
{
"id": 2,
"slug": "tvshow-2",
"title": "In the Dark",
"type": "Scripted",
"language": "English",
@nikosantis
nikosantis / gitignore
Created October 10, 2019 14:09 — forked from gndx/gitignore
# Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
@nikosantis
nikosantis / eslintrc
Created October 10, 2019 14:06 — forked from gndx/eslintrc
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": ["airbnb"],
"globals": {
"document": false,
"escape": false,