File Extension Change Shortcut
Changing the extension of a file seems like something you would do often enough to know how to do it from command line. One annoying part of moving a file is repeating the file name a second time when all I want to do is change the extension. A minor annoyance but an annoyance nonetheless.
I recently found that you can quickly change a file's extension with this handy shortcut:
# mv filename.{old,new}
mv code.{txt,js}
The braced syntax provides a way to quickly swap out the file extension without needing to repeat the file name. Sweet!
I work with an awesome cast of developers at Mozilla, and one of them in Daniel Buchner. Daniel's shared with me an awesome strategy for detecting when nodes have been injected into a parent node without using the deprecated DOM Events API.
Today we get to play amazing games on our super powered game consoles, PCs, VR headsets, and even mobile devices. While I enjoy playing new games these days, I do long for the retro gaming systems I had when I was a kid: the original Nintendo...
I've gone on a million rants about the lack of progress with CSS and how I'm happy that both JavaScript and browser-specific CSS have tried to push web design forward. One of those browser-specific CSS properties we love is CSS transformations. CSS transformations...
This does not only work for file extensions. You can generally use the curly braces syntax to “generate” multiple words/arguments for a bash command: http://www.gnu.org/software/bash/manual/bashref.html#Brace-Expansion