Skip to content

Instantly share code, notes, and snippets.

View rbraband's full-sized avatar

Roland Braband rbraband

  • Nordmann, Rassmann GmbH
  • DE - Hamburg
View GitHub Profile
@antirez
antirez / mexists.lua
Created December 14, 2011 09:22
MEXISTS Redis Lua script
$ cat /tmp/mexists.lua
local retval,j
retval={}
for i=1,#KEYS do
table.insert(retval,redis.call('exists',KEYS[i]))
end
return retval
$ ./redis-cli --eval /tmp/mexists.lua foo bar key0
@rbraband
rbraband / weekly.cmd
Created October 20, 2014 13:53
Graphhopper weekly update script for Windows Task-Scheduler
@ECHO OFF && PUSHD "%~dp0" && SETLOCAL
ECHO [%date% - %time%] Log start > download.log
SC Stop Graphhopper > nul
RENAME europe-latest.osm.pbf old_europe-latest.osm.pbf
REM Wget: retrieve files from the WWW http://gnuwin32.sourceforge.net/packages/wget.htm
WGET --no-verbose --append-output=download.log --tries=3 http://download.geofabrik.de/europe-latest.osm.pbf
IF exist %~dp0\europe-latest.osm.pbf (
ECHO [%date% - %time%] Download successful >> download.log
DEL old_europe-latest.osm.pbf
PUSHD %~dp0\europe-latest.osm-gh