Recovering Node-RED Flows After Changing Hostname

I recently changed the hostname on my Raspberry Pi and was rather surprised (and initially worried) when the next time I started Node-RED all my flows has disappeared 😱 It turns out that the flows are connected to the computer hostname by their naming convention. Someone even filed a bug regarding this unexpected behavior. The …

Piping Bitcoin RPC Commands

If you want to get the block header of the latest block generated on the bitcoin blockchain using bitcoin-cli it’s a little tricky (and hard to say!). You need to first find the latest block number (height), then find the hash of that block and then get the header using the hash. Since the getblockheader …

IoT with Node-RED and Python

Now I have two Raspberry Pis running, one as a Bitcoin full node and the other mostly used as a dev/experimentation machine I decided it’s time to put the dev machine to some use. I’d also like to learn more about IoT (Internet of Things) and how they are wired together and communicate so this …

Introduction to Image Classification using UiPath and Python

After my previous post showing image classification using UiPath and Python generated many questions about how to implement the same I decided to expand upon the theme and give a more detailed description about how to achieve this. My starting point was thinking how I might integrate UiPath with python now that it’s integrated within the platform. I find …

How to use Amazon S3 from Node-RED

Amazon S3 (Simple Storage Service) is a very commonly used object storage solution that’s cheap to use and highly reliable. Think of it as a file system in the cloud with enterprise features that you can use to store almost anything. Amazon S3 This guide assumes you already have a working Amazon S3 account and …

Linux Command Line Calendar

I’ve used Linux for almost 20 years and somehow never knew you could get a calendar on the command line 🤯🤯 Just type ‘cal’ for the current month or cal followed by the year (‘cal 2019’ for example) to get a full year. See the man pages for details. me@myserver:~$ cal 2019 2019 January February …

Bitcoin RPC Commands over SSH Tunnel

If you’re running a Bitcoin full node and want to run RPC commands against the Bitcoin client from a remote machine the easiest and safest way to do this is using Port Forwarding over an SSH connection. What is Port Forwarding used for? Secure access to a port that is otherwise not listening on a …

Generating New Product Names using Neural Networks

So everyone knows Machine Learning / Artificial Intelligence / Cognitive Computing, call it what you will, is the new marketing catchphrase for people trying to sell their software products and services. You can be sure if it’s not already baked in then it’s in the roadmap for 2020. It used to be ‘Big Data’, but …

Getting Database and Table Sizes in Postgres

Total Database Size This SQL simply gets the total size of the database in a human readable format. SELECT pg_size_pretty(pg_database_size(‘postgres’)) as db_size List all Tables This lists all the tables in the database public schema. SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname = ‘public’ Search Schema for Column Name I often need to search all the …