Regain Disk Space from Homebrew

One of my favorite utilities is Homebrew, the shell utility for installing and upgrading other utilities — it’s a lazy developer’s dream.  Dreams can easily turn to nightmares, however, and I recently learned that Homebrew caches older versions of installed packages, leading to loads of disk space being used up by old files. Want all […]
The post Regain Disk Space from Homebrew appeared first on David Walsh Blog.

Link: https://davidwalsh.name/brew-cleanup

Reset File Changes with git

There are many different philosophies when it comes to code review but mine is fairly simple:  I like receiving early “work in progress” patches, I like to be positive in my code review messages, and if a patch is 90% there, I like to finish the patch myself so the project and contributor both benefit. […]
The post Reset File Changes with git appeared first on David Walsh Blog.

Link: https://davidwalsh.name/reset-file-git

Set a Default Push Remote with git

During my early days of git usage, my config allowed me to simply type git push instead of git push {origin} {branch_name} which I need to now.  Up until recently I needed to type out the long version…(I know)…which was incredibly annoying because I like using detailed branch names. I’d finally had enough of the copy and […]
The post Set a Default Push Remote with git appeared first on David Walsh Blog.

Link: https://davidwalsh.name/git-default-remote

Find Empty Files and Directories from Command Line

If you are anything like me, you like to keep your projects as tight as possible.  By “tight” I mean no lingering, useless files or directories, because bloat is an incredible annoyance and distraction.  And we don’t want distractions, do we? There’s a really easy way to find empty files and directories from the command […]
The post Find Empty Files and Directories from Command Line appeared first on David Walsh Blog.

Link: https://davidwalsh.name/find-empty-files

How to Create and Manage CRON Jobs

Interval or scheduled task execution is used all over computer science, the most obvious use case being transaction batching.  For web developers like myself, the most obvious use case is executing CRON jobs for this blog, including polling for scheduled blog post publishing and a variety of other tasks.  I also use crontab on my […]
The post How to Create and Manage CRON Jobs appeared first on David Walsh Blog.

Link: https://davidwalsh.name/cron-job

Detect Video Resolution

Video resolution has always been something I’ve been interested in, starting with the purchase of my first HD television.  The HD video quality felt life-changing, especially when watching the World Cup, which I’d bought that TV for.  I carried that enthusiasm through to being an early adopter of 4K TVs, which are absolutely amazing. These […]
The post Detect Video Resolution appeared first on David Walsh Blog.

Link: https://davidwalsh.name/detect-video-resolution

Faster PR Pulls with Git Aliases

I love the traditional GitHub workflow of receive pull request, pull down pull request to test, and merge the pull request.  GitHub makes the first and the third steps easy but pulling down pull requests from new contributors requires some boilerplate work that annoys me… …namely navigating to their fork and copying the fork address […]
The post Faster PR Pulls with Git Aliases appeared first on David Walsh Blog.

Link: https://davidwalsh.name/pull-down-pr

Create a Password Protected ZIP

Have you ever wanted to put very basic security (a passphrase) on a file?  You can do so if you ZIP the file — let’s have a look at how you can password-protect a ZIP file! Creating a password protected ZIP file from command line is done so via the following command: # zip -er […]
The post Create a Password Protected ZIP appeared first on David Walsh Blog.

Link: https://davidwalsh.name/password-protected-zip

Convert JPG, PNG, and Animated GIF to WEBP

New image formats like WEP and MOZJPEG will be a major boost to load time on the web.  The majority of page load and render time is usually attributed to unoptimized images, so these new formats will make both mobile and desktop load times faster.  I’ve taught you how to detect WEBP support but we’ve […]
The post Convert JPG, PNG, and Animated GIF to WEBP appeared first on David Walsh Blog.

Link: https://davidwalsh.name/convert-webp

Create Context Menu Items in Mac Finder

As much as I like exercising my command line skills, for many tasks I’d rather click a time or two.  The problem is that yarn install, brew install, and other package managers don’t come with UI extending capabilities…so knowledgable people like us need to find a way to shoehorn those functionality into a UI.  That […]
The post Create Context Menu Items in Mac Finder appeared first on David Walsh Blog.

Link: https://davidwalsh.name/mac-context-menu