Skip to content

Instantly share code, notes, and snippets.

View horlathunbhosun's full-sized avatar
🎯
Focusing

Olulode Olatunbosun horlathunbhosun

🎯
Focusing
View GitHub Profile
@horlathunbhosun
horlathunbhosun / in_array_r()
Created September 28, 2020 14:55 — forked from Billy-/in_array_r()
in_array_r() - a multidimensional version of PHP's in_array()
function in_array_r($needle, $haystack, $strict = false) {
foreach ($haystack as $item) {
if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && in_array_r($needle, $item, $strict))) {
return true;
}
}
return false;
}
server {
root /var/www/app/public;
index index.php;
server_name domain;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
sudo apt -y install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt -y install php7.4
sudo apt-get install php-mbstring
sudo apt-get install php-zip
sudo apt-get install php-xml
sudo apt-get install php-mysql
@horlathunbhosun
horlathunbhosun / Inflect.php
Created July 7, 2020 08:12 — forked from tbrianjones/Inflect.php
A PHP Class for converting English words between Singular and Plural.
<?php
// original source: http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/
/*
The MIT License (MIT)
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy