Skip to content

Instantly share code, notes, and snippets.

View thomasfr's full-sized avatar

Thomas Fritz thomasfr

View GitHub Profile

Vienna is cool

First, let’s rock

@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"}),
@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)
#
#!/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/
CREATE (n)-[:hasProperty]-(p{name:"forename",value:"Thomas"}),
n-[:hasProperty]-({name:"surname",value:"Fritz"})
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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.
@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 / Git push deployment in 7 easy steps.md
Last active May 6, 2025 10:00
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@thomasfr
thomasfr / autossh.service
Last active June 19, 2025 05:38
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)