Why handwriting? I’ve been spending a lot of time in a classroom environment and taking notes. My preferred way to do this is in a notepad, as despite leading a pretty digitised life I find taking notes like this to be the lowest friction solution. Plus, who wants to listen to someone tip-tapping away on a keyboard, right? Why digitise it? I found that a lot of my notes were either being forgotten…
The problem I have a passionate desire to fix the current state of my Linux installation, and to be able to know when files have changed and either revert the changes or store them in source control. Why do I want to do this? Several reasons: I like the idea that my system is disposable . It should be easy to blow away a Linux install because I know I can restore it easily. Rather than being an…
I always enjoy looking at other how other people have their workstations set up, from their battlestation to their hacked-together Linux setup , and more detailed looks at what people use . I’ve been pretty much settled on the same setup for a while now, and this post breaks it down. Hardware I’ve got an AMD processor and some graphics card. I bought it off-the shelf and to be honest my days of…
I’ve got a working NixOS setup which I’d like to convert to use Flakes in order to improve reproduceablility. I had a scenario recently whereby I updated the channels I was subscribed to and then rebuilt, and had a build error. There’s no way to roll back the channel update in that case. Flakes should fix this, because my current build will pin the commit hashes of versions it was built with. The…
I want to allow “questions” to have multiple “categories”. We need a join table for that, so let’s generate a migration: mix ecto.gen.migration add_questions_to_categories Then in our new migration: defmodule Quizzical.Repo.Migrations.AddQuestionsToCategories do use Ecto.Migration def change do create table(:questions_categories, primary_key: false) do add :question_id, references(:questions,…
Auth0’s Get User Info endpoint does not include any user or app metadata. In order to do this, you can create a rule in their dashboard: function (user, context, callback) { const namespace = 'https://changeme/'; context.idToken[namespace + 'user_metadata'] = user.user_metadata; context.idToken[namespace + 'app_metadata'] = user.app_metadata; callback(null, user, context); } The namespace is…
Create a Dockerfile: FROM ruby:2.6 WORKDIR /app COPY Gemfile ./ RUN bundle install COPY . /app A handy Makefile: PREFIX = docker run -v "$(shell pwd)":/app --rm --name appname imagename build: docker build -t imagename . test: build $(PREFIX) bundle exec rspec spec Create a Gemfile and add some gems to it: bundle init bundle add rspec And you can now create the following directory structure in…
The documentation for Yodlee’s Fastlink leaves something to be desired. It mentions that you can use window.postMessage to receive communications from the Fastlink iFrame, but in reality these never arrive. Unless… Having rummaged through the Fastlink JavaScript source, I found that the postMessage would not be sent unless you specified a parameter called locationurl , something that’s only…
This post is also available on the blog of my software company, Go Tripod . Amazon’s cloud offering, AWS, provides a wealth of resources for developers and infrastructure engineers. In this article, I’ll show how Amazon Cognito can be used to record user preferences and data without having to set up a server or database. I’ll build a small React Native application which allows a user to log in…
Events are a great way of communicating between components, but they should be used carefully to avoid creating an unfathomable mess of interconnections. In this example, we’ll show how to use an event emitter to allow a React Native NavigatorIOS to talk to its child components. ' use strict ' ; var React = require ( ' react-native ' ); var EventEmitter = require ( ' EventEmitter ' ); var…