Skip to content

Instantly share code, notes, and snippets.

View Ayesh's full-sized avatar
🌏
👍🏼❤💯🚀🙌🥂🎈🎂🎉✨🍟🍔🥓🥝🍇🚲🛵🪂🚤🌋🗻🏞💈🌊⛱

Ayesh Karunaratne Ayesh

🌏
👍🏼❤💯🚀🙌🥂🎈🎂🎉✨🍟🍔🥓🥝🍇🚲🛵🪂🚤🌋🗻🏞💈🌊⛱
View GitHub Profile
@Ayesh
Ayesh / config.nice
Created October 22, 2023 15:31
Nginx `./configure` script
./configure \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--modules-path=/usr/lib/nginx/modules \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/run/nginx.lock \
--http-client-body-temp-path=/var/cache/nginx/client_temp \
#! /bin/sh
#
# Created by configure
# https://php.watch/articles/compile-php-fedora-rhel-centos
'./configure' \
'--enable-mbstring' \
'--enable-intl' \
'--disable-cgi' \
'--with-openssl' \

Keybase proof

I hereby claim:

  • I am ayesh on github.
  • I am ayesh (https://keybase.io/ayesh) on keybase.
  • I have a public key ASDeCBZ3Gd198xEnKmcpHKk4ZrsHxyRXkzoKqT-HyDqGsAo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am Ayesh on github.
* I am ayesh (https://keybase.io/ayesh) on keybase.
* I have a public key whose fingerprint is 1083 D261 72E3 855D 4F0A A4D6 0A85 2BB5 2939 C224
To claim this, I am signing this object:
@Ayesh
Ayesh / gist:e949642860a01c350b29
Created March 14, 2015 01:27
Generate an array of random integers that averages (or closes) to a given float or integer
<?php
function getRandomintegersFloatAvg($target, $count, $min = 1, $max = 5, $precision = 2) {
if ($target > $max) return FALSE;
if ($target < $min) return FALSE;
if ($count < 1) return FALSE;
if ($count === 1) return array(round($target));
$values = array();
for ($i = 0; $i < $count; $i++) {
$values[] = mt_rand($min, $max);