Re-use Commit Message in Git

To re-use a commit’s message verbatim, including authorship and timestamp information, use -C <commit>: git commit --amend -C @ Pro Tip: @ is a synonym for HEAD, the currently checked-out commit. To reset the date as well, use --date now; to reset the author too, use --reset-author: git commit --amend -C @ --date now git commit --amend -C @ --reset-author git commit --amend -C @ --date now --reset-author If you want to use an existing commit’s message and also want a chance to edit it, use -c <commit>: [Read More]

Uploading to Google Play Music without matching

I’ve had some trouble with Google Play Music’s scan and match service. It sometimes matches tracks to the wrong versions of them. Sometimes the volume of a track is wildly different from what I have locally (with or without ReplayGain). Unfortunately, there is no way to disable matching in Google’s official Music Manager application. gmusicapi supports uploading to Google Play Music without their “scan and match” service. gmusicapi-scripts utilises gmusicapi. Let’s use them! [Read More]

Working around Intel CPU Running at a Maximum of 49%/50%

My laptop had been feeling slower than it had used to, and I was getting more and more certain that it wasn’t just me. One time I opened Task Manager and noticed that whenever I put load on the machine, it maxed out at 49%. Every time. Cooling wasn’t the issue as the laptop fan (which is a dumb fan controlled by hardware, not software) wasn’t spinning up much. After searching online, I stumbled across a thread that would provide the (really rather insane) workaround: Move the Intel processor driver so Windows does not use it. [Read More]

Tips for Ripping Blu-Ray Audio

I recently ripped my first Blu-Ray audio discs. Here are a few tips I’ve discovered along the way: tl;dr Backup the disc using MakeMKV and extract the audio using the updated version of the command under Putting it all together. Ripping the discs MakeMKV can be used to rip and, if necessary, decrypt Blu-Ray audio discs. While it is in beta, it can be evaluated by using the current beta key. [Read More]

Using the option key in macOS Terminal

I like using the Meta+left/right to navigate back and forth between words. On macOS by default, no key is mapped to Meta!

Fortunately for me, it is possible to configure the Option key to act as a Meta key. With the Terminal app selected, this can be done by going in to Terminal > Preferences (Cmd+,) > Profiles > Select your profile > Keyboard > Use Option as Meta.

React: Unexpected token <

I’ve been fiddling around with React recently and made some pages with some normal-looking URLs, despite being a single-page application. This was done using React Router and configuring it to use the History API with browserHistory. Here is one of those URLS: http://localhost:3000/course/react-flux-building-applications When the page was refreshed (either manually or by the hot loader), or when I visited that page manually, I got this odd error in the console: [Read More]

Working around Chroma Subsampling over HDMI on Nvidia cards

If you have chroma subsampling issues when connecting a display via HDMI on an Nvidia card, despite all the settings appearing as if there shouldn’t be any, try creating a new custom profile at a fractionally higher refresh rate and using that new profile. Go in to the Nvidia Control Panel. Go to Display > Change resolution Select Customise… Check “Enable resolutions not exposed by the display” Select Create Custom Resolution… Select the correct horizontal pixels, vertical pixels, colour depth and scan type. [Read More]

Printing Brother labels through GIMP

I’ve been fiddling with a Brother P-Touch D600, which is able to connect to a computer through USB. Since I’ve realised that it appears to Windows as a standard printer, I’ve been trying to see if any applications can print to the device. They can! Notepad works (albeit not in the most useful fashion). But I had a bit of trouble with GIMP. I found that, for some reason, even after setting the correct image/DPI settings and running through page setup, GIMP still seems to think it is printing via A4. [Read More]