A B C D E F G H I J K L M N O P Q R S T U V W X Z

Portainer

Installation

Create the volume that Portainer Server will use to store its database:
docker volume create portainer_data

Download and install the Portainer Server container:
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
– Run the container in daemon mode (-d)
– Expose the ports 8000 and 9443 to the public since they are needed to manage the Portainer Server (-p 8000:8000 -p 9443:9443)
– Name the container portainer (--name portainer)
– Set the restart policy to always so the container will start automatically when docker is started (--restart=always)
– Grant the container read-write access to the docker socket (this will enable the container to manage docker containers) (-v /var/run/docker.sock:/var/run/docker.sock)
– Mount the previously created volume portainer_data as /data inside the container (-v portainer_data:/data)
– Use the latest version of the image portainer/portainer-ce (Portainer Community Edition – for Business Edition or Enterprise Edition use portainer/portainer-ee) (portainer/portainer-ce:latest)

Logging in:
https://your-fancy-hostname:9443/
– Open this link inside of a modern browser after you have replaced your-fancy-hostname with the hostname or ip address of the host machine.

RDMO – Research Daten Management Organizer

RDMO is a tool to support the systematic planning, organisation and implementation of the data management throughout the course of a research project. RDMO is funded by the Deutsche Forschungsgemeinschaft (DFG).

Home Page
https://rdmorganiser.github.io
Source code
https://github.com/rdmorganiser/rdmo
Documentation
http://rdmo.readthedocs.io
Mailing list
https://www.listserv.dfn.de/sympa/subscribe/rdmo
Slack
https://rdmo.slack.com
Demo
https://rdmo.aip.de

https://rdmo.readthedocs.io/en/latest/installation/index.html

An installation of RDMO contains of three parts:

  1. A directory which holds all the settings and customisations, custom to your installation of RDMO. We will call this directory rdmo-app, but you can use any name you see fit.
  2. The actual rdmo package, which is centrally maintained by the RDMO team, is installed as a dependency in a virtual environement.
  3. A database to store the content, which is generated by the users of your RDMO installation. Currently, we support Postgres, MySQL, and SQLite.

This chapter shows how these components are set up. Optional components can be installed afterwards and are covered under Configuration.

For testing and development, you can run RDMO using your regular user account. On a production system, a dedicated user account should be used. We suggest to create a user called rdmo with the group rdmo and the home directory /srv/rdmo: sudo adduser rdmo --home /srv/rdmo . We will use this user throughout this documantation.

Do not use the root user to run RDMO! It is a bad idea anyway and several steps of the installation will not work. sudo is used in the installation when needing root-privileges to install packages.

React-leaflet

Basic Introduction

React Leaflet provides bindings between React and Leaflet. It does not replace Leaflet but leverages it to abstract Leaflet layers as React components.

React Leaflet uses React’s context API to make some Leaflet elements instances available to children’s elements that need it.

Each Leaflet map instance has its own React context, created by the MapContainer component. Other components and hooks provided by React Leaflet can only be used as descendants of a MapContainer.

Lifecycle process

  1. The MapContainer renders a container <div> element for the map. If the placeholder prop is set, it will be rendered inside the container <div>.
  2. The MapContainer instantiates a Leaflet Map for the created <div> with the component properties and creates the React context containing the map instance.
  3. The MapContainer renders its children components.
  4. Each child component instantiates the matching Leaflet instance for the element using the component properties and context, and adds it to the map.
  5. When a child component is rendered again, changes to its supported mutable props are applied to the map.
  6. When a component is removed from the render tree, it removes its layer from the map as needed.

Installation

’npm‘ can be used to install React leaflet and its dependencies.

React, React DOM and Leaflet are required peer dependencies. We must add them to our project if they are not already installed:

npm install react react-dom leaflet

Then we can install React Leaflet:

npm install react-leaflet

Modules can then be imported using bare specifiers when supported by a bundler such as webpack

import { MapContainer } from ‚react-leaflet/MapContainer‘
import { TileLayer } from ‚react-leaflet/TileLayer‘
import { useMap } from ‚react-leaflet/hooks‘

Alternatively, all the components and hooks can be imported from the module entry-point:

import { MapContainer, TileLayer, useMap } from ‚react-leaflet‘

Setup

Use the following code:

<MapContainer center={[51.505, -0.09]} zoom={13} scrollWheelZoom={false}>
<TileLayer
attribution=’&copy; <a href=“https://www.openstreetmap.org/copyright“>OpenStreetMap</a> contributors‘
url=“https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png“
/>
<Marker position={[51.505, -0.09]}>
<Popup>
A pretty CSS3 popup. <br /> Easily customizable.
</Popup>
</Marker>
</MapContainer>

Result

 

 

Example to visualize multiple locations with markers

 

return (
    <div style={{ height: ’50px‘ }} id=“map“>
      <MapContainer center={[51.505, -0.09]} zoom={13} scrollWheelZoom={true}>
        <TileLayer
          attribution=’&copy; <a href=“https://www.openstreetmap.org/copyright“>OpenStreetMap</a> contributors‘
          url=“https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png“
        />
        {
          markerData.features.map((data) => {
            return (
              <Marker position={[data.geometry.coordinates[1], data.geometry.coordinates[0]]}>
                <Popup>
                  {data.properties.country}
                </Popup>
                <Polyline
                  positions={mapData}
                />
              </Marker>
            )
          })
        }
        <LocationMarker />
      </MapContainer>
    </div>
  );

Output

 

Still having trouble? Use the react-leaflet tag on Stack Overflow. 😉

 

 

 

 

React.js frontend und PHP backend

https://www.techvariable.com/blog/integrating-react-js-into-a-php-application/

„Now can we use React js with Php ?

Yes. This is possible. Reactjs is just the ‘V’ in MVC. React doesn’t care what you are using at backend. One can render React’s components on server side in PHP using V8Js PHP extension, but this is not necessary. Server side rendering in Reactjs is optional. Here are some things you can do:
1. Compile your whole reactjs JSX code using babel. It would be better if you make use of some module bundler like webpack and compile your reactjs code into a single file. Upload that single file on your server.
2. You can populate default states in your react code using php.
The best way to use PHP as backend with React Js as front end is to keep both seperate. Make a stand alone front-end and use PHP to create APIs which interacts with the database. Then consume the API through HTTP AJAX or whatever mechanism React Js contains.

Relevanssi Search Plugin for WordPress

Fix your WordPress search!

Fix your WordPress search!

WordPress search doesn’t search everything, and doesn’t give you enough control over what is searched and how. Relevanssi gives you full access and full control, with plenty of filters and ways to make Relevanssi work the way you want your search to work.
PDF contents Relevanssi can read the text from your PDFs, index it and search it! Read more about indexing PDFs.
Multisite searches Relevanssi can run searches across many subsites in the same multisite network.
Custom fields Relevanssi will find the content in your custom fields, including things like WooCommerce SKUs, ACF field content or whatever it is you store in custom fields. Read more about custom field search.
User profiles Yes, Relevanssi will find users by their names and profile descriptions.
Taxonomy terms No matter if you prefer categories, tags or custom taxonomies, Relevanssi will return the term archive pages in searches!
Shortcode output Relevanssi can expand shortcodes and find content generated by shortcodes.

SBOM (Software Bill Of Materials) for Docker

https://docs.docker.com/engine/sbom/

A Software Bill Of Materials (SBOM) is analogous to a packing list for a shipment. It lists all the components that make up the software, or were used to build it. For container images, this includes the operating system packages that are installed (for example, ca-certificates) along with language-specific packages that the software depends on (for example, Log4j). The SBOM could include a subset of this information or even more details, like the versions of components and their source.

It is available as a plugin with the latest docker desktop software.

Solr Cell & schemaless indexing with Apache Tika

Key Solr Cell Concepts

When using the Solr Cell framework, it is helpful to keep the following in mind:

  • Tika will automatically attempt to determine the input document type (e.g., Word, PDF, HTML) and extract the content appropriately. If you like, you can explicitly specify a MIME type for Tika with the stream.type parameter. See http://tika.apache.org/1.24.1/formats.html for the file types supported.
  • Briefly, Tika internally works by synthesizing an XHTML document from the core content of the parsed document which is passed to a configured SAX ContentHandler provided by Solr Cell. Solr responds to Tika’s SAX events to create one or more text fields from the content. Tika exposes document metadata as well (apart from the XHTML).
  • Tika produces metadata such as Title, Subject, and Author according to specifications such as the DublinCore. The metadata available is highly dependent on the file types and what they in turn contain. Some of the general metadata created is described in the section Metadata Created by Tika below. Solr Cell supplies some metadata of its own too.
  • Solr Cell concatenates text from the internal XHTML into a content field. You can configure which elements should be included/ignored, and which should map to another field.
  • Solr Cell maps each piece of metadata onto a field. By default it maps to the same name but several parameters control how this is done.
  • When Solr Cell finishes creating the internal SolrInputDocument, the rest of the Lucene/Solr indexing stack takes over. The next step after any update handler is the Update Request Processor chain.

Solr Cell is a contrib, which means it’s not automatically included with Solr but must be configured. The example configsets have Solr Cell configured, but if you are not using those, you will want to pay attention to the section Configuring the ExtractingRequestHandler in solrconfig.xml below.

For more information see:

https://solr.apache.org/guide/8_7/uploading-data-with-solr-cell-using-apache-tika.html