Installing Xcode Command Line Tools

I need to use git on command line on macOS 11 (Big Sur), and git comes with command line developer tools. Here is how it can be done on macOS: ❯ xcode-select --install xcode-select: note: install requested for command line developer tools On a side note, I notice that every time there is an update to Big Sur, I also have to re-install this Xcode Command Line Tools. Ref: kamermanpr/install-xcodeCLT-homebrew-git.md

February 25, 2021 · 1 min · 70 words · kenno

Create a FreeBSD install disk with dd on OS X

I need to create a bootable FreeBSD install disk and the downloaded file happened to be on a Mac laptop. Since OS X is based on BSD, it also comes with dd utility. After a USB is inserted, I need to identify the disk. This can be done using diskutil command: $ sudo diskutil list /dev/disk0 (internal): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme 251.0 GB disk0 1: EFI EFI 314.6 MB disk0s1 2: Apple_APFS Container disk1 250.7 GB disk0s2 /dev/disk1 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +250.7 GB disk1 Physical Store disk0s2 1: APFS Volume Macintosh HD 98.6 GB disk1s1 2: APFS Volume Preboot 21.4 MB disk1s2 3: APFS Volume Recovery 509.8 MB disk1s3 4: APFS Volume VM 3.2 GB disk1s4 /dev/disk2 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: Apple_partition_scheme *2.1 GB disk2 1: Apple_partition_map 4.1 KB disk2s1 2: Apple_HFS 2.4 MB disk2s2 From the above output, the USB drive is /dev/disk2. Now, I can use dd to copy the image file to the USB drive using the following command: ...

February 9, 2018 · 1 min · 199 words · kenno

Compiling libpng for Mac OS X

I thought Mac OS X comes with libpng pre-installed. It’s pretty clear that I was wrong after I failed to compile a game that uses libpng. The good thing about OS X is that, you can just use fink to easily install Unix/Linux binaries. However, the weird thing is, the game configuration still complains that libpng could not be found. So I decided to install libpng from the source code. For those out there who may face the same problem, you could try as what I describe below. ...

April 20, 2006 · 1 min · 170 words · kenno