Skip to content

Instantly share code, notes, and snippets.

@suhaboncukcu
suhaboncukcu / installphp7.sh
Last active November 23, 2015 19:42 — forked from tronsha/installphp7.sh
Install PHP7 to Ubuntu
#!/bin/bash
apt-get update
apt-get install -y git-core autoconf bison libxml2-dev libbz2-dev libmcrypt-dev libcurl4-openssl-dev libltdl-dev libpng-dev libpspell-dev libreadline-dev pkg-config libssl-dev
mkdir -p /etc/php7/conf.d
mkdir -p /etc/php7/cli/conf.d
mkdir /usr/local/php7
cd /tmp
git clone https://github.com/php/php-src.git --depth=1
cd php-src
./buildconf
randomInRange = function(min, max) {
var random = Math.floor(Math.random() * (max - min + 1)) + min;
return random;
}
randomFromCollection = function(C) {
return function() {
c = C.find().fetch();
i = randomInRange(0, c.length); //c.count() is not valid in meteor 1.0.2.1 since this is an array now.