Archive Tags About

PreciousChicken: Blog

freelance software

  • May 15
    TiddlyWiki5, Raspberry Pi and Vim: A guide for the command line aficionado

    Introduction The practice of personal information management has always left me unsatisfied; a square hole in the puzzle of life that you just don’t have a square peg for. After looking into options for square pegs I’ve opted for a zettelkasten method implemented via a TiddlyWiki.

  • Mar 28
    Updating Node and npm using Node Version Manager

    Node Version Manager is a “POSIX-compliant bash script to manage multiple active node.js versions.” It is a very useful tool for taming Node.js which can throw up some strange problems when you install it in the standard fashion. However I only ever use two commands, which I can never remember off the top of my head, so here they are: Update Node.js to latest Long Term Support version nvm install --lts Update npm nvm install-latest-npm I only realised this was an option recently thanks to a post by MuffinMan.

  • Mar 27
    Tie down scheme for an Apollo GraphQL server in a Node Docker container

    Introduction GraphQL is a query language for APIs, while Apollo Server is a popular server used for providing GraphQL APIs. This post is a concise handrail as to how to put an Apollo GraphQL server in a Node.js Docker container - a “standardized unit of software that allows developers to isolate their app from its environment.” This tutorial uses the Linux command line and assumes you have already installed Docker and Node. All code can be found in the PreciousChicken/apollo-server-docker-container repository.

  • Feb 21
    Creating a tasks todo list in TiddlyWiki

    Introduction This is entirely based on Francis Meetze’s youtube tutorial, Tracking Tasks in TiddlyWiki, which although is fantastic does not provide the actual text to copy and paste. All credit is his, mistakes are mine. If you haven’t seen the video, TiddlyWiki is a note taking tool (at its simplest); and the following steps allows you to create a special type of tiddler (e.g. note) which allows you to track tasks or todos.

  • Feb 15
    A bash script for creating image thumbnails using ImageMagick

    Recently Google Search Console has been alerting me to mobile usability issues, specifically content wider than screen: Digging further I found the problem was how my blog generating software, Hugo, was linking to images. Typically I insert images into markdown as so: [![Your message here](https://www.preciouschicken.com/blog/images/taste_of_react_your_message.png)](https://www.preciouschicken.com/blog/images/taste_of_react_your_message.png) The image URL features twice: the first one displays the image on page resized to fit the theme; the second provides a ‘clickable’ link to the actual image should the user want to see the image in its full, actual size.

  • Jan 14
    Stacking Vercel, a GraphQL Apollo Server and React

    Introduction Vercel makes it seamless to deploy React single page applications. Given its use of serverless functions however, hosting a GraphQL API using Apollo Server on Vercel is less straightforward. This worked example for Linux demonstrates how it might be done - borrowing code from my earlier Oh-so minimal GraphQL API example with Apollo Server tutorial. All code can be found on github at my vercel-apollo-server-react repo. The end result of the demo is also hosted on Vercel at vercel-apollo-server-react.preciouschicken.vercel.app.

  • Jan 4
    A plain-text issue template for use on Github

    When I’m creating a new issue on Github I like to use a template - it just helps me order my thoughts. Here’s the one I copy and paste if the repository maintainer has not provided one: ## Describe the issue ## To reproduce ## Expected behaviour ## Screenshots ## Configuration - OS: - Browser: ## Additional context Plenty more examples in Steve Mao’s github-issue-templates repo.

  • Jan 1
    On metadata in Hugo - or turning tags to keywords

    TL;DR How (and why) to add the HTML metadata of keywords, description and canonical link to Hugo’s Cactus Plus theme. All code viewable on my blog repository. The best being the enemy of the good Before starting a blog I knew I was in considerable danger of spending a year researching blog content management software, not writing a word and eventually shelving the whole project. As my inspiration for starting a blog was Guzey’s Why you should start a blog right now I figured a good heuristic was to use whatever he did. Hugo, an open-source static site generator, was therefore it.

  • Dec 21
    A no jokes guide to testing a GraphQL API with Jest

    Introduction There are many options to test a GraphQL API, but in this worked example I’m going to use Jest which is a JavaScript testing framework developed by Facebook. I’ve written previously on how to set up a very minimal GraphQL API. This is however a standalone demonstration and relies on a publicly accessible GraphQL API providing Finnish public transport data. As per the awful pun in the title absolutely nothing funny about any of this, just a super concise guide to what you need to do.

  • Nov 16
    Oh-so minimal GraphQL API example with Apollo Server

    Introduction GraphQL is a query language for APIs designed by Facebook and intended as a replacement for REST. Apollo Server is a community maintained open-source server designed for GraphQL that runs on node. This post is a really minimal example of getting Apollo Server running - just so one gets a feel for the core parts. I’m therefore using a simple json flat file as a data store, and querying that with JavaScript; this isn’t a particularly realistic GraphQL use case, but it is deliberately vanilla so as not to distract.

← Newer Posts Older Posts →

preciouschicken.com by PreciousChicken is licensed under CC BY 4.0

Powered by Hugo. Theme based on Cactus Plus.