Last active
December 29, 2023 03:11
-
-
Save paill/ffd0ec0faa0eaf66f5c0 to your computer and use it in GitHub Desktop.
Revisions
-
psalessi revised this gist
Mar 18, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ ## Geting an Admin Account - In order to install and configure your Mac, you need to be an Administrator on your computer. Either, contact Paul or Charlie, and they will create an account for you. ## Installing of Software -
psalessi revised this gist
Mar 18, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,6 +35,7 @@ 7. Run the following command to ensure `brew` is up to date: brew update ### Node.js & npm - **Node.js** is a JavaScript platform for easily building fast, scalable network applications. @@ -55,6 +56,7 @@ brew doctor 4. To make sure sure Node.js and npm installed correctly, run the commands: node --version npm --version -
psalessi revised this gist
Mar 18, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Setting up your Mac ## Geting an Admin Account - In order to install and configure your Mac, you need to be an Administrator on your computer. Either contact Paul or Charlie, they will create an account for you. -
psalessi revised this gist
Mar 18, 2015 . 1 changed file with 40 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,9 @@ # Setting up your Mac ## Get an Admin Account - In order to install and configure your Mac, you need to be an Administrator on your computer. Either contact Paul or Charlie, they will create an account for you. ## Installing of Software ### Homebrew @@ -31,16 +35,38 @@ 7. Run the following command to ensure `brew` is up to date: brew update ### Node.js & npm - **Node.js** is a JavaScript platform for easily building fast, scalable network applications. - **npm** is a package manager for JavaScript, and is the default for Node.js. 1. First, check if Node.js & npm are already installed by running the commands: node --version npm --version 2. If already installed, move onto the next section; otherwise, continue. 3. We will be using Homebrew to install Node.js and npm. With Homebrew, installing both is done with single package called `node`. Run the following commands in Terminal: brew update brew install node brew doctor 4. To make sure sure Node.js and npm installed correctly, run the commands: node --version npm --version ### Anaconda - **Anaconda** is a distribution of Python that handles package management. `conda` is its package management system. It comes with multiple Python packages already included such as `SQLAlchemy`, `pandas`, and `NumPy`. 1. First, check if Anaconda is already installed by running the command: conda --version 2. If installed, move onto the next section; otherwise continue. 3. [Download Anaconda](https://store.continuum.io/cshop/anaconda/). Choose the Anaconda Graphical Installer for Python 2.7 for Mac OS X. @@ -50,15 +76,11 @@ conda --version ### Git - **Git** is a version control system that we will be using to organize our projects clearly and efficiently. 1. First, check if git is already installed by running the command: git --version @@ -70,6 +92,10 @@ brew install git brew doctor 4. To make sure git installed properly, run the command: git --version ### SQLite - **SQLite** is serverless, zero-configuration, transactional SQL database that allows for quick sharing and testing as each database is simply a created file. `sqlite3` is its command line tool. @@ -86,6 +112,10 @@ brew install sqlite brew doctor 4. To make sure SQLite install properly, run the command: sqlite3 -version ### Sequel Pro - **Sequel Pro** is an easy-to-use Mac database management application for working with MySQL databases allowing for direct access to MySQL databases on local and remote servers. @@ -238,7 +268,9 @@ We are going to change the **document root** for Apache, so it points to a folde  - If you see a similar **phpinfo** result, Apache and PHP are running successfully. - **IMPORTANT NOTE**: Be sure to delete `info.php` once you are sure PHP is running properly. `phpinfo();` can be a potential security vulnerability, so it is important to remove it when you no longer need it. ### MySQL -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -122,7 +122,7 @@ You may want to download/try out other text editors or IDEs that fit your workin - [Komodo Edit](http://komodoide.com/komodo-edit/) is a fairly simple text-editor. - You can try out [PhpStorm](https://www.jetbrains.com/phpstorm/) and [WebStorm](https://www.jetbrains.com/webstorm/) also through JetBrains. ## Setting Up a Local Development Environment -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -293,9 +293,7 @@ We are going to change the **document root** for Apache, so it points to a folde CREATE DATABASE first_wordpress_site; 8. Close the MySQL monitor, and navigate to your WordPress site from a web browser. Example link: `http://localhost/WordPress_Sites/MyWordPressSite/` 9. Follow the instructions on the screen. Provide the name of the database you just created. The database username and password are your login credentials for the MySQL server. The database host is `127.0.0.1` or `localhost`. For table prefix, name this something other than `wp_` for security purposes. Be sure to include an underscore after the prefix. -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -285,17 +285,17 @@ We are going to change the **document root** for Apache, so it points to a folde 5. Now, we need to created the MySQL database for the site. Open Terminal and access the MySQL server: mysql -u root -p 6. You will be prompted for the password for `root`, which you should have set earlier. If not, by default `root` has no password. 7. Inside the MySQL monitor, create a database for your site with whatever name you would like. Be sure to end your command with a semi-colon `;`. Example: CREATE DATABASE first_wordpress_site; 8. Close the MySQL monitor, and navigate to your WordPress site from a web browser. Example: http://localhost/WordPress_Sites/MyWordPressSite/ 9. Follow the instructions on the screen. Provide the name of the database you just created. The database username and password are your login credentials for the MySQL server. The database host is `127.0.0.1` or `localhost`. For table prefix, name this something other than `wp_` for security purposes. Be sure to include an underscore after the prefix. @@ -305,7 +305,7 @@ We are going to change the **document root** for Apache, so it points to a folde - **Note**: If you wish to delete your WordPress site, remove the corresponding WordPress folder from your `Sites` directory. Then go into the MySQL monitor on the command line and execute the command: DROP DATABASE <database_name>; #### Enabling Pretty Permalinks for WordPress MuliSite -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -313,7 +313,7 @@ We are going to change the **document root** for Apache, so it points to a folde ### Branches & Merging ### GitHub vs BitBucket ## Installing Additional Python Libraries -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Setting up your Mac ## Installing of Software @@ -283,7 +283,7 @@ We are going to change the **document root** for Apache, so it points to a folde 4. Unzip the file, and rename the result folder to whatever you would like such as `MyWordPressSite`. 5. Now, we need to created the MySQL database for the site. Open Terminal and access the MySQL server: mysql -u root -p @@ -297,7 +297,7 @@ We are going to change the **document root** for Apache, so it points to a folde http://localhost/WordPress_Sites/MyWordPressSite/ 9. Follow the instructions on the screen. Provide the name of the database you just created. The database username and password are your login credentials for the MySQL server. The database host is `127.0.0.1` or `localhost`. For table prefix, name this something other than `wp_` for security purposes. Be sure to include an underscore after the prefix. 10. If everything was entered properly, upon clicking `Submit`, you should move onto the next page. @@ -319,4 +319,4 @@ We are going to change the **document root** for Apache, so it points to a folde - Use `conda` whenever possible to install new Python packages. Use `conda search` to find packages. - If `conda` does not have a package, use `pip` instead. Use `pip search` to find packages, and `pip install` to install them. `pip` is another broader Python package management system. -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Setting up your Mac OX-X Yosemite ## Installing of Software -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -319,4 +319,4 @@ We are going to change the **document root** for Apache, so it points to a folde - Use `conda` whenever possible to install new Python packages. Use `conda search` to find packages. - If `conda` does not have a package, use `pip` instead. Use `pip search` to find packages, and `pip install` to install them. `pip` is a more general Python package management system. -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -319,4 +319,4 @@ We are going to change the **document root** for Apache, so it points to a folde - Use `conda` whenever possible to install new Python packages. Use `conda search` to find packages. - If `conda` does not have a package, use `pip` instead. Use `pip search` to find packages, and `pip install` to install them. `pip` is another broader Python package management system. -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 13 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -285,17 +285,17 @@ We are going to change the **document root** for Apache, so it points to a folde 5. Now, we need to created the `MySQL` database for the site. Open Terminal and access the `MySQL` server: mysql -u root -p 6. You will be prompted for the password for `root`, which you should have set earlier. If not, by default `root` has no password. 7. Inside the MySQL monitor, create a database for your site with whatever name you would like. Be sure to end your command with a semi-colon `;`. Example: CREATE DATABASE first_wordpress_site; 8. Close the MySQL monitor, and navigate to your WordPress site from a web browser. Example: http://localhost/WordPress_Sites/MyWordPressSite/ 9. Follow the instructions on the screen. Provide the name of the database you just created. The database username and password are your login credentials for the `MySQL` server. The database host is `127.0.0.1` or `localhost`. For table prefix, name this something other than `wp_` for security purposes. Be sure to include an underscore after the prefix. @@ -305,10 +305,18 @@ We are going to change the **document root** for Apache, so it points to a folde - **Note**: If you wish to delete your WordPress site, remove the corresponding WordPress folder from your `Sites` directory. Then go into the MySQL monitor on the command line and execute the command: DROP DATABASE <database_name>; #### Enabling Pretty Permalinks for WordPress MuliSite ## Git Tools ### Branches & Merging ### Github vs Bitbucket ## Installing Additional Python Libraries - Use `conda` whenever possible to install new Python packages. Use `conda search` to find packages. - If `conda` does not have a package, use `pip` instead. Use `pip search` to find packages, and `pip install` to install them. `pip` is another broader Python package management system. -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -285,17 +285,17 @@ We are going to change the **document root** for Apache, so it points to a folde 5. Now, we need to created the `MySQL` database for the site. Open Terminal and access the `MySQL` server: mysql -u root -p 6. You will be prompted for the password for `root`, which you should have set earlier. If not, by default `root` has no password. 7. Inside the MySQL monitor, create a database for your site with whatever name you would like. Be sure to end your command with a semi-colon `;`. Example: CREATE DATABASE first_wordpress_site; 8. Close the MySQL monitor, and navigate to your WordPress site from a web browser. Example: http://localhost/WordPress_Sites/MyWordPressSite/ 9. Follow the instructions on the screen. Provide the name of the database you just created. The database username and password are your login credentials for the `MySQL` server. The database host is `127.0.0.1` or `localhost`. For table prefix, name this something other than `wp_` for security purposes. Be sure to include an underscore after the prefix. @@ -305,7 +305,7 @@ We are going to change the **document root** for Apache, so it points to a folde - **Note**: If you wish to delete your WordPress site, remove the corresponding WordPress folder from your `Sites` directory. Then go into the MySQL monitor on the command line and execute the command: DROP DATABASE <database_name>; ## Git Tutorial -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 20 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -242,7 +242,7 @@ We are going to change the **document root** for Apache, so it points to a folde ### MySQL - While SQLite is useful for quick database creation and sharing, MySQL is scalable, secure and necessary for WordPress. You can work with MySQL through Sequel Pro or the command line tool `mysql`. 1. We will be using [MariaDB](https://mariadb.org/) which is a drop-in replacement for MySQL and is easily installed and updated with Homebrew. Open Terminal, and run the following commands: @@ -279,19 +279,33 @@ We are going to change the **document root** for Apache, so it points to a folde 2. Next, go to [WordPress.org](https://wordpress.org/) and download the lasted version of WordPress. 3. Place the downloaded zip file in your `Sites` directory. **Note**: I recommend you create a subdirectory for your WordPress sites within your `Sites` directory. For the remainder of this tutorial, I assume your WordPress site is under the directory `WordPress_Sites`. 4. Unzip the file, and rename the result folder to whatever you would like such as `MyWordPressSite`. 5. Now, we need to created the `MySQL` database for the site. Open Terminal and access the `MySQL` server: mysql -u root -p 6. You will be prompted for the password for `root`, which you should have set earlier. If not, by default `root` has no password. 7. Inside the MySQL monitor, create a database for your site with whatever name you would like. Be sure to end your command with a semi-colon `;`. Example: CREATE DATABASE first_wordpress_site; 8. Close the MySQL monitor, and navigate to your WordPress site from a web browser. Example: http://localhost/WordPress_Sites/MyWordPressSite/ 9. Follow the instructions on the screen. Provide the name of the database you just created. The database username and password are your login credentials for the `MySQL` server. The database host is `127.0.0.1` or `localhost`. For table prefix, name this something other than `wp_` for security purposes. Be sure to include an underscore after the prefix. 10. If everything was entered properly, upon clicking `Submit`, you should move onto the next page. 11. Finish following the instructions, and when you are done creating an account and logging in, you will have your WordPress site! - **Note**: If you wish to delete your WordPress site, remove the corresponding WordPress folder from your `Sites` directory. Then go into the MySQL monitor on the command line and execute the command: DROP DATABASE <database_name>; ## Git Tutorial -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 31 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -148,7 +148,7 @@ Apache is a web server, and we will be using it to do web development locally. A - **Note**: If you cannot reach your site via `http://localhost` you might need to add an alias in your `/etc/hosts` file: `127.0.0.1 localhost`. It should exist by default. #### Document Root We are going to change the **document root** for Apache, so it points to a folder in our home directory. @@ -171,22 +171,27 @@ We are going to change the **document root** for Apache, so it points to a folde 5. In that same `<Directory>` block you will find an `AllowOverride` setting, this should be changed as follows: AllowOverride All #### User & Group 1. 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 `_www`. 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 `<username>` with your real username), with a group of `staff`: User your_user Group staff 2. Now, save and close the file. #### Create a Sites Folder 1. Restart your Apache with `sudo apachectl restart` to pick up the changes you made to the configuration file. 2. Now, you need to create a `Sites` folder in the root of your home directory. You can do this in Terminal, or in Finder. In this new `Sites` folder create a simple `index.html` and put some dummy content in it like: `<h1>My User Web Root</h1>`. mkdir ~/Sites echo "<h1>My User Web Root</h1>" > ~/Sites/index.html 3. Pointing your browser to `http://localhost` should display your new message. If you have that working, Apache has been correctly configured! ### PHP @@ -208,24 +213,28 @@ We are going to change the **document root** for Apache, so it points to a folde brew install php54 brew doctor #### Apache Setup 1. You have successfully installed PHP 5.4 but we need to tell Apache to use it. You will again need to edit the `/etc/apache2/httpd.conf` file and search for `#LoadModule php5_module`. You will notice that this is line is commented out. We can ignore it because this is pointing to the version of PHP that came with OS X. Below the other LoadModule lines, add this: # Brew PHP LoadModule LoadModule php5_module /usr/local/opt/php54/libexec/apache2/libphp5.so 2. You should also take this time to uncomment the `mod_rewrite.so` module definition so that it will be available: LoadModule rewrite_module libexec/apache2/mod_rewrite.so 3. Restart Apache again, now that PHP has been installed. sudo apchectl restart #### Validating PHP Installation 1. We need to make sure PHP is installed and running as expected. Simply create a file called `info.php` in your `Sites` folder you created earlier. In that file, just enter the line: <?php phpinfo(); ?> 2. Point your browser to `http://localhost/info.php` and you should see a PHP information page:  @@ -274,8 +283,18 @@ We are going to change the **document root** for Apache, so it points to a folde 4. Unzip the file, and rename the result folder to whatever you would like such as `MyWordPressSite`. 5. CREATE THE DATABASE 6. Navigate to your WordPress site from a web browser. Example: http://localhost/WordPress_Sites/MyWordPressSite/ 7. Follow the instructions on the screen. Provide the name of the database you just created. The database username and password are your login credentials for the `MySQL` server. The database host is `127.0.0.1` or `localhost`. For table prefix, name this something other than `wp_` for security purposes. Be sure to include an underscore after the prefix. 8. If everything was entered properly, upon clicking `Submit`, ~~you should be taken to your site.~~ ## Git Tutorial ### Github vs Bitbucket ## Installing Additional Python Libraries -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 31 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,11 @@ # Setting up your Mac ## Installing of Software ### Homebrew - **Homebrew** is an easy to use package manager for OS X. We will be using it to install most of the software we need. 1. First, to check if Homebrew is already installed, type the following into the Terminal: brew --version @@ -32,6 +34,8 @@ ### Anaconda - **Anaconda** is a distribution of Python that handles package management. `conda` is its package management system. It comes with multiple Python packages already included such as `SQLAlchemy`, `pandas`, and `NumPy`. 1. First, check if Anaconda is already install by running the command: conda --version @@ -52,6 +56,8 @@ ### Git - **Git** is a version control system that we will be using to organize our projects clearly and efficiently. 1. First, check if git is already install by running the command: git --version @@ -66,6 +72,8 @@ ### SQLite - **SQLite** is serverless, zero-configuration, transactional SQL database that allows for quick sharing and testing as each database is simply a created file. `sqlite3` is its command line tool. 1. First, check if SQLite is already install by running the command: sqlite3 -version @@ -80,6 +88,8 @@ ### Sequel Pro - **Sequel Pro** is an easy-to-use Mac database management application for working with MySQL databases allowing for direct access to MySQL databases on local and remote servers. 1. First, go to Applications, and see if Sequel Pro is already installed. 2. If already installed, move onto the next section; otherwise, continue. @@ -90,7 +100,9 @@ ### PyCharm - **PyCharm** is an IDE used for programming in Python. It provides code analysis, a graphical debugger, an integrated unit tester, and integration with version control systems (Git) **Note:** PyCharm is merely a suggestion. 1. As a student, you qualify for a free license for PyCharm through JetBrains. Go to [JetBrains](https://www.jetbrains.com/student/) and click on apply. @@ -114,7 +126,7 @@ You may want to download/try out other text editors or IDEs that fit your workin ## Setting Up a Local Development Environment This a step by step guide on setting up the local web development environment on your Mac. The steps I include are taken from [this tutorial](http://getgrav.org/blog/mac-os-x-apache-setup-multiple-php-versions). However, the tutorial includes extra details that are not needed, so I provide only the necessary steps below as well as how to set up your first WordPress site. ### Apache @@ -128,7 +140,7 @@ Apache is a web server, and we will be using it to do web development locally. A sudo apachectl stop - To restart the web server after having made configuration changes, open Terminal and run: sudo apachectl restart @@ -178,7 +190,7 @@ We are going to change the **document root** for Apache, so it points to a folde ### PHP - We will be installing PHP 5.4 through Homebrew. PHP is used for web development, and the backend of WordPress is written in it. 1. First, make sure Homebrew is up to date. @@ -221,9 +233,9 @@ We are going to change the **document root** for Apache, so it points to a folde ### MySQL - While SQLite is useful for quick database creation and sharing, MySQL is scalable, secure and necessary for WordPress. 1. We will be using [MariaDB](https://mariadb.org/) which is a drop-in replacement for MySQL and is easily installed and updated with Homebrew. Open Terminal, and run the following commands: brew update brew install mariadb @@ -250,10 +262,20 @@ We are going to change the **document root** for Apache, so it points to a folde mysql.server stop ### WordPress - Now, we are going to walk through setting up a WordPress site in for local development. 1. First, make sure the Apache and MySQL servers are running. 2. Next, go to [WordPress.org](https://wordpress.org/) and download the lasted version of WordPress. 3. Place the downloaded zip file in your `Sites` directory. **Note:** I recommend you create a subdirectory for your WordPress sites within your `Sites` directory. For the remainder of this tutorial, I assume your WordPress site is under the directory `WordPress_Sites`. 4. Unzip the file, and rename the result folder to whatever you would like such as `MyWordPressSite`. ## Git Tutorial ### Github vs Bitbucket ## Installing Additional Python Libraries -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -114,7 +114,7 @@ You may want to download/try out other text editors or IDEs that fit your workin ## Setting Up a Local Development Environment This a step by step guide on setting up the local web development environment on your Mac. The steps I include are taken from [this tutorial](http://getgrav.org/blog/mac-os-x-apache-setup-multiple-php-versions). However, the tutorial includes extra details that are not needed, so I provide only the necessary steps below as well as how to set up your first Wordpress site. ### Apache -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -90,7 +90,7 @@ ### PyCharm **Note:** PyCharm is merely a suggestion for what to use when working in Python. 1. As a student, you qualify for a free license for PyCharm through JetBrains. Go to [JetBrains](https://www.jetbrains.com/student/) and click on apply. @@ -134,11 +134,11 @@ Apache is a web server, and we will be using it to do web development locally. A - To make sure Apache is working, start Apache , and then try to reach your server in a browser by pointing it at your localhost, you should see a simple header that says It works!. - **Note**: If you cannot reach your site via `http://localhost` you might need to add an alias in your `/etc/hosts` file: `127.0.0.1 localhost`. It should exist by default. #### Configuring Apache We are going to change the **document root** for Apache, so it points to a folder in our home directory. 1. To do so, we need to edit Apache's configuration file. You can use whatever command line editor you are comfortable with, just realize this is a `root-owned` folder so you will need to use `sudo` to be able to edit and save the file. I prefer to use `vim`: @@ -217,7 +217,7 @@ We are going to change the _document root_ for Apache, so it points to a folder  - If you see a similar **phpinfo** result, Apache and PHP are running successfully. ### MySQL -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -134,11 +134,11 @@ Apache is a web server, and we will be using it to do web development locally. A - To make sure Apache is working, start Apache , and then try to reach your server in a browser by pointing it at your localhost, you should see a simple header that says It works!. - _Note_: If you cannot reach your site via `http://localhost` you might need to add an alias in your `/etc/hosts` file: `127.0.0.1 localhost`. It should exist by default. #### Configuring Apache We are going to change the _document root_ for Apache, so it points to a folder in our home directory. 1. To do so, we need to edit Apache's configuration file. You can use whatever command line editor you are comfortable with, just realize this is a `root-owned` folder so you will need to use `sudo` to be able to edit and save the file. I prefer to use `vim`: @@ -217,7 +217,7 @@ We are going to change the *document root* for Apache, so it points to a folder  - If you see a similar _phpinfo_ result, Apache and PHP are running successfully. ### MySQL @@ -240,7 +240,7 @@ We are going to change the *document root* for Apache, so it points to a folder Starting MySQL .. SUCCESS! 4. _Change the MySQL server password_ and secure your installation. The simplest way to do this is to use the provided script: /usr/local/bin/mysql_secure_installation -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 32 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -213,12 +213,43 @@ We are going to change the *document root* for Apache, so it points to a folder <?php phpinfo(); ?> 8. Point your browser to `http://localhost/info.php` and you should see a PHP information page:  9. If you see a similar *phpinfo* result, Apache and PHP are running successfully. ### MySQL - While SQLite is useful for quick database creation and sharing, MySQL is scalable, secure and necessary for Wordpress. 1. We will be using [MariaDB](https://mariadb.org/) which is a drop-in replacement for MySQL and is easily installed and updated with Homebrew. Open Terminal, and run the follwing commands: brew update brew install mariadb brew doctor unset TMPDIR mysql_install_db 2. After a successful installation, you can start the server: mysql.server start 3. If you are successful, you will see the following: Starting MySQL .. SUCCESS! 4. *Change the MySQL server password* and secure your installation. The simplest way to do this is to use the provided script: /usr/local/bin/mysql_secure_installation 5. Just answer the questions and fill them in as is appropriate for your environment. 6. To stop the MySQL server, use the command: mysql.server stop ### Wordpress ## Git Tutorial -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 50 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -132,7 +132,7 @@ Apache is a web server, and we will be using it to do web development locally. A sudo apachectl restart - To make sure Apache is working, start Apache , and then try to reach your server in a browser by pointing it at your localhost, you should see a simple header that says It works!. - *Note*: If you cannot reach your site via `http://localhost` you might need to add an alias in your `/etc/hosts` file: `127.0.0.1 localhost`. It should exist by default. @@ -167,10 +167,58 @@ We are going to change the *document root* for Apache, so it points to a folder 7. Now, save and close the file. 8. Restart your Apache with `sudo apachectl restart` to pick up the changes you made to the configuration file. 9. Now, you need to create a `Sites` folder in the root of your home directory. You can do this in Terminal, or in Finder. In this new `Sites` folder create a simple `index.html` and put some dummy content in it like: `<h1>My User Web Root</h1>`. mkdir ~/Sites echo "<h1>My User Web Root</h1>" > ~/Sites/index.html 10. Pointing your browser to `http://localhost` should display your new message. If you have that working, Apache has been correctly configured! ### PHP - We will be installing PHP 5.4 through Homebrew. PHP is used for web development, and the backend of Wordpress is written in it. 1. First, make sure Homebrew is up to date. brew update brew doctor 2. Next, we have to `tap` into the PHP formulas from Homebrew. brew tap homebrew/dupes brew tap homebrew/versions brew tap homebrew/homebrew-php 3. Once that is complete, install PHP 5.4. brew install php54 brew doctor 4. You have successfully installed PHP 5.4 but we need to tell Apache to use it. You will again need to edit the `/etc/apache2/httpd.conf` file and search for `#LoadModule php5_module`. You will notice that this is line is commented out. We can ignore it because this is pointing to the version of PHP that came with OS X. Below the other LoadModule lines, add this: # Brew PHP LoadModule LoadModule php5_module /usr/local/opt/php54/libexec/apache2/libphp5.so 5. You should also take this time to uncomment the `mod_rewrite.so` module definition so that it will be available: LoadModule rewrite_module libexec/apache2/mod_rewrite.so 6. Restart Apache again, now that PHP has been installed. sudo apchectl restart 7. We need to make sure PHP is installed and running as expected. Simply create a file called `info.php` in your `Sites` folder you created earlier. In that file, just enter the line: <?php phpinfo(); ?> 8. Point your browser to `http://localhost/info.php` and you should see a shiny PHP information page:  ### MySQL ### Wordpress ## Git Tutorial -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -132,7 +132,9 @@ Apache is a web server, and we will be using it to do web development locally. A sudo apachectl restart - To make sure Apache is working, start Apache , and then try to reach your server in a browser by pointing it at your [localhost](http:://localhost), you should see a simple header that says It works!. - *Note*: If you cannot reach your site via `http://localhost` you might need to add an alias in your `/etc/hosts` file: `127.0.0.1 localhost`. It should exist by default. #### Configuring Apache -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -114,6 +114,8 @@ You may want to download/try out other text editors or IDEs that fit your workin ## Setting Up a Local Development Environment This a step by step guide on setting up the local web development environment on your Mac. The steps I include are taken from [this tutorial](http://getgrav.org/blog/mac-os-x-apache-setup-multiple-php-versions). However, the tutorial also includes extra details that are not needed, so I include the necessary steps below. ### Apache Apache is a web server, and we will be using it to do web development locally. Apache 2.4 is pre-installed on OS-X Yosemite. @@ -129,16 +131,18 @@ Apache is a web server, and we will be using it to do web development locally. A - To restart the web servera after having made configuration changes, open Terminal and run: sudo apachectl restart - To make sure Apache is working, start Apache , and then try to reach your server in a browser by pointing it at your localhost (go to [http:://localhost], you should see a simple header that says It works!. #### Configuring Apache We are going to change the *document root* for Apache, so it points to a folder in our home directory. 1. To do so, we need to edit Apache's configuration file. You can use whatever command line editor you are comfortable with, just realize this is a `root-owned` folder so you will need to use `sudo` to be able to edit and save the file. I prefer to use `vim`: sudo vim /etc/apache2/httpd.conf 2. Search for the term `DocumentRoot`, and you should see the line: DocumentRoot "/Library/WebServer/Documents" @@ -159,6 +163,8 @@ We are going to change the *document root* for Apache, so it points to a folder User your_user Group staff 7. Now, save and close the file. ### MySQL ### PHP -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 43 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -116,6 +116,49 @@ You may want to download/try out other text editors or IDEs that fit your workin ### Apache Apache is a web server, and we will be using it to do web development locally. Apache 2.4 is pre-installed on OS-X Yosemite. - To start up the web server, open Terminal and run: sudo apachectl start - To stop the web server, open Terminal and run: sudo apachectl stop - To restart the web servera after having made configuration changes, open Terminal and run: sudo apachectl restart #### Configuring Apache We are going to change the *document root* for Apache, so it points to a folder in our home directory. 1. To do so, we need to edit Apache's configuration file. Open the file in Terminal using whatever command line editor you like. I prefer `vim`. Example command: sudo vim /etc/apache2/httpd.conf 2. Search for term `DocumentRoot`, and you should see the line: DocumentRoot "/Library/WebServer/Documents" 3. Change that line to the directory you want to point to on your account where `<username>` is your username: DocumentRoot "/Users/<username>/Sites" 4. You also need to change the `<Directory>` tag reference right below the DocumentRoot line. This should also be changed to point to your new document root also: <Directory "/Users/<username>/Sites"> 5. In that same `<Directory>` block you will find an `AllowOverride` setting, this should be changed as follows: AllowOverride All 6. 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 `_www`. 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 `<username>` with your real username), with a group of `staff`: User your_user Group staff ### MySQL ### PHP -
psalessi revised this gist
Mar 17, 2015 . 1 changed file with 20 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -90,8 +90,28 @@ ### PyCharm *Note:* PyCharm is merely a suggestion for what to use when working in Python. 1. As a student, you qualify for a free license for PyCharm through JetBrains. Go to [JetBrains](https://www.jetbrains.com/student/) and click on apply. 2. Once you have applied and created an account through JetBrains, [download the professional version of PyCharm](https://www.jetbrains.com/pycharm/). 3. PyCharm requires Java which can be [downloaded here](https://support.apple.com/kb/DL1572?locale=en_US). You can also install using Homebrew. 4. When PyCharm asks for a license, provide your account login information for your JetBrains account. Your license must be renewed yearly. ### Other IDE/TextEditor You may want to download/try out other text editors or IDEs that fit your working style. - [Spyder](https://github.com/spyder-ide/spyder) comes packaged with Anaconda. It is a Python IDE. To run it from the Terminal: /Users/<username>/anaconda/bin/spyder ; exit; - [Komodo Edit](http://komodoide.com/komodo-edit/) is a fairly simple text-editor. - You could also try out [PhpStorm](https://www.jetbrains.com/phpstorm/) and [WebStorm](https://www.jetbrains.com/webstorm/) also through JetBrains. ## Setting Up a Local Development Environment ### Apache -
psalessi revised this gist
Mar 16, 2015 . 1 changed file with 27 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -38,7 +38,7 @@ 2. If installed, skip to step X; otherwise continue. 3. [Download Anaconda](https://store.continuum.io/cshop/anaconda/). Choose the Anaconda Graphical Installer for Python 2.7 for Mac OS X. 4. Open the installer and follow the directions. @@ -58,13 +58,35 @@ 2. If already installed, move onto the next section; otherwise, continue. 3. We will be using Homebrew to install git. Run the following commands in Terminal: brew update brew install git brew doctor ### SQLite 1. First, check if SQLite is already install by running the command: sqlite3 -version 2. If already installed, move onto the next section; otherwise, continue. 3. We will be using Homebrew to install SQLite. Run the following commands in Terminal: brew update brew install sqlite brew doctor ### Sequel Pro 1. First, go to Applications, and see if Sequel Pro is already installed. 2. If already installed, move onto the next section; otherwise, continue. 3. [Download Sequel Pro](http://www.sequelpro.com/) and install. 4. When finished installing, be sure to unmount the DMG file from your computer. ### PyCharm @@ -78,6 +100,8 @@ ### PHP ### Wordpress ## Git Tutorial ### Github vs Bitbucket -
psalessi revised this gist
Mar 16, 2015 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -52,6 +52,16 @@ ### Git 1. First, check if git is already install by running the command: git --version 2. If already installed, move onto the next section; otherwise, continue. 3. We will be using Homebrew to install git. Run the following command in Terminal: brew install git ### SQLite ### Wordpress -
psalessi revised this gist
Mar 16, 2015 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,6 +33,7 @@ ### Anaconda 1. First, check if Anaconda is already install by running the command: conda --version 2. If installed, skip to step X; otherwise continue. @@ -42,10 +43,12 @@ 4. Open the installer and follow the directions. 5. To make sure Anaconda properly installed, open a Terminal window and run: conda --version 6. Make sure Anaconda is up to date by running: conda update anaconda ### Git -
psalessi revised this gist
Mar 16, 2015 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,28 +12,28 @@ 3. If it is not installed, launch Xcode and if prompted, agree to the Terms and Conditions. Then, open the Terminal and install the Command Line tools with this command: xcode-select --install 4. You can go to the [Homebrew site](http://brew.sh/) for more information, but to install Homebrew, run this command: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 5. Once it has finished, ensure `brew` installed correctly by typing: brew --version 6. Run the following command to ensure everything is configured properly: brew doctor 7. Run the following command to ensure `brew` is up to date: brew update ### Anaconda 1. First, check if Anaconda is already install by running the command: conda --version 2. If installed, skip to step X; otherwise continue.
NewerOlder