-
Port 8080 fail using TiddlyWiki5 and Node on a Raspberry Pi
The Problem There seem a ton of ways to get TiddlyWiki running. I thought I would try the Node.js version on a Raspberry Pi. I wanted a set-up so I could leave the Pi online and access the TiddlyWiki on the rest of my home LAN. After following the instructions I got to the last line:
tiddlywiki mynewwiki --listen And I had TiddlyWiki running on the Pi, but couldn’t access on the rest of the LAN.
-
Forget-me-block: Ethereum Calendar
Introduction As we progress through life’s journey we lose digital information. Who we met, what we talked about, contact details, etc tend to disappear in the digital flux like tears in the rain. Often this happens as we switch providers from Big Tech Corp A to Big Tech Corp B and back again - access is lost to data we have stored in someone else’s stovepipe.
This post details a proof of concept to combat this by hosting a calendar as an Ethereum smart contract.
-
Avoiding Call Revert Exception Error when accessing Truffle Ganache via Ethers in Node
Introduction My default way of connecting to a local instance of the Ethereum blockchain using Truffle Ganache is via the browser using Metamask. Using ethers to connect via node.js is however a little different. As the Ethers documentation, at time of writing, contains few specific mentions of Truffle (primarily I suspect as the lead developer doesn’t use it), I got a couple of call revert exception errors before I figured out what I was doing wrong.
-
Forget-me-block: Message Time Store
Research Aim As part of ongoing research into using the Ethereum blockchain for the purpose of data preservation strategies, the aim is to create the following deliverables:
A smart contract that provides notification of previously recorded information, at a predetermined future date, or prompted by a retrieval request. A DApp (Decentralised Application) based around the smart contract above where the user is notified via an interface such as a web browser.
-
Short, sharp Solidity: pure vs view vs call
Introduction A quick worked example demonstrating the differences between the read-only Solidity elements pure, view and .call() in the Truffle console.
At time of writing I’m using: Truffle v5.1.30 (core: 5.1.30), Solidity v0.5.16 (solc-js), Node v14.4.0, Web3.js v1.2.1, and Ubuntu 20.04 LTS (Regolith flavour).
The smart contract If you want to follow along then after running truffle init in a working folder, copy the following code into contracts/CallDemo.sol:
// SPDX-License-Identifier: Unlicencse pragma solidity ^0.
-
PreciousChickenToken: A guided example of OpenZeppelin's ERC20 using Ethers, Truffle and React
Introduction This guide is a step-by-step demonstration of ERC20 Tokens in React using a local Truffle Ethereum blockchain. It is not, nor is intended to be, a best practice study on how to write ERC20s. It is intended to produce familiarisation and working code, which can be the basis for further education.
ERWhat? ERC20 is a standard for tokens that applies on the Ethereum network (ERC standing for Ethereum Request for Comments) which ensures interoperability of these assets across the network.
-
Decomposing a BigNumber in Truffle Console
The BigNumber problem The Truffle Console when queried tends to return BigNumbers, which look a bit like this:
BN { negative: 0, words: [ 10000, <1 empty item> ], length: 1, red: null } Converting this into individual values, i.e. integers, on the console is not obvious; so an aide memoire follows. I’m using Truffle v5.1.30, node v14.4.0 and npm package @openzeppelin/[email protected]; my OS of choice is Ubuntu 20.04 LTS.
-
Neovim, LaTeX and Zathura in perfect harmony
Introduction Zathura is my pdf viewer of choice: it is minimalist and has vim key bindings by default. I use it a lot when I’m writing TeX files in Neovim, partly as you can open it without leaving Neovim. And when you recompile the TeX file (I tend to use a makefile for this which I run from within vim) then it updates on the fly. As I’m using the i3 window tiling manager as part of Regolith OS this results in my screen reconfiguring itself just how I want it:
-
System Rules on the Command Line
Introduction This is a more of a follow up to my previous post Barebones Guide to JUnit on the Command Line rather than an entirely new topic. System Rules is a “a collection of JUnit rules for testing code that uses java.lang.System” - in other words a way to use JUnit to test for cases where you want to use a System.out.print or similar. The majority of the documentation is how to integrate it with an IDE, this is a quick reference on how to use it at the Linux command line.
-
A taste of MQTT in React
Update Apr 20: This tutorial previously used the MQTT online broker HiveMQ, which worked fine when you were using a local development server. However once uploaded to a web site provider using HTTPS (pretty much everyone now), then it generated a mixed content error message. This message was generated due to an insecure WebSocket (WS) protocol running underneath the secure HTTPS protocol, hence causing the browser to flag this. The solution to this is to use the WebSocket Secure (WSS) protocol, which for some reason I could not get to work with HiveMQ.