Quick Tips Tutorials
Get Weather from Command Line
There's an awesome script making the rounds on Twitter and I've been as excited as everyone else so I thought I'd show it. Many of us live eight hours a day within the command line (although I'm not a vim hippie like some of you) so I try...
Docker: Remove All Images and Containers
I've moved to a new project at Mozilla which uses a much different stack than I'm used to; suddenly I'm thrust into a world of Mercurial, Docker, and a few other technologies I'm not accustomed to. You know what that leads to: foul language, frustration, booze, and...lots of starting over.
console.time & console.timeEnd
The
console.time
andconsole.timeEnd
methods allow developers to time any routine and get a duration in milliseconds. Since JavaScript performance is becoming increasingly important, it's good to know basic techniques for benchmarking routines. One of the most basic benchmarking tools isconsole.time
withconsole.timeEnd
.console.time
starts the time andconsole.timeEnd
stops the timer and...Object.keys
I adore JavaScript objects. Love them. You're probably asking "well, why don't you marry them?" Trust me: if I could, I would. Arrays are nice and all but object keys provide another level of structure and information that is invaluable. For example, it's much faster search an object...
Set Default Browser on Mac
I like using edge browsers each day so that I'm aware of what features my website visitors will be seeing down the road, and to get an early glimpse at new browser and API features. I prefer to do my basic browsing in Chrome Canary and...
Open Firefox in Private Mode by Default
Opening a Firefox Private Window is oftentimes the first step persons who value privacy do when they open their browser. That made me think: can you configure Firefox to open in private mode by default? It turns out you can.
about:config
When you typeabout:config
in the address bar of...Faster npm
npm is the premier package repository on the web and we all use it a ton, obviously. npm has started using basic progress bar graphics to notify users of download progress, which is nice, but appears to slow down the entire process. This tweet blew my mind: It sounds...
Get Element Dimensions After CSS Transform
I've been playing a lot with meta viewports recently due to seeing many HTML5 TV apps coded explicitly for 1280x720 which you'll see on many HD televisions. We all know that it's a much better practice to use responsive design than hardcode dimensions but, that aside, meta...
POST Form Data with cURL
cURL is the magical utility that allows developers to download a URL's content, explore response headers, get stock quotes, confirm our GZip encoding is working, and much more. One more great usage of cUrl for command line is POSTing form data to a server...
ping Attribute
One of the attributes I somehow missed with the HTML5 revolution was the
ping
attribute; Other attributes were more popular,download
being one of them. Hell, I just stumbled upon theping
attribute while reading an old forum post. Theping
attribute of ana
element represents a...