Crystal & Alpine on the Raspberry Pi

Bringing together two interesting technologies: Alpine Linux – a small-size and security oriented Linux distribution Crystal – a compiled language with a nice syntax (similar to Ruby) on the Raspberry Pi (armhf / ARMv6, which would also support the Pi Zero W) is not possible currently, as of 21.12.2018. There is no (at least no…

Weiterlesen

Crystal: crystal language Duplicate trail found

max@morpheus:~/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

The Crystal programming language and encodings

Recently I found myself struggling with setting up file encodings correctly in the Crystal programming language, this is why I document this here. Crystal defaults to reading and writing files in UTF-8. Sometimes you will encounter files encoded in e.g. the Windows-1252 code page. (This is the western european code page, e.g. used for German…

Weiterlesen

Alpine Linux first steps

Here’s a short primer to Alpine Linux, specifically for the Raspberry Pi platform Why Alpine Linux? it’s small it can be installed by copying files on the FAT partition of the SD it can run from RAM, the filesystem will remain read-only (persisting changes is of course possible) this is very good for embedded systems…

Weiterlesen

New WEEE Legislation from 15th of August 2018 on

With the directive 2012/19/EU of the European Parliament and of the council on the 4th July of 2012, a new legislative base for the Waste Electrical and Electronic Equipment (WEEE) has been created. Starting with the 15th of August 2018 the so-called transitional period, defined in this document ends. This has massive repercussions, as we…

Weiterlesen

Algolia and using instantsearch.js from your script for Shopify

“Good artists copy, great artists steal.” – Steve Jobs Inspired by pimoroni.com I wanted to implement a similar search on our webshop, buyzero.de as well. buyzero.de is currently powered by Shopify. The search shows results as you type – in the main page, dynamically replacing the previosly displayed content. Very cool, very useful – and…

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