See this issue.
Docker best practise to Control and configure Docker with systemd.
-
Create
daemon.jsonfile in/etc/docker:{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
| ################### | |
| # STAGE 1: builder | |
| ################### | |
| FROM --platform=linux/amd64 eclipse-temurin:11.0.12_7-jdk-focal as builder | |
| ARG MB_EDITION=oss CI=true | |
| WORKDIR /app/ |
| #!/bin/bash | |
| # This script takes a PDF or list of PDFs and outputs a file(s) | |
| # named <file>_scanned.pdf that looks like it has been scanned | |
| # | |
| # Requires imagemagic and popper to be installed (brew install imagemagick poppler) | |
| # | |
| # Accepts: a list of files | |
| # Usage: ./<scriptfilename> pdf1.pdf pdf2.pdf | |
| # | |
| # To use as a macOS automator quick action you need to: |
| docker run --rm -ti --entrypoint='' <image> bash |
| import sys | |
| import time | |
| import cv2 | |
| import numpy as np | |
| ''' | |
| Based on this code by Abid Rahman K: | |
| https://dsp.stackexchange.com/questions/2564/opencv-c-connect-nearby-contours-based-on-distance-between-them |
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json file in /etc/docker:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
| <div id="messages"> | |
| {% for message in messages %} | |
| <div {% if message.tags %}class="alert alert-dismissable alert-{{ message.tags }}"{% endif %}> | |
| <a class="close" data-dismiss="alert" href="#">×</a> | |
| {{ message }} | |
| </div> | |
| {% endfor %} | |
| </div> |
| #!/bin/bash | |
| FILENAME=file-to-split.csv | |
| HDR=$(head -1 ${FILENAME}) | |
| split -l 100 ${FILENAME} xyz | |
| n=1 | |
| for f in xyz* | |
| do | |
| if [[ ${n} -ne 1 ]]; then | |
| echo ${HDR} > part-${n}-${FILENAME}.csv | |
| fi |
| function formatXml(xml) { | |
| var formatted = ''; | |
| var reg = /(>)(<)(\/*)/g; | |
| xml = xml.toString().replace(reg, '$1\r\n$2$3'); | |
| var pad = 0; | |
| var nodes = xml.split('\r\n'); | |
| for(var n in nodes) { | |
| var node = nodes[n]; | |
| var indent = 0; | |
| if (node.match(/.+<\/\w[^>]*>$/)) { |
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |