Skip to content

Instantly share code, notes, and snippets.

View jeanatcismet's full-sized avatar

Jean-Michel Ruiz jeanatcismet

View GitHub Profile
#!/bin/bash
WKT="POINT(368705.78 5679133.82)"
SEARCH_RESULT=$(curl -s -F "file=$WKT\";type=application/json" -uuser@WUNDA_BLAU:xxx -X POST http://localhost:8890/actions/WUNDA_BLAU.SchraegluftbilderForGeomSearch/tasks\?role\=all\&resultingInstanceType\=result | jq -r '.res')
NAME=Turm
for directionIndex in 0 1 2 3; do
INFO=$(echo $SEARCH_RESULT | jq -r '.['$directionIndex']')
DIRECTION=$(echo $INFO | jq -r '.direction')
@jeanatcismet
jeanatcismet / manual-rotate-backups.sh
Created March 12, 2019 17:57
dry-run of rotate-backups and transforming result into commands for manual removal of file via rclone_mount
#!/bin/sh
RCLONE_CONF=$(pwd)/rclone.conf
RCLONE_SRC=gdrive:/cismet/backups/
ROTATE_BACKUPS_PATH="*"
ROTATE_BACKUPS_OPTIONS="--dry-run --daily=10 --weekly=5 --monthly=13 --yearly=5"
# ===
DATA=$(pwd)/data
@jeanatcismet
jeanatcismet / mount_rclone.sh
Created March 12, 2019 17:52
using docker container (farmcoolcow/rclone) for mounting a remote rclone directory into a local directory
#!/bin/sh
RCLONE_CONF=$1
RCLONE_SRC=$2
RCLONE_MOUNT_POINT=$3
CONTAINER_NAME=rclone_mount
USER=$(whoami)
exit_script() {
@jeanatcismet
jeanatcismet / cidsref.md
Last active April 5, 2016 15:14
CidsRef build and run instructions

1) Installation of Docker

  • Install docker.io and docker-compose: sudo apt-get install docker.io docker-compose.

2) Preparation of the container data

  • Download the zip file of this gist => CidsRef container-data. Unzip it and move it to a location of your choice.
  • Add your cids_reference.sql to the container-data directory.
  • Edit YOUR_USERNAME and YOUR_CRYPTED_PASSWORD in settings.xml

3) Build of the docker images

  • Download the zip file of this gist => CidsRef Dockerfiles. Unzip it and cd into the unzipped directory.
@jeanatcismet
jeanatcismet / pom.xml
Created April 5, 2016 14:42
CidsRef container-data
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.cismet</groupId>
<artifactId>global-parent</artifactId>
<version>2.0</version>
</parent>
@jeanatcismet
jeanatcismet / Dockerfile_cidsref
Last active April 6, 2016 10:44
CidsRef Dockerfiles
FROM cismet/maven
MAINTAINER Jean-Michel Ruiz <[email protected]>
ENV DATA_DIR /data
ENV LIB_DIR /data/lib
ENV SERVER_DIR /data/server
ENV IMPORT_DIR /data/import
ENV PGPASSWORD postgres