My Essentials Tools

I am going to hand over my work device this Friday since it will be my last day here in Boost. I thought it would be interesting to document the collection of tools I have used over the years. Many of these have been already documented in my dotfiles repo but still, I just want to share it here for fun.

Selected CLI tools

I think I have countless CLI apps installed for development and most of it are pretty common to have, like git, mysql or too low-level (coreutils, cmake) so I will exclude those. Here is the list of tools that I like and somewhat uncommon, most of which are installed using brew.

  • ack: the better grep
  • antigen: plugin manager for zsh. It’s similar to oh-my-zsh, but it has faster startup times.
  • asdf: to manage multiple versions of ruby, node, python, etc. I don’t have to install and remember how to use nvm or rbenv anymore.
  • carthage: dependency manager for iOS, similar to Cocoapods. Installed it since my current company uses it, but I don’t really prefer it.
  • diff-so-fancy: to prettify git diff output in terminal.
  • chisel: Collection of LLDB commands to help debug iOS apps. Created by the Facebook team.
  • gh: CLI to interact with GitHub API. I use it to quickly create or delete remote repo from terminal.
  • goreleaser: to package go app as binaries.
  • mkcert: to create local self-signed certificates. I usually use it when I need to create certs during app development.
  • quicktype: to convert JSON to model quickly. Rarely used it since I mostly use their app instead.
  • tree: to quickly inspect the directory structure from CLI
  • swiftlint: linter for Swift to enforce coding style guidelines.
  • vim: :q!
  • xcbeautify to prettify the xcodebuild logs. Installed when I was working on setting up iOS CI/CD pipelines.
  • xcodes: to install Xcode from CLI. Friends don’t let friends installed Xcode through AppStore. It helps me too easily switch between multiple Xcodes versions too.
  • youtube-dl: to download videos
  • z: to easily jump around between directories.

Noteworthy Apps

Beyond CLI tools, here are some applications that have been integral to my development workflow:

  • Xcode : the main tool I use for my day-to-day development. I have multiple Xcode installed in fact. Xcode-15.0.0, Xcode-14.3.1 and Xcode-14.1.0. All installed using xcodes .
  • Copilot for Xcode: 3rd-party app that I use to have GitHub Copilot on Xcode. It’s not as good as Copilot on VSCode, but it works.
  • Android Studio: official IDE for Android. I use it sometimes when I feel like learning Android or Flutter development.
  • VSCode: code editor I use for anything besides Swift.
  • Ulysses: app focus on writing. Bought a 1-year subscription when I first published a post on my SubStack account, SwiftByte. 🙈
  • Raycast: Spotlight on steroids. I used to use Alfred 3, but I don’t really feel like paying for the upgrades, so I tried RayCast. Fell in love with it right away.
  • Figma: the native app for Figma. I used it whenever I want to hyper-focus on building UIs.
  • DBeaver: database browser. Can support multiple types of DB like mysql, postgresql, sqlite etc through plugins. Installed using Cask
  • DB Browser for sqlite: similar to DBeaver. I use it whenever I need to inspect local database in mobile apps since it has a much simpler interface. Installed using Cask.
  • Logseq: a note-taking app or personal knowledge base? I don’t know, but I used it for quick note-taking and also document my learnings. Though I have since migrated to Obsidian. Installed using Cask.
  • Obsidian: somewhat similar to Logseq.
  • NetNewsWire: RSS reader.
  • Arc: the better Chrome browser. Although I feel like migrating to Safari soon since it already supports multiple profiles.
  • Deckset: to make pretty presentations using Markdown. Usually, I use this whenever I have a knowledge sharing session.
  • Hammerspoon: macOS automation tools through Lua scripting. I use it to script tiling-window manager and some other stuffs. Installed using Cask.
  • The Unarchiver: for unarchiving any non .zip files. Installed using Cask.
  • ImageOptim: to compress images before uploading it to web. Installed using Cask.
  • Postman: for debugging and testing HTTP requests
  • Apple Developer: honestly, I hate the fact that most of Apple docs are hidden behind WWDC videos.
  • SF Symbols: for inspecting Apple SF Symbols icons.
  • Discord: for chats. I joined programming related groups here.
  • iTerm2: terminal emulator. Just better features compared to stock terminal. Installed using Cask
  • Docker: Don’t really use it that much, but it’s nice to have whenever I want to fire up an instance since most OSS these days provide docker images. Installed using Cask.
  • Dash: API documentation browser. I still have the old version. Planning to upgrade soon.
  • Sublime Merge: git client. I use it together with git CLI. Mostly for resolving conflicts and visualising git tree.
  • Telegram: for chats. Joined a couple of programming related groups here as well. Installed using Cask
  • tomato: my own app. A simple pomodoro app that lives in my menu bar. Installed using Cask.

Others

  • font-iosevka: my favourite monospace fonts. Installed using brew.

These tools have speed up my workflow over the years and made my life easier. I hope you find some of these useful.

How to Delete Github Repository Quickly

I did some spring-cleaning on my Github repositories a few days ago.

I was doing it manually at first, by going through the repository settings page, clicked on the delete button in the Danger Zone section, went through several popups and finally entered the repository name to confirm the deletion. Yeah… it’s such a boring chore.

Then, I remembered that Github has a cli client that I have been using for creating repo and pull requests. Figured I might take a look again at their docs to see if there’s a command for deleting a repository or setting a repository to private, and there is one! The usage is simple too. Here’s how.

Install gh

If you don’t have it install yet, simply run the following command:

brew install gh

Once that’s done, run the following command to authenticate with Github:

gh auth login

To delete a repository

To delete a repository, run the following command

# add --yes to confirm deletion without prompting
gh repo delete $REPO --yes

To change from public to private repository

To modify repository access, run the following command:

gh repo edit $REPO --visibility=private

Replace $REPO with the repo name. You can use either the full URL or the repo name. For example.

# to delete using url
gh repo delete https://github.com/faizmokh/dummyrepo

# to modify access using repo name
gh repo edit faizmokh/dummyrepo --visibility=private

That’s all. Go through the docs, if you want to know what else you can do with gh

References:

  1. gh cli documentation

A Cheaper Way to Renew Apple Developer Account

My Apple Developer account renewal lapsed early last year because my bank flagged it as foreign transaction. They did call me to verify it but the transaction had been declined by Apple by the time my bank approved it. Long story short, I did not renew my membership.

But now I felt like renewing it again to release all my “almost finished” side projects. I headed to the Apple Developer website, but to my surprised, the price is RM399/year now. I’m pretty sure it was cheaper last year.

Pricing on the Apple Developer website

So I checked the Developer app to see if the price is different, and it is! It is still RM369/year on the app. Somewhat weird, but my guess is this has something to do with the App Store having less “dynamic” pricing as compared to the website. From what I noticed over the years, there will be a lot of news whenever they upgrade their App Store Tier pricing.

Pricing on the Developer app

So if you’re looking to subscribe or renew your Apple Developer account, maybe you can try subscribing it through the app.

How to Convert SSL Certificate From CER to DER Format

Today I learned how to convert SSL certificate that is using crt format to der format while working on updating the certificate that was pinned in our iOS app. Here’s a quick guide on the how-to.

First of all make sure you have openssl installed in your machine. Then run the following command in your terminal:

openssl x509 -in input_cert.crt -out output_cert.der -outform der

Make sure to replace input_cert.crt and output_cert.der with the actual filenames of your certificates.

That’s it. Easy right?

Additional info

  1. Make sure you pass in the -outform der flag. Otherwise openssl will default to pem format
  2. x509 subcommand stands for X.509 certificate, which is a standard format for public key certificates.

How to Install Specific Version of Brew Cask

Brew Cask is an extension of Homebrew that allows us to install GUI tools or 3rd party binaries easily just by using command line.

It is so convenient and I have been using it to install most of my app like Chrome, Android Studio or VSCode for years. One of the app I used regularly is Periphery, which is a tool for identifying unused codes in iOS projects.

Recently, I ran brew upgrade and unfortunately the update caused Periphery app to stop working. The latest version(2.15.0) requires Swift 5.7 but I’m still using Xcode 14.1. I thought I could just run brew install periphery@2.14.0 to downgrade the version but it did not work.

Did some googling but the steps aren’t straightforward so I will document it down here for my future self.


So here’s the steps:

  1. Google the casks that you want to install the specific version of here. If it’s not part of brew, search it on Github. For example here’s the page for periphery
  2. Go through the commits history. Find the version that you want and the cask file
  3. Copy the URL of the raw file
  4. Run brew install --cask [RAW_FILE_URL]. For example if I want to install periphery@2.14.0 I need to run the following command:
    brew install --cask https://raw.githubusercontent.com/peripheryapp/homebrew-periphery/6f8d7a080fc41e336ec6f1dca9039117a7886875/Casks/periphery.rb

Other Ways to Install

There’s another way to install by using brew edit.

Here’s the steps:

  1. Run brew edit [APP_NAME]. Note that running this for the first time will trigger the following warning message since you will be editing the Cask file directly

    Warning: edit is a developer command, so Homebrew's
    developer mode has been automatically turned on.
    To turn developer mode off, run:
    brew developer off
  2. Update the version and sha256 value based on the version that you want to install. You can find the info on Github. Using the same example:

     cask 'periphery' do
    -    version '2.15.0'
    -    sha256 '7f0d05c7e9d04925f8c8ed4365146c23abd3b4ac1a5865f125438ce9851f93f7'
    +    version '2.14.0'
    +    sha256 'f44af8004706416610709ed4f913cedc06e458941a6968c095c475bef54e1920'
         url "https://github.com/peripheryapp/periphery/releases/download/#{version}/periphery-#{version}.zip"
         name 'Periphery'
         homepage 'https://github.com/peripheryapp/periphery'
         binary 'periphery'
         depends_on macos: '>= :catalina'
         ```
    
         zap delete: [
         '~/Library/Caches/com.github.peripheryapp',
         '~/Library/Caches/com.peripheryapp.periphery'
         ]
     end
    
  3. Save it and simply run brew reinstall [APP_NAME].

That’s all. Hope this helps.