Skip to content

Instantly share code, notes, and snippets.

View michimau's full-sized avatar

Mauro Michielon michimau

  • European Food Safety Authority
  • Parma
View GitHub Profile
@michimau
michimau / gist:c7cbf104651d1d1ddbff48c77435dd2b
Last active May 31, 2022 20:02
gis data ingestion into citus postgresql cluster for nomad job usage
#!/bin/bash
DBHOST=$NOMAD_META_db_host
DBNAME=$NOMAD_META_db_name
DBPORT=$NOMAD_META_db_port
DBUSER=$NOMAD_META_db_user
DBPASSWORD=$NOMAD_META_db_password
DBSCHEMA=$NOMAD_META_db_schema
FILEURL=$NOMAD_META_fileurl
@michimau
michimau / gist:cc72010eaf7c15d2e8b57a7de694861e
Last active March 17, 2022 13:56
gis data ingestion into citus postgresql cluster for nomad job usage
#!/bin/bash
DBHOST=$NOMAD_META_db_host
DBNAME=$NOMAD_META_db_name
DBPORT=$NOMAD_META_db_port
DBUSER=$NOMAD_META_db_user
DBPASSWORD=$NOMAD_META_db_password
DBSCHEMA=$NOMAD_META_db_schema
FILEURL=$NOMAD_META_fileurl
@michimau
michimau / keycloak-x deploy recipe
Last active March 20, 2022 08:34
keycloak-x deploy recipe
version: '2'
volumes:
keycloak_postgres_data:
keycloak_postgres_scripts:
services:
keycloak:
image: quay.io/keycloak/keycloak:17.0.0
#init: true
ports:
@michimau
michimau / gist:473e7ab2908271b897ede0775fb36ee3
Created January 14, 2022 12:04
privacyidea 3.3.1 pi-ad
2022-01-14 11:58:32,227][557][140069404256000][DEBUG][privacyidea.api.before_after:84] Begin handling of request u'/validate/check?'
[2022-01-14 11:58:32,227][557][140069404256000][DEBUG][privacyidea.api.lib.utils:254] Can not get param: No JSON object could be decoded
[2022-01-14 11:58:32,227][557][140069404256000][DEBUG][privacyidea.lib.user:186] Entering get_user_from_param with arguments ({'user': u'admin', 'pass': u'changeme'},) and keywords {}
[2022-01-14 11:58:32,228][557][140069404256000][DEBUG][privacyidea.lib.config:186] Entering get_from_config with arguments ('splitAtSign',) and keywords {'return_bool': True}
[2022-01-14 11:58:32,228][557][140069404256000][DEBUG][privacyidea.lib.config:323] Cloning request-local config from shared config object
[2022-01-14 11:58:32,228][557][140069404256000][DEBUG][privacyidea.lib.config:280] Creating new shared config object
[2022-01-14 11:58:32,281][557][140069404256000][DEBUG][privacyidea.lib.utils:759] Values are not initialized. We need to reread policies fro
@michimau
michimau / gist:2894e9cd3375fbf71619033abd893a71
Created September 24, 2021 09:43
docker-compose haproxy
version: '2'
services:
apache:
image: httpd:latest
restart: always
environment:
SERVERADMIN: mauro.michielon@eea.europa.eu
SERVERNAME: sdi.eea.europa.eu
ports:
- 81:80
defaults
timeout connect 5s
timeout client 1m
timeout server 1m
frontend http_front
bind *:80
mode http
acl app1 path_beg -i /nginx
acl app2 path_beg -i /apache
@michimau
michimau / ticket #138745
Created August 31, 2021 08:33
ticket #138745
| id | share_type | share_with | password | uid_owner | uid_initiator | parent | item_type | item_source | item_target | file_source | file_target | permissions | stime | accepted | expiration | token | mail_send | share_name | password_by_talk | note | hide_download | label |
+-----+------------+------------+----------+-----------+---------------+--------+-----------+-------------+-------------+-------------+-----------------------------------------------+-------------+------------+----------+------------+-----------------+-----------+------------+------------------+------+---------------+-------+
| 724 | 3 | NULL | NULL | eeaadmin | staromar | 696 | file | 9041 | NULL | 9041 | /Natura2000_end2019_gpkg.zip | 1 | 1587462436 | 0 | NULL | GkqdcbbsYmmBSEQ | 0 | NULL | 0 | NULL | 0 | |
| 725 | 3 | NULL | NULL | eeaad
@michimau
michimau / nrg_bal_c_ktoe.sh
Last active June 11, 2021 13:54
create script for creating nrg_bal_c_ktoe graph
#!/bin/bash
host=
username=
password=
countries=( "IS" "NO" "TR" "EU27_2020" "EU28" "BE" "BG" "CZ" "DK" "DE" "EE" "IE" "EL" "ES" "FR" "HR" "IT" "CY" "LV" "LT" "LU" "HU" "MT" "NL" "AT" "PL" "PT" "RO" "SI" "SK" "FI" "SE" "UK" )
#countries=( "IS" )
siec=( "C0000X0350-0370" "C0350-0370" "G3000" "P1000" "S2000" "W6100_6220" "TOTAL" )
03/06/2021 15:50:0513:50:05,967 INFO [stdout] (http--0.0.0.0-8080-3) DEBUG JSFPhaseObserver - = [RESTORE_VIEW 1] STARTED ===============================================
03/06/2021 15:50:0513:50:05,980 WARN [org.jboss.seam.faces.environment.SeamApplicationWrapper] (http--0.0.0.0-8080-3) Using JSF provided instance, unable to find a BeanManaged instance for class org.primefaces.convert.DateTimeConverter
03/06/2021 15:50:0513:50:05,986 INFO [stdout] (http--0.0.0.0-8080-3) INFO JSFPhaseObserver - = [RESTORE_VIEW 1] COMPLETED =============================================
03/06/2021 15:50:0513:50:05,987 INFO [stdout] (http--0.0.0.0-8080-3) DEBUG JSFPhaseObserver - = [APPLY_REQUEST_VALUES 2] STARTED ===============================================
03/06/2021 15:50:0613:50:06,002 INFO [stdout] (http--0.0.0.0-8080-3) INFO JSFPhaseObserver - = [APPLY_REQUEST_VALUES 2] COMPLETED =============================================
03/06/2021 15:50:0613:50:06,003 INFO [stdout] (http--0.0.0.0-8080-3) DEBUG JSFPhaseObserver
root@0cb7aab8d4a7:/lpd/shapefile/tmp# ls -lah
total 19M
drwxr-sr-x. 4 root root 12K Jun 1 11:19 .
drwxr-sr-x. 4 root root 4.0K Nov 3 2020 ..
-rw-r--r--. 1 root root 148K May 31 10:52 1418741628431-LIFE--NATAT--7-53.zip
-rw-r--r--. 1 root root 6.6M May 31 10:51 1418800136741-LIFE--NATAT--7-55.zip
-rw-r--r--. 1 root root 3.5M May 25 14:13 1420806381502-LIFE--NATDE--7-38.zip
-rw-r--r--. 1 root root 1.1M May 25 13:29 1420807278554-LIFE--NATDE--7-43.zip
-rw-r--r--. 1 root root 571K May 25 14:15 1422025138447-LIFE--NATBE--7168.zip
-rwxrwxrwx. 1 root root 4.7K May 12 2020 1589267373683-LIFE+10 NAT AT 015 _land purchaseDB.zip