Change System Volume from Command Line on Mac OS

Oftentimes the awesome GUI applications we love are simply gloss over a command line functionality.  While I do love a visual app, it’s always good to know how to do things from command line, if only for the sake of automation.  I’ve covered loads of command line secrets, most notably Mac Camera Access, so I […]
The post Change System Volume from Command Line on Mac OS appeared first on David Walsh Blog.

Link: https://davidwalsh.name/mac-change-volume

How to Get Green Blood in PUBG

My current video game obsession is Player Unknown’s Battleground, also referred to as PUBG.  It’s an online multiplayer game which drops yourself and 99 others into a single, large map and you battle it out until the last man is standing.  It’s frustrating, heart-attack inducing, exciting…it’s PUBG. One problem with the game can be that […]
The post How to Get Green Blood in PUBG appeared first on David Walsh Blog.

Link: https://davidwalsh.name/pubg-green-blood

Aliases with JavaScript Destructuring

Destructuring in JavaScript has totally changed the way JavaScript is written these days;  code is more concise to write but but, from a visual standpoint, the syntax of the language has changed so much.  Any good developer knows, however, that change is the constant we live in. The basic idea behind destructuring in object literals […]
The post Aliases with JavaScript Destructuring appeared first on David Walsh Blog.

Link: https://davidwalsh.name/destructuring-alias

Object.freeze: Immutable Objects

One of my favorite part of JavaScript has always been mutability of objects.  I loved that MooTools and likewise frameworks could modify native prototypes to enhance them with functionality we knew the language need; in fact, I credit MooTools with pushing the web forward. There are cases, however, where you don’t want an object to […]
The post Object.freeze: Immutable Objects appeared first on David Walsh Blog.

Link: https://davidwalsh.name/object-freeze

Repeat Bash Prompts

I’m sure you wont be surprised when I tell you it’s my job to automate things in our my household.  My wife is tech savvy but she relies on me to make tech matters easy for everyone; I guess it’s flattering that she trusts me to do that.  One easy task she’s trusted me with is […]
The post Repeat Bash Prompts appeared first on David Walsh Blog.

Link: https://davidwalsh.name/repeat-bash-prompts

Array and Boolean

One of the annoyances of old-school JavaScript was side effects; then Array.prototype got methods like filter, map, and forEach so we didn’t need to burn variables before looping over values.  I can’t explain how happy I am that the JavaScript language continues to evolve. Every once in a while I need to filter an array by […]
The post Array and Boolean appeared first on David Walsh Blog.

Link: https://davidwalsh.name/array-boolean

Open Multiple Firefox Tabs from Command Line

Now that I work on Firefox Developer Tools, I’m really starting to learn some of the tricks of building, debugging, and launching Firefox.  Once I start using Firefox at a developer level each day, the more I become amazed at how configurable and easy to work with Firefox is. Since a good portion of my […]
The post Open Multiple Firefox Tabs from Command Line appeared first on David Walsh Blog.

Link: https://davidwalsh.name/firefox-multiple-tabs

Replace Repeated Characters with JavaScript

URLs can be tricky to work with because they can be more complicated than the traditional URL format you type in.  I was again reminded of this when I was parsing Webpack URLs when I saw this beauty: webpack-internal:///../rbd/pnpm-volume/144384a5-85d9-4142-b9b9-168eea22eb97/node_modules/.registry.npmjs.org/fbjs/0.8.17/node_modules/fbjs/lib/isNode.js I parsed the URL with new URL(“….") but saw that the pathname included every leading slash: ///../rbd/pnpm-volume/144384a5-85d9-4142-b9b9-168eea22eb97/node_modules/.registry.npmjs.org/fbjs/0.8.17/node_modules/fbjs/lib/isNode.js […]
The post Replace Repeated Characters with JavaScript appeared first on David Walsh Blog.

Link: https://davidwalsh.name/replace-repeated-characters

Search Git Commits Between Dates

One of my weaknesses as a developer is relying on UIs to provide me the data I need.  It’s not a fatal weakness but it does hamper me a bit.  One prime example is relying on GitHub’s interface to review changes; git’s command line provides the information needed with commands but the UI is just […]
The post Search Git Commits Between Dates appeared first on David Walsh Blog.

Link: https://davidwalsh.name/search-git-dates

Count Frames in an Animated GIF

The animated GIF always makes me chuckle; on one hand they seem like a relic of the “old web”, on the other hand they aren’t going anywhere and their meme-like presence seem to only make them more popular.  If you browse through my media blog posts archives, you’ll notice that I’ve written a ton about […]
The post Count Frames in an Animated GIF appeared first on David Walsh Blog.

Link: https://davidwalsh.name/count-frames-animated-gif