Articles

zsh compinit: insecure directories, run compaudit for list.

I’ve installed nvm through brew on macOS Big Sur 11.2.3 (20D91) and got:

zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]?

After research seems I had to update all files/folders with correct permissions using:

compaudit | xargs chmod g-w

Note that sudo is not needed here as long as the file belongs to root.[……]

Read more

Stop using logical NOT ! and casting using double exclamation mark !! in JavaScript / TypeScript

A word of introduction

Exclamation mark ! is the logical NOT (!) operator (logical complement, negation) that takes truth to falsity and vice versa. Double exclamation mark !! is the logical NOT NOT (!!)

In JavaScript, the values false, null, undefined, 0, -0, NaN, and '' (empty string) are “falsy” values. All other values are “truthy”. See: ECMAScript 2019 7.1.2 ToBoolean.

Below table provides details of how ! and !! applied to various values:

! and !! applied to various values

value!value!!value

false
true
false[……]

Read more

zsh: command not found: wget (MacOS)

When you try to use wget on MacOS (at least Big Sur) then you may get an error message zsh: command not found: wget. You can resolve it by simply installing wget using brew.

brew install wget

Then the console messages should show more or less:

==> Downloading https://homebrew.bintray.com/bottles/wget-1.21.1.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/e6ea2a50b8196206f7072360e713535bb16fb786c8b5fe23cab05757e0f67b13?respo
######################################################################## 100.0%[......]

Read more

Generate background CSS rule with SVG as data URI using Sass

Highly likely you’ve heard of data URIs. It’s a way of including a resource inside your CSS. No extra separate HTTP request is then needed. The format that you use in a data URI can vary. Essentially you just tell it what content type it is (e.g. image/png), semicolon, then the data of that file.

Using svg as a background is great. However, preparing base64 encoded data to embed svg inside your CSS is a bit tricky. I have used Sass for that purpose thanks to https://gist.github.com/rniswonger/c4cf85fbbd50c5be4cbb7bd8087dc388. Here is the cod[……]

Read more

Adding Tags in Google Tag Manager and blocking trackers

Today’s day quite a lot of users are using different solutions to keep their privacy on a good level. However, that means that when the page is loaded some content will never be loaded as they are being blocked by ad/trackers blockers.

So, if you’re using Google Tag Manager and add tags then everything that is being triggered there will not work when Google Tag Manager will be blocked.

For example, using Brave browser Google Tag Manager is blocked by default. See:

Brave Browser cross-site trackers blocked

I’d recommend to check if you need to trigger anything inside Google[……]

Read more

3 things you should know when you want to add your changes to the stage using Git

You want to add your changes to the stage using Git? Here we go:

  • git add -A. It adds all files to the stages.
  • git add .. It adds new and modified, but without deleted files.
  • git add -u. It adds to the stages modified and deleted, but without new files.

Then commit using: git commit -m "Here is a commit message".

[……]

Read more

Overestimating some of today’s programming features

I see a some people are fascinated by ES6/TypeScript/React (and the like)/Babel/Webpack features. However, not all the gold that shines. Let me explore couple of areas from my perspective and experience.

ECMAScript 6

Arrow functions

One of the most feature that I have no idea what was the purpose of invention. Most of the opinions says that it simplifies the code and solves the problem with this context. While I appreciate solving the problem with this then I strongly disagree that it simplifies the code. The main objection is that I c[……]

Read more

Automated WCAG Monitoring Community Group

I’ve just joined to the Automated WCAG Monitoring Community Group as this matches perfectly to the work I am doing on ASLint. The Automated WCAG Monitoring community group, founded in 2014, is a W3C community with the focused to develop reliable rules for WCAG testing, both automated and semi-automated. The group goal is to assist developers of test tools to improve the accuracy and completeness of their tools.[……]

Read more

Pagination