Quick Tips Tutorials
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...
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...
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...Return a Default Value with Promises Using catch
Last week I tweeted all of you looking for your best JavaScript Array and Promise tricks, and as always, it didn't disappoint -- I learned quite a bit!Today's JavaScript Promise trick is brought to you by Claudio Semeraro: how to use
catch
to...Break a forEach Loop with JavaScript
I've written a number of blog posts about JavaScript tricks: Promise tricks, type conversion tricks, spread tricks, and a host of other JavaScript tricks. I recently ran into another JavaScript trick that blew my mind: how to break a
forEach
Use a Submit Button Outside of a Form!
Have you ever felt like you've been a professional developer or designer forever, and somehow not known something basic, and borderline hate yourself? That's me with a trick that was introduced to me by Miguel Piedrafita:🔥 You can submit forms from a button outside of...
Detect Generator Functions with JavaScript
In the current JavaScript climate of new syntaxes, features, and using loads of external libraries, it seems harder than ever to be sure what your functions are being given or even what the data represents. Of course, we've come up with Flow and TypeScript to help...
git: Remove Untracked Files
I've always said that I know just enough about git to get the job done, but also do something destructive. Nothing embodies that more than my recent mistake. I somehow found a git repository full of untracked files and
git stash
wouldn't fix it.Node isConnected
Every so often I discover a property in JavaScript objects that I didn't know existed, oftentimes using another trick to accomplish the same functionality. One such property I just learned about was
isConnected
, a node property that attached to a context (i.e.document
).Here's how to...How to Prevent Pasting into an Input
Every once in a while I get to a website that doesn't allow me to paste into a form input. In most cases it's something to do with login credentials (username and or password) and auth codes. So how are they preventing me from...