• Reduce VHDX file size

    Reducing the size of a VHDX (does not change the size of the virtual drive, just compresses the virtual disk file to only use the space it needs on the host computer):

    In an admin powershell prompt: Optimize-VHD ‘P:\FullPath\VirtualDisk.vhdx’ -Mode Full

  • Docker-compose.yml for self-hosted Monica on m1

      version: "3.4"
    
      services:
        app:
          image: monica:apache
          depends_on:
            - db
          ports:
            - 8080:80
          environment:
            - DB_HOST=db
            - DB_USERNAME=monica
            - DB_PASSWORD=supersecret
          volumes:
            - data:/var/www/html/storage
          restart: always
        db:
          image: mariadb:latest
          environment:
            - MARIADB_RANDOM_ROOT_PASSWORD=true
            - MARIADB_DATABASE=monica
            - MARIADB_USER=monica
            - MARIADB_PASSWORD=supersecret
          volumes:
            - /Users/yourUserName/workspace/monica-docker/mysql:/var/lib/mysql
          restart: always
    
      volumes:
        data:
          name: data
        mysql:
          name: mysql
    
  • XCode Error: Failed to produce diagnostic for expression; please file a bug report

    XCode Error: Failed to produce diagnostic for expression; please file a bug report

    In our case, we were calling an extension function on an array in a viewmodel. In a SwiftUI view we were doing Text(viewModel.someArray.extensionFunction()). The problem was that I had renamed someArray to someBetterNamedArray and it couldn’t handle it.

  • NPM - setting global install location

    mkdir ~/.npm-global

    npm config set prefix '~/.npm-global'

    Add to shell script:

    export PATH=~/.npm-global/bin:$PATH

  • Moving Homebrew from x86 to ARM on M1

    Uninstall x86 version (maybe in x86 terminal?):

    /bin/bash -c “$(curl -fsSL raw.githubusercontent.com/Homebrew/…)”

    I also had to force remove a directory by running:

    sudo rm -rf /usr/local/Homebrew

    Make sure you move to an ARM terminal at this point if you haven’t already, then run the normal Homebrew install script.

subscribe via RSS