##Given Apache 2 and MySQL are already installed.
#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated
#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules
| # Download & install marports http://www.macports.org/install.php | |
| $ sudo port selfupdate | |
| $ sudo port install nginx | |
| $ sudo launchctl load -w /Library/LaunchDaemons/org.macports.nginx.plist | |
| $ sudo port install php5 +fastcgi fcgi | |
| $ sudo mkdir /opt/local/etc/LaunchDaemons/org.macports.php-fastcgi | |
| $ cd /opt/local/etc/LaunchDaemons/org.macports.php-fastcgi | |
| $ mate org.macports.php-fastcgi.plist # or vim org.macports.php-fastcgi.plist |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>JS Prime Generator</title> | |
| </head> | |
| <body> | |
| <div id="res"></div> | |
| <button id="generate">Generate more primes!</button> | |
| <script type="text/javascript"> | |
| (function(){ |
| <?php | |
| class BootstrapFormHelper extends AppHelper { | |
| public $helpers = array('Html', 'Form'); | |
| public function input($name, $options = array()) { | |
| $default = array( | |
| 'type' => null, | |
| 'label' => null, | |
| 'before' => null, // to convert .input-prepend |
| <?php | |
| if (!isset($modules)) { | |
| $modulus = 11; | |
| } | |
| if (!isset($model)) { | |
| $models = ClassRegistry::keys(); | |
| $model = Inflector::camelize(current($models)); | |
| } | |
| ?> | |
| <div class="pagination"> |
| ./configure \ | |
| --prefix=/opt/local/php/5.4 \ | |
| --bindir=/opt/local/bin \ | |
| --with-config-file-path=/opt/local/php/5.4/etc \ | |
| --with-config-file-scan-dir=/opt/local/php/5.4/var/db \ | |
| --mandir=/opt/local/php/5.4/share/man \ | |
| --infodir=/opt/local/php/5.4/share/info \ | |
| --program-suffix=-5.4 \ | |
| --with-apxs2=/opt/local/apache2/bin/apxs \ | |
| --enable-pdo \ |
| ./configure \ | |
| --prefix=/opt/local/php/5.4 \ | |
| --bindir=/opt/local/bin \ | |
| --with-config-file-path=/opt/local/php/5.4/etc \ | |
| --with-config-file-scan-dir=/opt/local/php/5.4/var/db \ | |
| --mandir=/opt/local/php/5.4/share/man \ | |
| --infodir=/opt/local/php/5.4/share/info \ | |
| --program-suffix=-5.4 \ | |
| --with-apxs2=/opt/local/apache2/bin/apxs \ | |
| --enable-pdo \ |
| sudo aptitude -y install nginx | |
| cd /etc/nginx/sites-available | |
| sudo rm default | |
| sudo cat > jenkins | |
| upstream app_server { | |
| server 127.0.0.1:8080 fail_timeout=0; | |
| } | |
| server { | |
| listen 80; |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project name="name-of-project" default="build"> | |
| <target name="build" | |
| depends="prepare,lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpdoc,phpcb"/> | |
| <target name="build-parallel" | |
| depends="prepare,lint,tools-parallel,phpcb"/> | |
| <target name="tools-parallel" |
##Given Apache 2 and MySQL are already installed.
#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated
#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules
| /* | |
| * add this to your own css file, | |
| * to overwrite the _chosen_ styling, to look more like bootstrap! | |
| * | |
| * note: for the error part to work, an .error class-name must be added | |
| * to a wrapping DIV, to display the bootstrap error styling. I have | |
| * just use the wrapping .control-group DIV | |
| * | |
| * credit: Rasmus Burkal, @rabu81 | |
| * Drew Miller, @mewdriller |