If you’ve written any frontend app with authentication, you've probably used Axios interceptors. But have you ever thought about the order in which they run? I hadn’t, until I ran into a bug (or maybe a feature). While setting up my refresh token logic, I created two request interceptors like this: instance . interceptors . request . use ( refreshTokenInterceptor ) ; instance . interceptors .…
Recently, I ran into an annoying issue while working on a project. The repository has a configuration file that's checked into Git, but I need to modify it to suit my development environment. Unfortunately, since the file is tracked, Git constantly flags it as modified. Every time I want to pull new changes, I have to stash and pop my local changes, and it becomes annoying fast. Fortunately, Git…
I recently learned a difference between Primitive types and Reference types. I thought it would be great to write a blog post about this topic. Let's start with a code snippet let a = 1 ; let b = a ; console . log ( b ) ; // 1 a = 2 ; console . log ( b ) ; // 1 Well this looks okay let's do the same thing with an object let a = { someText : "Hello" , } ; let b = a ; console . log ( b ) ; // {…
What is an alias This would be a quick tutorial. If you ever checked your .bashrc file probably saw the alias keyword. Creating alias in bash is like creating shortcut for command so instead of typing git status you can type gs and run the same command. Creating new alias Let's create an alias for git status command. Open your .bashrc file, you can use any text editor Add alias gs="git status" to…