{"id":18925959,"url":"https://github.com/murshidazher/dotfiles-m1","last_synced_at":"2025-04-15T13:32:24.599Z","repository":{"id":43380102,"uuid":"418109375","full_name":"murshidazher/dotfiles-m1","owner":"murshidazher","description":"✨ 🍎   A dogmatic script to set up a new M1 Mac, or if I flush my current one.","archived":false,"fork":false,"pushed_at":"2024-07-25T19:26:21.000Z","size":3789,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-07-25T22:28:03.850Z","etag":null,"topics":["arm","dotfiles","env","m1","mac","macos","setup","shell-script","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/murshidazher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-17T11:32:49.000Z","updated_at":"2024-07-25T19:26:25.000Z","dependencies_parsed_at":"2023-02-16T22:15:36.460Z","dependency_job_id":"4b832334-bae4-4781-aef3-e9283b29b13d","html_url":"https://github.com/murshidazher/dotfiles-m1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murshidazher%2Fdotfiles-m1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murshidazher%2Fdotfiles-m1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murshidazher%2Fdotfiles-m1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murshidazher%2Fdotfiles-m1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/murshidazher","download_url":"https://codeload.github.com/murshidazher/dotfiles-m1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223672985,"owners_count":17183618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm","dotfiles","env","m1","mac","macos","setup","shell-script","zsh"],"created_at":"2024-11-08T11:13:56.608Z","updated_at":"2024-11-08T11:13:58.832Z","avatar_url":"https://github.com/murshidazher.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/murshidazher/dotfiles-m1/main/docs/images/logo.png\" width=\"90px\"\u003e\n\n# [dotfiles-m1](https://github.com/murshidazher/dotfiles-m1)\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/murshidazher/dotfiles-m1/push.yaml?style=flat-square)\n![Code Linter](https://img.shields.io/static/v1?label=lint\u0026message=shellcheck\u0026color=FFF1CE\u0026style=flat-square)\n![Code Style](https://img.shields.io/static/v1?label=style\u0026message=shfmt\u0026color=FFF2F9\u0026style=flat-square)\n\n![Repository Size](https://img.shields.io/endpoint?style=flat-square\u0026url=https://gist.githubusercontent.com/murshidazher/549abdf9bf6da79a63605fd3ab9574fc/raw/size-badge.json)\n![Regression Runtime](https://img.shields.io/endpoint?style=flat-square\u0026url=https://gist.githubusercontent.com/murshidazher/549abdf9bf6da79a63605fd3ab9574fc/raw/elapsed-curl-badge.json)\n![Min. Disk Space Occupied](https://img.shields.io/endpoint?style=flat-square\u0026url=https://gist.githubusercontent.com/murshidazher/549abdf9bf6da79a63605fd3ab9574fc/raw/minimum-disk-space-occupied-badge.json)\n![Last Regression Date](https://img.shields.io/endpoint?style=flat-square\u0026url=https://gist.githubusercontent.com/murshidazher/549abdf9bf6da79a63605fd3ab9574fc/raw/regression-date-badge.json)\n\n\u003e My personal installation script to automate any new macOS system setup so I don't need to feel poor.\n\n- A dogmatic script to set up my mac. Built for Mac OS X :fire: :fire:\n- The minimum storage space and runtime are only estimates; they may vary from machine to machine.\n- ⚠️ Still on experimental stage hence run at your own risk. ⚠️\n\n\u003cimg src=\"https://raw.githubusercontent.com/murshidazher/dotfiles-m1/main/docs/images/vscode.png\" width=\"600px\"\u003e\n\n## Table of Contents\n\n- [dotfiles-m1](#dotfiles-m1)\n  - [Table of Contents](#table-of-contents)\n  - [Installing / Getting started](#installing--getting-started)\n    - [Setup](#setup)\n    - [Developing](#developing)\n      - [Linting](#linting)\n    - [Sensible macOS defaults](#sensible-macos-defaults)\n      - [GPG key with Keybase.io](#gpg-key-with-keybaseio)\n    - [Projects](#projects)\n    - [Ant](#ant)\n    - [Ndk Setup](#ndk-setup)\n    - [Fixing xcode path issue](#fixing-xcode-path-issue)\n    - [Run React Native App](#run-react-native-app)\n      - [iOS setup](#ios-setup)\n      - [Clean install pods](#clean-install-pods)\n  - [Custom bash prompt](#custom-bash-prompt)\n  - [Notes](#notes)\n  - [TODO](#todo)\n  - [License](#license)\n\n## Installing / Getting started\n\n\u003e ⚠️ Scripts in this project performs automated tasks. Review the code first and use at your own risk! ⚠️\n\n### Setup\n\n\u003e The script creates a centrally managed `dotfiles` directory on the `~` of the file system.\n\nTo setup simply open the terminal, then:\n\n```sh\n$ bash -c \"`curl -L https://git.io/dotfiles-m1`\"\n# after initial setup\n$ cd dotfiles \u0026\u0026 ./setup.sh\n```\n\n### Developing\n\n- Make sure to lint the files prior to committing it.\n\n#### Linting\n\n\u003e 💡 We make use of `shellcheck` and `shfmt` to lint the shell scripts,\n\nInstall the linters,\n\n```sh\nbrew install shellcheck\nbrew install shfmt\n```\n\nLint the files before making a PR,\n\n```sh\nshellcheck \u003cfile\u003e.sh\nshfmt -l -w -s \u003cfile\u003e.sh # style linting\n```\n\n### Sensible macOS defaults\n\nWhen setting up a new Mac, you may want to set some sensible macOS defaults:\n\n```sh\n./macos/.macos\n```\n\n#### GPG key with Keybase.io\n\n- Follow this gist to [setup gpgkey with keybase.io](https://github.com/pstadler/keybase-gpg-github).\n\n### Projects\n\n```sh\nnpm rebuild node-sass\n```\n\n### Ant\n\n```sh\nasdf plugin add ant\nasdf list-all ant\nasdf install ant latest\nasdf global ant latest\nant -version\n```\n\n### Ndk Setup\n\n\u003e 💡 Install an older NDK version `(20.*.* or lower)` from android studio.\n\n\u003cimg src=\"https://raw.githubusercontent.com/murshidazher/dotfiles-m1/main/docs/images/ndk-tools.png\" width=\"600px\"\u003e\n\nInstalling an older NDK version `(20.*.* or lower)` will prevent the following flutter and react-native build errors,\n\n```sh\nFAILURE: Build failed with an exception.\n\n*   What went wrong:\n    Execution failed for task ':app:stripDebugDebugSymbols'.\n\n\u003e No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi\n\n*   Try:\n    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.\n\n*   Get more help at [https://help.gradle.org](https://help.gradle.org)\n\nBUILD FAILED in 1m 4s\nException: Gradle task assembleDebug failed with exit code 1\n```\n\n### Fixing xcode path issue\n\n```sh\n$ sudo xcode-select --print-path\n# if it something like /Library/Developer/..\n$ sudo xcode-select --switch /Applications/Xcode.app\n```\n\n### Run React Native App\n\n```sh\n# install and link (to install native dependencies)\n$ asdf local nodejs 14.18.1\n$ npm i\n$ react-native link\n\n# create a .dev.env file inside\n$ npm run setupEnv\n$ npm run start # start the metro bundler\n$ npm run android:qa\n```\n\n#### iOS setup\n\nKnown issues;\n\n- \u003chttps://github.com/facebook/react-native/pull/32486/files\u003e\n- \u003chttps://github.com/facebook/react-native/tree/0.68-stable\u003e\n\n```sh\n# clean previous installs of ffi and cocoapods\n$ gem list --local | grep cocoapods | awk '{print $1}' | xargs sudo gem uninstall\n$ sudo gem uninstall ffi\n$ rm -rf ~/.cocoapods/\n\n# install ffi and cocoapods\n$ sudo arch -x86_64 gem install ffi\n$ sudo arch -x86_64 gem install cocoapods\n\n# pod install inside the react-native project folder\n$ cd react-native-owner-app/ios\n$ pod install\n```\n\n#### Clean install pods\n\n```sh\ncleanpod # will clean install pods\n```\n\n## Custom bash prompt\n\nWhen your current working directory is a Git repository, the prompt will display the checked-out branch's name (and failing that, the commit SHA that HEAD is pointing to). The state of the working tree is reflected in the following way:\n\n| Symbol | Description                      |\n|--------|----------------------------------|\n| +      | Uncommitted changes in the index |\n| !      | Unstaged changes                 |\n| ?      | Untracked files                  |\n| $      | Stashed files                    |\n\nFurther details are in the `.zsh_prompt` file.\n\n\u003cimg src=\"https://raw.githubusercontent.com/murshidazher/dotfiles-m1/main/docs/images/terminal.png\" width=\"600px\"\u003e\n\n## Notes\n\n- Creating a [custom git hook](https://help.gitkraken.com/gitkraken-client/githooksexample/)\n\n## TODO\n\n- [ ] Auto-format shell files using `brew install shellcheck \u0026\u0026 brew install shfmt \u0026\u0026 shfmt -l -w script.sh`\n- [ ] Check precommit hook for [linting](https://github.com/jumanjihouse/pre-commit-hooks#configure-pre-commit)\n- [ ] Dynamically add inputs to the buffer and check the initialize script\n- [ ] Run react-native setup as separate workflow.\n- [ ] Check on `dotfilesdir=\"$HOME/${PWD##*/}\"` and see if it really works on all files.\n\n## License\n\n[MIT](https://github.com/murshidazher/dotfiles-m1/blob/main/LICENSE) \u0026copy; 2021-2023 Murshid Azher.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurshidazher%2Fdotfiles-m1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmurshidazher%2Fdotfiles-m1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurshidazher%2Fdotfiles-m1/lists"}