The setup installs the following software:
- Git
- Composer
- Nginx
- PHP
- MariaDB
- Redis
| #!/bin/bash | |
| echo "###########################" | |
| echo "# Choose PHP Version #" | |
| echo "###########################" | |
| echo "1) [email protected]" | |
| echo "2) [email protected]" | |
| echo "" | |
| echo "0) exit" | |
| echo |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
| //CSS | |
| // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
| // See also: http://www.paulund.co.uk/change-url-of-git-repository | |
| $ cd $HOME/Code/repo-directory | |
| $ git remote rename origin bitbucket | |
| $ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
| $ git push origin master | |
| $ git remote rm bitbucket |
| <?php | |
| /** | |
| * Check if a directory is empty (a directory with just '.svn' or '.git' is empty) | |
| * | |
| * @param string $dirname | |
| * @return bool | |
| */ | |
| function dir_is_empty($dirname) | |
| { | |
| if (!is_dir($dirname)) return false; |
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /Users/YOUR_USERNAME/Sites; | |
| access_log /Library/Logs/default.access.log main; | |
| location / { | |
| include /usr/local/etc/nginx/conf.d/php-fpm; | |
| } |
This Gist is a collection of configuration files that can be used to easily setup a Homebrew-based LEMP stack on Mac OS X.
Files in this repository are numbered and named for ordering purposes only. At the top of each file is a section of metadata that denote what component the file belongs to and the default name & location of the file. Feel free to implement it however you want.
Note: some configuration files have hard-coded paths to my user directory -- fix it for your setup
| #!/bin/bash | |
| echo "###########################" | |
| echo "# Choose SSH Access #" | |
| echo "###########################" | |
| echo "1) SSH to ..." | |
| echo "0) exit" | |
| echo | |
| printf 'choose [1/2/3/0] : ' |