What does “Service.EndpointSpec.Mode” changes on docker swarm

<p class="wp-block-paragraph">That is the point. Mode is an enum, it can be “vip” or “dnsrr”.</p> <p class="wp-block-paragraph">As one easily guess, “vip” does not stand for Very Important Person.</p> <p class="wp-block-paragraph">Why should you have the option to assign a Virtual IP or load balance the traffic by DNS Round Robin policy?</p> <p class="wp-block-paragraph">I asked this question […]

Read More…

How to scrape HTML page by DOM and XPath

<p class="wp-block-paragraph">I decided to release this code snip, just a PHP class, for extracting data from an HTML page.</p> <p class="wp-block-paragraph">The code is in <a href="https://github.com/danielecr/verygrabber">https://github.com/danielecr/verygrabber</a> and the packagist can be installed by</p> <blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"> <p class="wp-block-paragraph">composer install smartango/verygrabber</p> </blockquote> <p class="wp-block-paragraph">rif. <a href="https://packagist.org/packages/smartango/verygrabber">https://packagist.org/packages/smartango/verygrabber</a></p> <p class="wp-block-paragraph">This is an old snippet to define a […]

Read More…

What if my blog does not use cookies?

<p class="wp-block-paragraph">My idea concerns was to limit the maintenance work to the minimum, still being effective. But which alternatives are available?</p> <h2 class="wp-block-heading">No analytics</h2> <h3 class="wp-block-heading"><strong>✅ Legal Perspective (EU / GDPR / ePrivacy)</strong></h3> <p class="wp-block-paragraph"><strong>Not using tracking tools like Google Analytics</strong> can indeed <strong>help you avoid needing a cookie consent popup</strong>, <em>if</em>:</p> <p class="wp-block-paragraph">1. You […]

Read More…

Who really need Software Architetture(s)?

<p class="wp-block-paragraph">Every piece of software written has an architecture. Yes, even a bash script has a (embryonal) architecture: it has input, output, and satisfy some kind of feature (or features).</p> <p class="wp-block-paragraph">There are a number of viable choice for implementing or adopt an architecture for the code you are going to write.</p> <h2 class="wp-block-heading">Why is […]

Read More…

How to solve network problem on docker swarm

<p class="wp-block-paragraph">Having different version of docker running on different nodes, it happens to experiencing problems.</p> <p class="wp-block-paragraph">Docker Swarm is a community project maintained in <a href="https://github.com/moby/moby">https://github.com/moby/moby</a> github repository, it lack a number of features that are provided by kubernetes, but still someone is using this for experimental and bridge-to-kubernetes, because it is very simple to […]

Read More…

How to implement Authorisation Workflow for Amazon SP API

<p class="wp-block-paragraph">A<strong>mazon Selling Partner API</strong> documents two kinds of authorization workflow, one starting from your website app <a href="https://developer-docs.amazon.com/sp-api/docs/website-authorization-workflow" rel="noreferrer noopener" target="_blank">https://developer-docs.amazon.com/sp-api/docs/website-authorization-workflow</a>, and the other one starting from the Amazon App store.</p> <h3 class="wp-block-heading">Authorize from your website</h3> <p class="wp-block-paragraph">While implementing the authorize workflow from your website, you start assuming that the user is already logged in. […]

Read More…

Error Management: Go vs Rust vs Exception-based

<p class="wp-block-paragraph">I want to write some reference for error management in Rust and in Go, versus exception-class based language, maybe Python deserve a specific session, I will update that, but basically the point of exception-based error management is the sub-classing of a Exception class and the <code>try {…} catch(…) {…}</code> block for handling exceptional cases</p> […]

Read More…

multi stage rocket flying

Dive into (useless?) uncovered case of multistage dockerfile

<p class="wp-block-paragraph">Looking at the upstream documentation of <a href="https://docs.docker.com/build/building/multi-stage/">Multi-stage builds</a> there are some examples but this is missing:</p> <p class="wp-block-paragraph">Ok, I mean, the example by itself is useless, but “it works”. Try:</p> <p class="wp-block-paragraph"><code>docker build -f Dockerfile -t copiedfrom-rust:v0.1 .</code></p> <p class="wp-block-paragraph">Then:</p> <p class="wp-block-paragraph"><code>docker run -it copiedfrom-rust:v0.1 sh</code></p> <h2 class="wp-block-heading">Real use case scenario</h2> <p class="wp-block-paragraph">Lets […]

Read More…

DAGs from Graph

<p class="wp-block-paragraph">Still ChatGPT. But bad experience this time.</p> <p class="wp-block-paragraph">I asked all possible distinct DAGs given an adjacency matrix of a graph (probably not connected). I insisted that the graph is not connected. But “it” pretended to just make a loop over the nodes and build “all possible dags” (it pretends).</p> <p class="wp-block-paragraph">I must note […]

Read More…

The Power of Windows in Rust: Unleashing the Potential of Sequential Data

<p class="wp-block-paragraph"><strong>Just catch a glimpse from your windows (it was: “introduction”)</strong></p> <p class="wp-block-paragraph">The windows method in Rust’s standard library is a powerful tool for processing sequential data. It enables efficient iteration over fixed-size, overlapping windows of elements in a collection, offering a functional and concise approach to data manipulation. This article will discuss the usefulness […]

Read More…