Quick Tips Tutorials
Kotlin Coroutines and Delay
Whenever I suspect that there's a timing conflict causing a problem with rendering and directives, I usually opt for a JavaScript
setTimeout
with a delay. ThesetTimeout
code never makes it to production, but it does help me to understand if my code is the...How to Fix ESLint Errors Upon Save in VS Code
Two of the most prominent utilities in web development today are ESLint and Microsoft's Visual Studio Code. I enjoy using both, and I love the integration between both tools, but warnings from ESLint inside Visual Studio Code aren't fulfilling -- I'd rather lint errors be...
How to Display Mode-Specific Images
Now that we have most of the basics of HTML and CSS in the browser, we've begun implementing new features that I would consider "quality of life" improvements, many of which have been inspired by mobile. One great example is the CSS prefers-color-scheme media...
How to Simulate Long HTTP Requests
It happens less frequently these days but there are times when we need to accommodate for a HTTP request timing out. The service could be down, under heavy traffic, or just poorly coded, or any host of other issues.Whenever I need to simulate a...
Hex Opacity Table
We've used hex colors for years but 8-digit hexadecimal is still relatively new. While rgba is simple to understand, 8-digit hex is more difficult, as you need to provide a hex representation of a numeric value.The following is a hexadecimal chart of opacity!.hex-opacity-table {...
How to Set a Default Commit Message
Having a default commit message is really useful for a number of reasons:It can formalize your commit messagesIt serves as a good reminder for the information you should add to your commit message, like issue numberIf you set it to "Drunk AF, don't accept this"To set...
How to Specify User Agent with cURL
Over the years I've shared how to perform a number of actions with cURL: how to send POST data, how to retrieve headers, follow redirects, check GZIP encoding, and more. Another useful cURL directive is sending the user agent, as some...
Override window.alert
For years the only bit of feedback web developers could get was via
alert("{str}")
calls. These days we have the web console but, in rare cases, we don't have a console andalert
calls are our only window into a value at a given time.One problem...Git Branch Autocompletion
Naming git branches is something most of us have down to a science. My branch naming pattern is usually
{issue number}-short-feature-description
, though many developers prefer to lead with the description and end with the issue.Regardless of the pattern you use, having a feature like autocomplete...Duplicated Argument Names
Oftentimes we override or monkey patch functions and, in many cases, there are arguments we don't care too much about. A common practice for those arguments is using
_
for argument names -- it's a generally accepted and known practice for "this isn't important".