Skip to main content
  1. Posts/

My Tooling - Part 1 - Securing a new dev box

·4 mins
Generated using Microsoft Designer

[Subtitle] For a software developer, just like chefs or artists, their setup/tools are an extension of their personal expression.

Its not just business, but very much personal !!!

•    •    •

Context #

Every developer is an artist, whose creations depend a lot on their tools and setup. It enables them to transform their ideas and manifest not just as functional, but a things of beauty.

Here, I will be sharing the my dev-setup tech tooling, that I love and keep tinkering with - I guess it will exist as a continuous work-in-progress.

“Justice is never given, it is exacted and the struggle must be continuous for freedom is never a final fact, but a continuing evolving process to higher and higher levels of human, social, economic, political and religious relationship.” - A. Philip Randolp

Part 1 : My Tooling - Part 1 - Securing a new dev box

Part 2 : My Tooling - Part 2 - Setting up my dotfiles manager

Part 3 : My Tooling - Part 3 - Installing my apps and packages

•    •    •

Securing a new dev box #

(As of now, I will be focusing on MacOS Device, but will update as I venture into using Linux/Windows as my dev machines)

To automate “securing my dev-box”, I have come to depend on Mike McQuaid’s Strap, which was designed “To configure MacOS to be more secure and ready for development work”

•    •    •

Strap can actually do a lot more

  1. Configure MacOS to be more secure by
    • Enables sudo using TouchID (if available) - to avoid having to enter password
    • Disables Java in Safari (for better security)
    • Enables the macOS screensaver password immediately (for better security)
    • Enables the macOS application firewall (for better security)
    • Adds a Found this computer? message to the login screen (for machine recovery)
    • Enables full-disk encryption and saves the FileVault Recovery Key to the Desktop (for better security)
    • Installs the Xcode Command Line Tools (for compilers and Unix tools)
    • Agree to the Xcode license (for using compilers without prompts)
    • Installs Homebrew (for installing command-line software)
    • Installs Homebrew Bundle (for bundler-like Brewfile support)
    • Installs Homebrew Services (for managing Homebrew-installed services)
    • Installs Homebrew Cask (for installing graphical software)
    • Installs the latest macOS software updates (for better security)

  1. Deploy user’s custom configuration by
    • Installing https://github.com/github-username/dotfiles repository.
    • If they exist and are executable, runs script/setup to configure the dotfiles and script/strap-after-setup after setting up everything else.
    • Installs software from a user’s Brewfile in their https://github.com/github-username/homebrew-brewfile repository or .Brewfile in their home directory.

  1. A simple web application to set Git’s name, email and GitHub token (needs authorised on any organisations you wish to access)

For #2 and #3, Strap will need github authorization - which can be done using https://strap.mikemcquaid.com/ and then one can download an customized Strap script with Configuration Environment Variables set appropriately.

•    •    •

Personally, I only use Strap just for securing the MacOS. For the sake of dotfiles management and brew package bundle installations, I use Chezmoi

•    •    •

Actionable Steps for Strap

  1. First, install any available MacOS updates - this will take a long time.

  2. Open Mike McQuaid’s https://github.com/MikeMcQuaid/strap (google search for “Strap Github” and you should see it at the top)

  3. In code window, click on bin folder to open it and then open strap.sh and download the raw file.

  4. Run the following command and follow the script’s asks and output

    bash ~/Downloads/strap.sh
    
  5. Run the following command to add Homebrew to PATH, and then restart the terminal.

    echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> $HOME/.zprofile
    
  6. Run the following commands to configure dock to my taste

    # Move dock to right side of the screen
    defaults write com.apple.dock orientation -string right
    
    # Restart the Dock for the settings change to take effect
    killall Dock
    
    # install dockutil
    brew install dockutil
    
    # Remove all pinned apps from the Dock
    dockutil --remove all
    
    # Add apps to the Dock in the desired order
    dockutil --add '/Applications/Notes.app'
    dockutil --add '/Applications/Reminders.app'
    dockutil --add '/Applications/Microsoft Edge.app'
    dockutil --add '/Applications/Microsoft Outlook.app'
    dockutil --add '/Applications/Mail.app'
    dockutil --add '/Applications/Visual Studio Code.app'
    dockutil --add '/Applications/Warp.app'
    dockutil --add '/Applications/Notion.app'
    
•    •    •

[TODO] Linux Device #


[TODO] Windows Device #


· · ────────────── ·𖥸· ────────────── · ·