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
#!/bin/bash
SERVICEURL=http://localhost:8001
USERNAME=admin
PASSWORD=changemeXX
COOKIE_FILE=cookie.txt
function getCSFR {
CSRF=`curl -s -u $USERNAME:$PASSWORD -c $COOKIE_FILE -X GET $SERVICEURL/apps/forms | grep data-requesttoken | cut -d '"' -f6`
Area inundated with 1m sea level rise, Jan. 2020 e1b7db81-4168-492a-9f45-68cbf7b718d3 2020-09-15T08:33:59
Bathing water quality in 2019 - Web Service f7d77c2b-7797-4569-9fb5-338fc13e6efa 2020-08-27T10:06:23
Bycatch by pelagic towed gears in Europe Seas, Jan. 2020 6d8f11b5-d395-45fb-937e-bea2f290c447 2020-08-18T12:04:13
Climatic suitability index modelling for tiger mosquito (Aedes albopictus) 2008-2009, Jan. 2020 93070b8d-bb1a-4f4a-9b71-531676496125 2020-09-23T11:41:27
Climatic suitability index values for tiger mosquito (Aedes albopictus) 2008-2009 (90th percentile), Jan. 2020 3accfd8c-20c7-4c0e-b77f-d632e476191a 2020-09-23T09:15:35
Conservation status of habitat types and species: datasets from Article 17, Habitats Directive 92/43/EEC reporting (2013-2018) - PUBLIC VERSION - Aug. 2020 9f71b3e3-f8ec-442b-a2d5-c3c190605ac4 2020-10-23T14:17:59
Disturbance of species due to human presence along European coastlines, Jan. 2020 670cb5a9-40b9-4b12-90e3-597de5927700 2020-08-18T09:31:15
Emerald Network of Areas of Sp
SELECT
?s
?p
?o
?time
WHERE {
{
GRAPH ?graph { ?s ?p ?o } .
?graph <http://cr.eionet.europa.eu/ontologies/contreg.rdf#lastRefreshed> ?time .
SELECT DISTINCT
?s
?p
?o
WHERE {
{
?s ?p ?o .
FILTER (?s in (<https://biodiversity.europa.eu/countries/united-kingdom>,<https://biodiversity.europa.eu/countries/liechtenstein>)) .
SELECT DISTINCT
?s
?p
?o
WHERE
{
{
?s ?p ?o .
12/11/2020 16:21:32=========================================================================
12/11/2020 16:21:32
12/11/2020 16:21:32 JBoss Bootstrap Environment
12/11/2020 16:21:32
12/11/2020 16:21:32 JBOSS_HOME: /opt/jboss/jboss-as-7.1.1.Final
12/11/2020 16:21:32
12/11/2020 16:21:32 JAVA: /usr/lib/jvm/java-7-openjdk-amd64/bin/java
12/11/2020 16:21:32
12/11/2020 16:21:32 JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
12/11/2020 16:21:32
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sdmx-measure: <http://purl.org/linked-data/sdmx/2009/measure#>
PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#>
PREFIX sdmx-attribute: <http://purl.org/linked-data/sdmx/2009/attribute#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX property: <http://rdfdata.eionet.europa.eu/eurostat/property#>
PREFIX geo: <http://dd.eionet.europa.eu/vocabulary/eurostat/geo/>
PREFIX unit: <http://dd.eionet.europa.eu/vocabulary/eurostat/unit/>
PREFIX product: <http://dd.eionet.europa.eu/vocabulary/eurostat/product/>
PREFIX clrtap_nec_unfccc: <http://reference.eionet.europa.eu/clrtap_nec_unfccc/schema/>
@michimau
michimau / ldapjs ldaps
Last active November 25, 2020 15:29
ldapjs ldaps example
var ldapjs = require('ldapjs');
let host = process.env.ldaphost || 'changeme';
let username = process.env.ldapusername || 'changeme';
let dn = process.env.ldapdn || 'ou=changeme,o=changeme,l=changeme';
let password = process.env.ldappassword || 'changeme';
let client = ldapjs.createClient ({ url: 'ldaps://' + host });
client.bind('uid=' + username + ',' + ldapdn, password, function (err) {
@michimau
michimau / list webdav folder
Created November 26, 2020 12:21
list webdav folder
const { createClient } = require("webdav");
const client = createClient(
"http://localhost:8001/remote.php/dav/files/admin",
{
username: "admin",
password: "changeme"
}
);
@michimau
michimau / nextcloud-node-client example
Last active December 10, 2020 12:57
nextcloud-node-client example
require('dotenv').config();
const { v4: uuidv4 } = require('uuid');
const Client = require("nextcloud-node-client").Client;
async function shareFolder (newFolder) {
//create a .env file with content-:
//NEXTCLOUD_USERNAME=admin
//NEXTCLOUD_PASSWORD=changemeXX
//NEXTCLOUD_URL=http://localhost:8002