Blog

A collection of quotes, things learned, and who-knows-whats

Jocko Motivation: Good

My brother-in-law shared this Jocko motivation video with me the other day. Warning: be careful listening to it, it’ll get you all jacked up. Transcription below.

Make Pretty JSON Output in Node.js

By default, the JSON.stringify function outputs minified JSON, see MDN docs. When logging or writing JSON, I usually like to make it look pretty. This can be done by tweaking the function arguments. The first argument is the data to convert. The second (optional) argument is a replacer function, we’ll leave this null. The third (optional) argument is the space to use when formatting the JSON, we’ll use 2 spaces.

Wait for an Element to Be Enabled in NightwatchJS

In NightwatchJS, you can wait for an element to be present, or to be visible. But there is no built-in command to wait for an element to be enabled. Luckily, this can be done by using the :enabled CSS pseudo-class, see MDN docs.

Install Python on Windows Without Admin Access

Sometimes you need to install developer tools on a Windows machine, but you don’t have Admin access. How to get around this, you say? Well, instead of running an installer, you download the binaries you need then add them to your PATH.

Install Node.js on Windows Without Admin Access

Sometimes you need to install developer tools on a Windows machine, but you don’t have Admin access. How to get around this, you say? Well, instead of running an installer, you download the binaries you need then add them to your PATH.

Current page: 22 of 44
Total blog posts: 220