Skip to content

Instantly share code, notes, and snippets.

@mcalthrop
mcalthrop / MANAGING-THE-NODE-VERSION.md
Created June 10, 2022 13:56
Managing the node version

Managing the node version

Defining the version of node used in a node-based repository can be a task that is overlooked.

What's the problem?

On a few occasions, I have come across a scenario similar to the following:

  • I am running a node-based application locally without any problems
  • a new developer joins the team, and tries to run it locally too
@mcalthrop
mcalthrop / NODE-PACKAGE-MAINTENANCE.md
Last active June 10, 2022 12:51
Thoughts on node package maintenance

Thoughts on node package maintenance

I've worked on a wide variety of node-based repositories in many organisations, and one of the questions that keeps coming up is this:

How do we effectively keep our node packages up to date?

After trying several different ways, I have recently come across a solution I have found really effective.

What's the problem?

import React from 'react';
interface FromTo {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
from: any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
to: any;
}
type Changes = Record<string, FromTo>;
@mcalthrop
mcalthrop / nvm-and-node-with-apple-m1-chip.md
Last active November 17, 2021 22:41
Using Node with Apple's new M1 chip

Using NVM and node with Apple's new M1 chip

20 January 2021

Rationale

At the time of writing, there are no pre-compiled NodeJS binaries for versions prior to 15.x for Apple's new M1 chip (arm64 architecture).

Additional issues encountered:

@mcalthrop
mcalthrop / accessible-vertical-css-transitions.md
Created February 26, 2019 12:30
Accessible vertical CSS transitions

Accessible vertical CSS transitions

Requirements

The goal is to transition an element with the following as requirements:

  1. Transition an element vertically, between visible and not visible
  2. Transition must be possible in both directions: a. from visible to not visible b. from not visible to visible

A heading (level 1)

Another heading (level 2)

A paragraph.

Profound.


@mcalthrop
mcalthrop / font-awesome-icons-as-characters.html
Last active December 8, 2015 11:22
Font-awesome icons as characters
<html>
<head>
<title>Font-awesome icons as characters</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<style>
* {
font-family: Helvetica, Arial, sans-serif;
}