<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kalpak Palekar</title>
    <description>The latest articles on DEV Community by Kalpak Palekar (@studiobox).</description>
    <link>https://dev.to/studiobox</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F758893%2F22f69f1a-1d45-48d8-9dcf-2a3554875078.png</url>
      <title>DEV Community: Kalpak Palekar</title>
      <link>https://dev.to/studiobox</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/studiobox"/>
    <language>en</language>
    <item>
      <title>Setup MacMini M1 for Development</title>
      <dc:creator>Kalpak Palekar</dc:creator>
      <pubDate>Thu, 23 Nov 2023 09:25:01 +0000</pubDate>
      <link>https://dev.to/studiobox/setup-macmini-m1-for-development-2k3f</link>
      <guid>https://dev.to/studiobox/setup-macmini-m1-for-development-2k3f</guid>
      <description>&lt;h2&gt;
  
  
  1. Update Siri &amp;amp; Spotlight Settings
&lt;/h2&gt;

&lt;p&gt;Update Siri and Spotlight settings to only display search results for Applications and System Settings:&lt;/p&gt;

&lt;p&gt;Go to &lt;code&gt;System Settings &amp;gt; Siri &amp;amp; Spotlight&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and under Search results section uncheck all options except Applications and System Settings.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Install Google Chrome for M1
&lt;/h2&gt;

&lt;p&gt;To install Google Chrome on your new Mac Mini M1 use this link &lt;a href="https://chromeenterprise.google/browser/download/#mac-tab"&gt;https://chromeenterprise.google/browser/download/#mac-tab&lt;/a&gt; and choose options as below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Channel: Stable&lt;/li&gt;
&lt;li&gt;File type: DMG Universal Installer (x86 and ARM)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Install Applications from AppStore
&lt;/h2&gt;

&lt;p&gt;Install below list of Applications from AppStore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lockera Widgets&lt;/li&gt;
&lt;li&gt;iScreen Shoter: Screenshot App&lt;/li&gt;
&lt;li&gt;WhatsApp Desktop&lt;/li&gt;
&lt;li&gt;Telegram&lt;/li&gt;
&lt;li&gt;Xcode&lt;/li&gt;
&lt;li&gt;Moped Text Editor&lt;/li&gt;
&lt;li&gt;Keynote&lt;/li&gt;
&lt;li&gt;Pages&lt;/li&gt;
&lt;li&gt;Numbers&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Install Homebrew Package Manager for Missing Package Manager for macOS
&lt;/h2&gt;

&lt;p&gt;To install homebrew on your macOS, first you have to install Xcode-select. To install homebrew and Xcode-select open terminal and run below commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;xcode-select --install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you run the above command, you will see a pop-up saying&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The "xcode-select" command requires the command line developer tools. Would you like to install the tools now?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;just click on install and when it shows Terms and Conditions page just click on Agree to continue and it will install required tools. After installing xcode-select run below command to install homebrew:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the homebrew installation is completed run these two commands in your terminal to add homebrew to your PATH:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') &amp;gt;&amp;gt; /Users/&amp;lt;your_username&amp;gt;/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To check the brew is installed and working properly run below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew doctor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To update brew run below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Install Git to code respository
&lt;/h2&gt;

&lt;p&gt;To install git repository run below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Install iterm2, zsh and configure iterm2 with oh-my-zsh
&lt;/h2&gt;

&lt;p&gt;First install iterm2 and start using iterm2 instead of default zsh terminal which comes with macOS&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install iterm2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you installed iterm2 open it and click on iterm2 menu from status bar and then click on Install Shell Integration. Keep the checkbox checked of "Also install iterm2 Utilities" and click continue. Then click on "Download and Run Installer" and click continue. Once the installation completes you will see the ok button click on that.&lt;/p&gt;

&lt;p&gt;Now to install zsh run the below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install zsh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the zsh installation gets completed, change the default shell in below file&lt;br&gt;
&lt;code&gt;sudo nano /etc/shells&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;add below line at the end of the file then save and close the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/opt/homebrew/bin/zsh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To change the default shell to zsh run below commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chsh -s /opt/homebrew/bin/zsh
exec $SHELL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you run the above commands quit your iterm2 and reopen it again and run below command to check the default shell is changed to your zsh:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo $SHELL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To install "oh-my-zsh" run below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Install &amp;amp; configure Powerlevel10k and lovelace iterm color theme
&lt;/h2&gt;

&lt;p&gt;Once you install "oh-my-zsh" install Powerlevel10k by running below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' &amp;gt;&amp;gt;~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you install Powerlevel10k download lovelace.itermcolors theme for your iterm2 from &lt;a href="https://iterm2colorschemes.com/"&gt;https://iterm2colorschemes.com/&lt;/a&gt; and change the iterm color theme and then update preferences:&lt;br&gt;
Go to &lt;code&gt;iterm2 &amp;gt; Settings &amp;gt; Profiles&lt;/code&gt; and select Colors tab to change the iterm color theme. Click on Color Presets dropdown and click import and select the lovelace.itermcolors file and then change the theme to lovelace.&lt;/p&gt;

&lt;p&gt;After that select Session tab and check the "Status bar enabled" checkbox and click on Configure Status Bar and select Light Colors from Auto-Rainbow dropdown. Add the below status bar components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Network Throughput&lt;/li&gt;
&lt;li&gt;CPU Utilization&lt;/li&gt;
&lt;li&gt;Memory Utilization&lt;/li&gt;
&lt;li&gt;Clock&lt;/li&gt;
&lt;li&gt;Fixed-size Spacer&lt;/li&gt;
&lt;li&gt;git state&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After that go to Appearance Menu and under General tab change the Status bar location to Bottom from dropdown. Then quit iterm2 and reopen it to auto configure the look of your Powerlevel10k. Selection the options as below:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Meslo Nerd Font? - Yes&lt;/li&gt;
&lt;li&gt;Prompt Style - Classic&lt;/li&gt;
&lt;li&gt;Character Set - Unicode&lt;/li&gt;
&lt;li&gt;Prompt Color - Light&lt;/li&gt;
&lt;li&gt;Show current time - 12-hour format&lt;/li&gt;
&lt;li&gt;Prompt Separators - Angled&lt;/li&gt;
&lt;li&gt;Prompt Heads - Sharp&lt;/li&gt;
&lt;li&gt;Prompt Tails - Flat&lt;/li&gt;
&lt;li&gt;Prompt Height - One line&lt;/li&gt;
&lt;li&gt;Prompt Spacing - Compact&lt;/li&gt;
&lt;li&gt;Icons - Few icons&lt;/li&gt;
&lt;li&gt;Prompt Flow - Concise&lt;/li&gt;
&lt;li&gt;Enable Transient Prompt - No&lt;/li&gt;
&lt;li&gt;Instant Prompt Mode - Verbose&lt;/li&gt;
&lt;li&gt;Apply changes to ~/.zshrc? - Yes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once done quite your iterm2 and reopen to see the changes.&lt;/p&gt;

&lt;p&gt;Add ~/.bashrc into ~/.zshrc so it will be initialised on open and put all your export and alias config in ~/.bashrc. Add below line to end of the ~/.zshrc&lt;br&gt;
&lt;code&gt;source ~/.bashrc&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  8. Install and configure NVM for NodeJS version manager
&lt;/h2&gt;

&lt;p&gt;nvm (Node Version Manager) is a tool that allows you to install and manage multiple versions of Node.js on your Mac. To install nvm on a Mac, you will need to follow these steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install nvm&lt;/strong&gt;&lt;br&gt;
Use homebrew to install nvm on your macOS&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install nvm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add nvm to your shell profile: To make nvm available every time you open a new terminal window, you will need to add the following line to your shell profile (e.g., ~/.bashrc):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] &amp;amp;&amp;amp; \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] &amp;amp;&amp;amp; \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install Node.js&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now you can use to install latest version of node with following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm install node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install specific version&lt;/strong&gt;&lt;br&gt;
To install specific version of node you can use syntax &lt;code&gt;nvm install &amp;lt;version&amp;gt;&lt;/code&gt; as below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm install 18
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;List of available version&lt;/strong&gt;&lt;br&gt;
You can use below command to check the list of available node versions which you can install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm ls-remote
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Switch between installed version&lt;/strong&gt;&lt;br&gt;
You can switch between installed node versions with &lt;code&gt;nvm use &amp;lt;version&amp;gt;&lt;/code&gt; see below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm use 18
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Set default version&lt;/strong&gt;&lt;br&gt;
You can set the specific installed version as default version with &lt;code&gt;nvm alias default &amp;lt;version&amp;gt;&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm alias default 18
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  9. Add alias for python3 as python
&lt;/h2&gt;

&lt;p&gt;MacOS Sonoma comes with Python 3.9.x installed by default. So if you want to use python from terminal everytime you have to use python3 command and pip3 for pip package manager. You can create aliases to use python and pip instead of using with version name as below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alias python=python3
alias pip=pip3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  10. Install Visual Studio Code Editor
&lt;/h2&gt;

&lt;p&gt;You can download and install visual studio code editor from here: &lt;a href="https://code.visualstudio.com/docs/?dv=darwinarm64"&gt;https://code.visualstudio.com/docs/?dv=darwinarm64&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  11. Install VS Code Extension
&lt;/h2&gt;

&lt;p&gt;Once you install visual studio code editor you can install some popular and useful extensions which will be very helpful in development:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Material Icon Theme - Philipp Kief&lt;/li&gt;
&lt;li&gt;Prettier Code formatter - Prettier&lt;/li&gt;
&lt;li&gt;Tailwind CSS IntelliSense - Tailwind Labs&lt;/li&gt;
&lt;li&gt;JavaScript (ES6) code snippets - charalampos karypidis&lt;/li&gt;
&lt;li&gt;ES7 React/Redux/GraphQL/React-Native snippets - rodrigovallades&lt;/li&gt;
&lt;li&gt;ESLint - Microsoft&lt;/li&gt;
&lt;li&gt;Angular Essentials (Version 16) - John Papa&lt;/li&gt;
&lt;li&gt;Angular Language Service - Angular&lt;/li&gt;
&lt;li&gt;TypeScript Vue Plugin (Volar) - Vue&lt;/li&gt;
&lt;li&gt;Vue Language Feature (Volar) - Vue&lt;/li&gt;
&lt;li&gt;Dev Containers - Microsoft&lt;/li&gt;
&lt;li&gt;Docker - Microsoft &lt;/li&gt;
&lt;li&gt;Intellicode - Microsoft &lt;/li&gt;
&lt;li&gt;Peacock - John Papa&lt;/li&gt;
&lt;li&gt;PHP Intelephense - Ben Mewburn&lt;/li&gt;
&lt;li&gt;Pylance - Microsoft&lt;/li&gt;
&lt;li&gt;Python - Microsoft&lt;/li&gt;
&lt;li&gt;YAML - Red Hat&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  12. Install OpenSSL, Apache2, PHP, MySQL and PHPMyAdmin
&lt;/h2&gt;

&lt;p&gt;First we will install openssl with following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install openssl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you install openssl you have to path to ~/.bashrc&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install Apache2&lt;/strong&gt;&lt;br&gt;
Before installing Apache through brew first Shutdown and remove auto-loading of built-in Apache&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2&amp;gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now install Apache with brew as below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install httpd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we just need to configure things so that our new Apache server is auto-started&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew services start httpd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check your apache installed correctly by visiting &lt;a href="http://localhost:8080"&gt;http://localhost:8080&lt;/a&gt; in browser&lt;/p&gt;

&lt;p&gt;Apache is controlled via the brew services with following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew services stop httpd
brew services start httpd
brew services restart httpd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Apache Configuration&lt;/strong&gt;&lt;br&gt;
In the latest version of brew, you have to manually set the listen port from the default of 8080 to 80, so we will need to edit Apache's configuration file &lt;code&gt;/opt/homebrew/etc/httpd/httpd.conf&lt;/code&gt;. Open this file and edit as below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /opt/homebrew/etc/httpd/httpd.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Find the line that says&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Listen 8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And change it to 80:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Listen 80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Search for the term DocumentRoot, and you should see the following line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DocumentRoot “/opt/homebrew/var/www”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change this to point to your user directory where your_user is the name of your user account:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DocumentRoot “/Users/your_user/Sites”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You also need to change the  tag reference right below the DocumentRoot line. This should also be changed to point to your new document root also:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Directory “/Users/your_user/Sites”&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In that same  block you will find an AllowOverride setting, this should be changed as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also we should now enable mod_rewrite which is commented out by default. Search for mod_rewrite.so and uncomment the line by removing the leading # by pushing ⌘ + / on the line (this is a quick way to uncomment and comment a single or multiple lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;User &amp;amp; Group&lt;/strong&gt;&lt;br&gt;
Now we have the Apache configuration pointing to a Sites folder in our home directory. One problem still exists, however. By default, apache runs as the user _www and group _&lt;a href="http://www"&gt;www&lt;/a&gt;. This will cause permission problems when trying to access files in our home directory. About a third of the way down the httpd.conf file there are two settings to set the User and Group Apache will run under. Change these to match your user account (replace your_user with your real username), with a group of staff:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User your_user
Group staff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Servername&lt;/strong&gt;&lt;br&gt;
Apache likes to have a server name in the configuration, but this is disabled by default, so search for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#ServerName www.example.com:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and replace it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ServerName localhost
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Sites Folder&lt;/strong&gt;&lt;br&gt;
Now, you need to create a Sites folder in the root of your home directory. You can do this in your terminal, or in Finder. In this new Sites folder create a simple index.html and put some dummy content in it like: &lt;code&gt;&amp;lt;h1&amp;gt;My User Web Root&amp;lt;/h1&amp;gt;&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir ~/Sites
echo "&amp;lt;h1&amp;gt;My User Web Root&amp;lt;/h1&amp;gt;" &amp;gt; ~/Sites/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart apache to ensure your configuration changes have taken effect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew services stop httpd
brew services start httpd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Download &amp;amp; Install MySQL 8&lt;/strong&gt;&lt;br&gt;
You can download and install MySQL 8 Community Server from this url: &lt;a href="https://dev.mysql.com/downloads/mysql/"&gt;https://dev.mysql.com/downloads/mysql/&lt;/a&gt;. Select your OS type and download the DMG Archive installer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Postgres Database&lt;/strong&gt;&lt;br&gt;
You can install PostgresSQL on your mac M1 with homebrew:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install postgresql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run below command to turn on your Postgres server automatically&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew services start postgresql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Check your Postgres installation&lt;/strong&gt;&lt;br&gt;
Run following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;psql -d postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;psql is a command-line utility that was installed together with the Postgres server, -d specifies which database to connect to. Postgres is a default database that was installed by default.&lt;br&gt;
You should see something like the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ psql -d Postgres
psql (13.2)
Type "help" for help.
postgres=#
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Type \q to exit the database console.&lt;br&gt;
To see other databases, type \l&lt;br&gt;
To switch to a different database, use \c &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Download and Install PGAdmin&lt;/strong&gt;&lt;br&gt;
You can download and install PGAdmin to access local and remote postgres databases from here: &lt;a href="https://www.pgadmin.org/download/pgadmin-4-macos/"&gt;https://www.pgadmin.org/download/pgadmin-4-macos/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install MongoDB Compass to access local and remote mongoDB databases&lt;/strong&gt;&lt;br&gt;
You can download and install MongoDB Compass from this site: &lt;a href="https://www.mongodb.com/try/download/compass"&gt;https://www.mongodb.com/try/download/compass&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install PHP&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or to install specific version&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install php@7.4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To switch between install php version&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew unlink php@8.2
brew link php@7.4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To enable PHP in Apache add the following to httpd.conf and restart Apache:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LoadModule php_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so

&amp;lt;FilesMatch \.php$&amp;gt;
        SetHandler application/x-httpd-php
&amp;lt;/FilesMatch&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, check DirectoryIndex includes index.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DirectoryIndex index.php index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The php.ini and php-fpm.ini file can be found in:&lt;br&gt;
&lt;code&gt;/opt/homebrew/etc/php/8.2/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To restart php after an upgrade:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew services restart php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart Apache&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew services restart httpd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create php info file and check in browser&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo “&amp;lt;?php phpindo(); ?&amp;gt;” &amp;gt; ~/Sites/info.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install phpMyAdmin&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install phpmyadmin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To enable phpMyAdmin in Apache, add the following to httpd.conf and&lt;br&gt;
restart Apache:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    Alias /phpmyadmin /opt/homebrew/share/phpmyadmin
    &amp;lt;Directory /opt/homebrew/share/phpmyadmin/&amp;gt;
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        &amp;lt;IfModule mod_authz_core.c&amp;gt;
            Require all granted
        &amp;lt;/IfModule&amp;gt;
        &amp;lt;IfModule !mod_authz_core.c&amp;gt;
            Order allow,deny
            Allow from all
        &amp;lt;/IfModule&amp;gt;
    &amp;lt;/Directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open &lt;a href="http://localhost/phpmyadmin"&gt;http://localhost/phpmyadmin&lt;/a&gt;&lt;br&gt;
The configuration file is &lt;code&gt;/opt/homebrew/etc/phpmyadmin.config.inc.php&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update Config&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;vi /opt/homebrew/etc/phpmyadmin.config.inc.php&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Extend cookies lifetime
$cfg['LoginCookieValidity'] = 7*24*60*60;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Create phpMyAdmin.conf&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;vi /opt/homebrew/etc/httpd/extra/phpmyadmin.conf&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Insert following
Alias /phpmyadmin /opt/homebrew/share/phpmyadmin
&amp;lt;Directory /opt/homebrew/share/phpmyadmin/&amp;gt;
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    &amp;lt;IfModule mod_authz_core.c&amp;gt;
        Require all granted
    &amp;lt;/IfModule&amp;gt;
    &amp;lt;IfModule !mod_authz_core.c&amp;gt;
        Order allow,deny
        Allow from all
    &amp;lt;/IfModule&amp;gt;
&amp;lt;/Directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Load phpMyAdmin.conf in Apache&lt;br&gt;
&lt;code&gt;vi /opt/homebrew/etc/httpd/httpd.conf&lt;/code&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Append at the end of the conf
&lt;/h1&gt;
&lt;h1&gt;
  
  
  Load phpMyAdmin configuration
&lt;/h1&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Include /opt/homebrew/etc/httpd/extra/phpmyadmin.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Restart httpd:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Brew services restart httpd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Url: &lt;a href="http://localhost/phpmyadmin"&gt;http://localhost/phpmyadmin&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  13. Install Composer
&lt;/h2&gt;

&lt;p&gt;Install composer and add path into ~/.bashrc&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install composer
export PATH=~/.composer/vendor/bin:$PATH
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  14. Install Postman
&lt;/h2&gt;

&lt;p&gt;You can install Postman with homebrew cask with following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install --cask postman
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  15. Download and Install Docker Desktop
&lt;/h2&gt;

&lt;p&gt;You can download and install Docker Desktop from Docker official website: &lt;a href="https://www.docker.com/products/docker-desktop/"&gt;https://www.docker.com/products/docker-desktop/&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>macmini</category>
      <category>setup</category>
      <category>development</category>
      <category>m1</category>
    </item>
    <item>
      <title>Setup MacMini M1 for Development</title>
      <dc:creator>Kalpak Palekar</dc:creator>
      <pubDate>Thu, 23 Nov 2023 09:24:58 +0000</pubDate>
      <link>https://dev.to/studiobox/setup-macmini-m1-for-development-1pmc</link>
      <guid>https://dev.to/studiobox/setup-macmini-m1-for-development-1pmc</guid>
      <description>&lt;h2&gt;
  
  
  Install Google Chrome for M1
&lt;/h2&gt;

&lt;p&gt;To install Google Chrome on your new Mac Mini M1 use this link &lt;a href="https://chromeenterprise.google/browser/download/#mac-tab"&gt;https://chromeenterprise.google/browser/download/#mac-tab&lt;/a&gt; and choose options as below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Channel: Stable&lt;/li&gt;
&lt;li&gt;File type: DMG Universal Installer (x86 and ARM)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please refer below screenshot for options:&lt;/p&gt;

</description>
      <category>macmini</category>
      <category>setup</category>
      <category>development</category>
      <category>m1</category>
    </item>
    <item>
      <title>Python Important</title>
      <dc:creator>Kalpak Palekar</dc:creator>
      <pubDate>Wed, 22 Nov 2023 06:07:40 +0000</pubDate>
      <link>https://dev.to/studiobox/python-important-1nm6</link>
      <guid>https://dev.to/studiobox/python-important-1nm6</guid>
      <description>&lt;h2&gt;
  
  
  Generate python virtual environment for your project
&lt;/h2&gt;

&lt;p&gt;To generate python virtual environment(venv) for your project, "cd" into your project folder and run the below command:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;code&gt;python -m venv &amp;lt;env-name&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m venv myenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Whenever you are working in your project then you have to activate your virtual environment, so that your third-party python modules which you will be installing to use in your project will be maintained in this virtual environment. To activate your venv you have to run below command:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;code&gt;source &amp;lt;env-name&amp;gt;/bin/activate&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd myproject
source myenv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you complete your work for the day and now you will need to deactivate your venv run below command:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;code&gt;deactivate&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deactivate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Managing Packages with pip
&lt;/h2&gt;

&lt;p&gt;You can install, upgrade, and remove packages using a program called pip. By default pip will install packages from the Python Package Index. You can browse the Python Package Index by going to it in your web browser.&lt;/p&gt;

&lt;p&gt;pip has a number of subcommands: “install”, “uninstall”, “freeze”, etc. (Consult the Installing Python Modules guide for complete documentation for pip.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;code&gt;pip install requests==2.6.0&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;code&gt;pip list&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;code&gt;pip freeze &amp;gt; requirements.txt&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Syntax:&lt;/strong&gt; &lt;code&gt;pip install -r requirements.txt&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install requests==2.6.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip freeze &amp;gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
    </item>
  </channel>
</rss>
