Kemal routing redirecting a subtree

This code snippet shows you how to redirect an entire subtree and remove the first part of the subtree. This might come in useful, for example when you have outside links referencing different languages (e.g. /de /fr /it) and content paths in them, and you want to serve everything from the same endpoints. Crystal Lang…

Weiterlesen

Using plink (Pageant) on Windows 10 with Git for Windows

The current Git for Windows installer does not allow me to select Tortoise Plink during the installation, as was described here on Stackoverflow. Instead I followed the installation, and set an environment variable. Select “Use bundled OpenSSH” here. search for “enviro” in the Windows search. (my screenshot is in German, but it will find the…

Weiterlesen

mailerlite API error code 422 for subscribers endpoint

Today, I was implementing the interfacing between PiCockpit.com and the Mailerlite API (which we use aus our newsletter software). https://api.mailerlite.com/api/v2/subscribers I got the following error message: The POST request was returning 422 as status code. Unfortunately there is little documentation about that on Mailerlite. My implementation was correct (this is Crystal Lang by the way):…

Weiterlesen

npm Webpack code ELIFECYCLE errno 1

When building the PiCockpit frontend code (which is packaged using Webpack) on a different computer, I ran into the following issue: cross-env NODE_ENV=production webpack –progress –hide-modules –mode=productiontype: ‘object’,additionalProperties: true,properties: {apply: {description: ‘The run point of the plugin, required method.’,instanceof: ‘Function’,tsType: “(compiler: import(‘../lib/Compiler’)) => void”}},required: [ ‘apply’ ]}},title: ‘WebpackOptions’,description: ‘Options object as provided by the user.’,type:…

Weiterlesen

Updating Variant Images in Shopify using CSV

Shopify has a possibility to update fields using a CSV file. This is useful if you want to update a lot of images. Shopify will download these images from a remote server if necessary, so you can provide URLs of your choice. You only need to provide the values you want to update, along with…

Weiterlesen

Raspberry Pi Compute Module 4 vs Compute Module 3

Raspberry Pi launched Compute Module 4, as a successor to Compute Module 3B+. The Compute Module 4 (CM4) is a so-called System on Module (SoM), which contains core parts which make up a Raspberry Pi 4, for example, and in addition to that eMMC Flash in different sizes (ranging from none for the Lite module…

Weiterlesen

Ab sofort Pi 4 / 2 GB zum Pi 4 / 1 GB Preis

Dank des Raspberry Pi Geburtstags haben wir jetzt wieder mehr Leistung zum gleichen Preis: Die Raspberry Pi Trading hat den Pi 4 / 2 GB im Preis reduziert! Das 2 GB Modell kostet jetzt genauso viel wie das 1 GB Modell. Jetzt bei buyzero.de Raspberry Pi 4 kaufen.  

Weiterlesen

Crystal: crystal language Duplicate trail found

[email protected]:~/crystal/taxgod$ crystal run src/taxgod.cr Unhandled exception: Duplicate trail found ‘vat-correction’ (Radix::Tree::DuplicateError) from lib/radix/src/radix/tree.cr:0:11 in ‘add’ from lib/radix/src/radix/tree.cr:149:11 in ‘add’ from lib/radix/src/radix/tree.cr:149:11 in ‘add’ from lib/radix/src/radix/tree.cr:108:9 in ‘add’ from lib/kemal/src/kemal/route_handler.cr:49:7 in ‘add_to_radix_tree’ from lib/kemal/src/kemal/route_handler.cr:21:7 in ‘add_route’ from lib/kemal/src/kemal/dsl.cr:12:1 in ‘post’ from src/vatcorrection.cr:26:2 in ‘__crystal_main’ from /usr/share/crystal/src/crystal/main.cr:97:5 in ‘main_user_code’ from /usr/share/crystal/src/crystal/main.cr:86:7 in ‘main’ from /usr/share/crystal/src/crystal/main.cr:106:3 in ‘main’…

Weiterlesen

OPENDROP V2.0 FIRMWARE BACKUP & RESTORE WITH AVRDUDE

Short overview OpenDrop-v2.0-Firmware_avrdude_guide (this article as PDF, recommended!) opendrop2.0_firmware (for OpenDrop V2.0 as ZIP) This document & blog post is for people who: want to get a basic understanding for avrdude usage with a Sparkfun Pro Micro (or compatible) board (ATmega32U4 5V, 16 MHz) get firmware files for the OpenDrop v2.0 (four push buttons) – the firmware…

Weiterlesen