This post is part 91 of 91 in the series Programming by Stealth

This instalment is hosted on GitHub — Read the Show Notes Here.

Tagged with:

While I wrote these MacOS Quick Actions to scratch my own proverbial itch, I think they could be of use to others, so I’m releasing them as open source.

The actions allow you to calculate the word count, line count, and character count of selected text, to convert a text selection to upper case, lower case, or title case, to do the same to the contents of the clipboard, and to convert the clipboard from rich text to plain text and to trim the contents of the clipboard.

You can download the actions and read the docs on GitHub.

As well as describing what each of the Quick Actions do, the GitHub docs also describe how to install the actions, how to use them, and how to assign keyboard shortcuts to them if desired.

If you’re curious to learn how these Quick Actions work, read on.

Read more

Tagged with:

In instalment 30 of the Taming the Terminal series I showed how SSH keys can be used to more securely and conveniently connect to servers. The instructions in that instalment are for Linux-like OSes (including MacOS) where the standard OpenSSH tools are available.

Windows doesn’t ship with OpenSSH (or indeed any SSH implementation), so Windows users who want to SSH need to install some kind of additional software. With Windows 10 there is the obvious option of installing the Windows Subsystem for Linux, but people may prefer a GUI experience. The obvious choice for Windows users is the venerable free and open source PuTTY suite of tools.

The PuTTY SSH client itself is easy to use, and if you install the full suite of apps via the MSI installer (available on their download page) you’ll also get a GUI for generating SSH keys named PuTTYgen.

Read more

Tagged with:

This instalment is hosted on GitHub — Read the Show Notes Here.

Tagged with:

This post is part 90 of 91 in the series Programming by Stealth

This instalment is hosted on GitHub — Read the Show Notes Here.

Tagged with:

Listener @lbutlr pointed out on Twitter that the sample solution to the challenge set in PBS 88 as I originally posted it in PBS 89 had a bug — it sometimes got its maths spectacularly wrong!

PBS 88 Solution Bug

It’s important to note that the bug did not affect all currencies, just some currencies.

The line of code for doing the currency conversion is supremely simple:

How on earth can there be a bug that is something so simple that only manifests for some currencies but not for others?

Read more

Tagged with:

This post is part 89 of 91 in the series Programming by Stealth

This instalment is an experiment in more ways than one. The most obvious being that it is the first to be hosted entirely on GitHub, show notes and all!

Read the Show Notes Here

Tagged with:

This post is part 88 of 91 in the series Programming by Stealth

We’re nearing the end of our series-within-a-series re-capping the many proverbial hats JavaScript objects wear and updating our knowledge to include new features added to the language since we started our JavaScript journey. In this instalment we’ll focus on two very tightly related hats — native JavaScript DOM object, which we’ve chosen not to use, and jQuery object, which wrap native DOM object to give them super-powers.

This instalment will have a slightly unusual structure, we’ll use my sample solution to the challenge set at the end of instalment 85 to illustrate some of the core concepts.

Read more

Tagged with:

This post is part 87 of 91 in the series Programming by Stealth

In the previous instalment we started our redux and update of function objects in JavaScript. This fits into a larger mini-series within the larger series looking at all the different proverbial hats objects wear in JavaScript. The previous instalment was almost all redux, this one by contrast will be entirely dedicated to updated features added in ES6 that we’ve not seen before.

The instalment has a some-what strange structure because I felt it best to change my plans a little and extend the existing challenge by another week. Hopefully you won’t mind the slightly different flow of the sections compared to the norm.

You can download this instalment’s ZIP file here. If you prefer, you can access this instalment’s resources directly at the following links:

Read more

Tagged with:

This post is part 86 of 91 in the series Programming by Stealth

This is the third instalment in a mini-series within the PBS series looking at the many different roles objects fulfil in JavaScript. I’ve been describing these roles as hats, so up to this point we’ve looked at how JavaScript objects have a dictionary hat and an array hat. In future instalments we’ll see that JavaScript objects also have regular expression and string hats. Today though, we’ll start a two-part look at what is probably the most un-expected hat of all — the function hat. Yes, JavaScript uses objects to implement functions. That is to say, every JavaScript function is an object!

Because functions are so important, and because there is a lot of ground to cover, I’ve spread this topic over two instalments. This first instalment will be mostly (but not entirely) a redux, and most of the new content will be covered in the next instalment.

You can download this instalment’s ZIP file here (now via the JSDelivr CDN). If you prefer, you can access this instalment’s resources directly at the following links:

Read more

Tagged with:

keep looking »