Recently I've been spending a bit of time producing video content of both browser windows and Terminal windows for screen recordings and livestreams on my YouTube channel.
One common issue I have to deal with is trying to optimize the aspect ratio of the window for the video dimensions. In 99% of all cases, I need the window to be 16:9. And ideally, I want the window to be recorded at 1280x720 at 2x 'retina' resolution, so when I capture the window, it will be nice and sharp at 1080p, which is my typical output resolution.
In the past, I'd open up a 1280x720 image at 2x resolution, then drag the Terminal window over it. However, getting that to be pixel perfect is sometimes frustrating, and it's always annoying since it takes me an extra 10-20 seconds per recording.
In my searching, I found this handy article from way back in 2013: How to Resize Windows on your Mac to Specific Sizes.