Skip to content

Instantly share code, notes, and snippets.

View thomasfr's full-sized avatar

Thomas Fritz thomasfr

View GitHub Profile
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active July 3, 2024 02:22
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@thomasfr
thomasfr / nginx.conf
Last active December 1, 2019 20:04
nginx vhost / site config file
upstream node_backend {
server 127.0.0.1:3000;
keepalive 32;
}
server {
root /var/www/testapp/public;
index index.html;
@thomasfr
thomasfr / test.geojson
Last active January 4, 2016 10:29
GeoJSON Test
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
CREATE (n)-[:hasProperty]-(p{name:"forename",value:"Thomas"}),
n-[:hasProperty]-({name:"surname",value:"Fritz"})
#!/bin/bash
#### SETUP
# 1.) Create a simple point layer
curl -X POST -d '{"layer":"geom","lat":"lat","lon":"lon"}' --header "Content-Type:application/json" http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer
# 2.) Add a spatial index
curl -X POST -d '{"name":"geom","config":{"provider":"spatial","geometry_type":"point","lat":"lat","lon":"lon"}}' --header "Content-Type:application/json" http://localhost:7474/db/data/index/node/
@thomasfr
thomasfr / warmly.sh
Last active October 12, 2023 06:17
A wget based easy poor man`s cache warmer script
#!/bin/bash
# warmly.sh
# A wget based, easy, poor man`s cache warmer script
# https://gist.github.com/thomasfr/7926314
# The MIT License (MIT)
#
# Copyright (c) 2013,2014 Thomas Fritz <[email protected]> (http://fritzthomas.com)
#
@thomasfr
thomasfr / ViennaJS.adoc
Last active December 23, 2015 15:19
Graph Example for the ViennaJS Meetup Group.

ViennaJS Graph

Setup the graph

CREATE	(meetup1:Meetup{title:"ViennaJS monthly meetup", date:"2013-08-28", time:"19:00"}),

Vienna is cool

First, let’s rock

Vienna

Setup

CREATE	(drinks{name:'C1'})-[:CAPTION]->(capGetraenke{caption:"Getränke",lang:"DE"}),
	(drinks)-[:CAPTION]->({caption:"Beverage",lang:"EN"}),
	(drinks)<-[:IS_A]-(spirits{name:"C2"}),
	(spirits)-[:CAPTION]-({caption:"Alkoholische Getränke",lang:"DE"}),