The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| rm /etc/apache2/sites-available/000-default.conf | |
| cat >> /etc/apache2/sites-available/000-default.conf << EOF | |
| <VirtualHost *:80> | |
| ServerAdmin webmaster@localhost | |
| DocumentRoot /var/www/public | |
| <Directory /var/www/public> | |
| Options Indexes FollowSymLinks MultiViews | |
| AllowOverride all | |
| Order Deny,Allow |
| <?php | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Excel To Array | |
| |-------------------------------------------------------------------------- | |
| | Helper function to convert excel sheet to key value array | |
| | Input: path to excel file, set wether excel first row are headers | |
| | Dependencies: PHPExcel.php include needed | |
| */ | |
| function excelToArray($filePath, $header=true){ |
| #!/bin/bash | |
| # Set the same ip as in your VagrantFile in order to configure xdebug | |
| VAGRANT_IP= 192.168.33.10 | |
| # Here you can set the root mySQL password | |
| MYSQL_PASSWORD="toor" | |
| # For each of the following list, you can enable or disable its installation, setting it to false | |
| # NOTE: You have to enable Apache and MySQL installations to be able to install phpMyAdmin, otherwise it'll be skipped. |
| sudo apt-get install -y git-core curl zlib1g zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev libsqlite3-0 sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev apache2 | |
| sudo apt-get --ignore-missing install -y git-core curl openssl libssl-dev libcurl4-openssl-dev libreadline6 libreadline6-dev libgdm-dev libncurses5-dev automake autoconf libtool bison postgresql postgresql-contrib libpq-dev pgadmin3 | |
| gpg --keyserver hkp://keys.gnupg.net --recv-k 409B6B1796C275462A1703113804BB82D39DC0E3 | |
| curl -sSL https://get.rvm.io | bash -s stable | |
| source ~/.rvm/scripts/rvm | |
| rvm install 2.3.1 | |
| rvm use 2.3.1 --default |
| #!/bin/bash | |
| # How to install PHP memcached on CentOS 6.5 | |
| # Install dependencies | |
| yum install cyrus-sasl-devel zlib-devel gcc-c++ | |
| # Get the latest libmemcached | |
| wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz | |
| tar -xvf libmemcached-1.0.16.tar.gz |
| window.history.pushState("string", "test", "/new/url"); |
| <?php | |
| /* * ** | |
| * | |
| * This script converts an existing MySQL database to migrations in Laravel 4. | |
| * | |
| * 1. Place this file inside app/controllers/ | |
| * | |
| * 2. In this file, edit the index() method to customize this script to your needs. | |
| * - inside $migrate->ignore(), you pass in an array of table |