Search

Nalezeno "Quick Tips": 131

AggregateError


One of the big themes of the web these days is concurrency, which leads to accomplishing tasks asynchronously. In doing so, the possibility of multiple errors can occur. Instead of providing a generic error, optimally you’d provide a wealth of error information. TheAggregateError error lets...

Set a Default Node Version with nvm


As I’ve shown you in the past, nvm an excellent utility for switching between Node.js versions. Whether your host machine or CI, building and testing your apps on different Node versions is a necessity. I’ve recently found a few nvm commands that I found really useful during local...

onInput Event


Coding HTML forms has been painful my entire career. Form controls look different between operating systems and browsers, coding client side and server side validation is a nightmare, and inevitably you forget something somewhere along the line. Some behaviors don’t act the way you’d...

Dark Mode in One Line of Code!


Dark mode has seemingly become the desired visual mode for websites and mobile apps alike. Dark mode is easier on the eyes, especially for those like me who like to burn the midnight oil by coding and reading tutorials. Unfortunately not all websites offer dark mode, so it’s up to me...

Fix Seeing “0” in Your JSX Code


The early days of the web felt like the wild west when it came to coding practices — just make it work. Then we became enlightened to better practices, separating HTML from CSS and JavaScript. Then came React and JSX, where we combine JavaScript, HTML, and even CSS with Styled Components...

How to Upload a File via SSH and Command Line


My preference for daily work is usually GUI applications, like Visual Studio Code for text editing and Cyberduck for remote file server management. I’m also a huge fan of automation, so I do try to learn the command line equivalents of UI functions. My latest desire was wanting to know how...

Always Show Arrows for Number Input


While I enjoy small details that make user interfaces more elegant, I also believe that less is more, especially when it comes to native behavior. One native behavior I dislike is that <input type="number" /> elements only show the increment and decrement arrows when the input is focused....

JavaScript Numeric Separators


Writing good code is important — writing code that’s easily human readable is a next level skill. It’s not often that APIs are introduced whose seemingly only useful function is making code more readable, but let me introduce you to JavaScript numeric separators: an API that lets...

CSS :is


There are scores of developers who hate CSS; don’t get it, don’t want to get it, etc. Most of that is either down to inefficiencies within the language or misunderstanding of how to properly construct a website structure. I mostly love CSS but there are some parts of the language that...

Prevent Windows from Sleeping


I have a few processes on my Windows gaming PC that are critical but sometimes get impacted over night as Windows tells my beloved machine to tone it down. My machine has the necessary cooling so I’m happy to let the processes do their work. There is a setting in the UI which allows...

Regular Expression Match Groups


Regular expressions are incredibly powerful but can be difficult to maintain. They’re a skill you learn on the job and, when the suits walk by, make you look incredibly smart if you have a few up on your screen. How can we solve the maintainability problem? With a match groups, as Addy Osmani...

Object.entries


Navigating and managing data structures is a really important skill for every level of engineer to have and improve upon. Over the years, the JavaScript language has continued to provide more methods for managing data structures, from Object.keys to Object.values and so on. One of my favorites...

CSS Smooth Scroll


Improving the user experience of web applications has always been a priority of mine. I always come back to the same though I’ve had for 20 years: “users expect a web app to work — let’s make the app a joy to use.” Over the years we’ve employed JavaScript...

Intl.NumberFormat


Formatting numbers on the client side is an important task, especially when you consider how much raw API usage is in play these days. What’s also important is ensuring those numbers are meaningful to users, no matter where they are in the world, especially if you’re an eCommerce...

VS Code node:console Fix


I’ve been using Microsoft’s Visual Studio Code text editor for years with great success. The app has always been stable, flexible, and the best compliment I can give it: an afterthought. Recently, however, every time I added a console.log to a JavaScript file, VS Code would add import...

Insert Cursor at Any Position at Command Line


As much as I enjoy writing lengthy pieces of JavaScript APIs, techniques, and other tech brilliance, I very much enjoy providing people quick tips to make their daily dev lives better. This is one such post. Oftentimes I’m working with long command line directives, and as you can imagine,...

Use Touch ID for sudo on Mac


The landscape of security is changing quite a bit. We’ve gone from basic username and password to 2FA, facial recognition, fingerprint recognition, and so on. Hell, my Mac unlocks simply when I have my Apple Watch near by. In the end, I probably use the Mac fingerprint key the most....

How to Install a NPM Module from GitHub Branch


In my journey to work more quickly with a project containing loads of dependencies, I’ve come across a few techniques I’ve not needed to use before. I previously wrote about How to Push to a Git Remote Branch of a Different Name — this time we’ll talk about installing...

How to Push to a Git Remote Branch of a Different Name


Git is one of those tools that I’ve always known just enough about to be dangerous, and usually tend to learn new skills when I’m in a position to truly need them. Shockingly enough it has taken me roughly 15 years of using git for me to encounter the need to push to a remote...

Fix “no such file or directory, scandir”


After 15+ years in the web development industry, and seeing the landscape of tooling change, I’ve really lost patience with tooling errors. Like…Old Man Walsh™ just wants yarn install to work so he can get on with his work day. One recent error I ran into was from a dependency...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace