Skip to content

Instantly share code, notes, and snippets.

@alexseif
alexseif / SwitchPhp.sh
Created December 8, 2021 17:16 — forked from labbots/SwitchPhp.sh
Bash script to switch between available PHP versions in Ubuntu. (Tested in Ubuntu 16.04)
#!/bin/bash
# Check if ran with root permissions
if [ `id -u` -ne 0 ]; then
printf "The script must be run as root! (you can use sudo)\n"
exit 1
fi
function arrayContains {
local e match="$1"
@alexseif
alexseif / randomPassword.php
Created March 5, 2020 05:48 — forked from yoga-/randomPassword.php
PHP random password generator - contains at least one lower case letter, one upper case letter, one number and one special character,
//generates a random password of length minimum 8
//contains at least one lower case letter, one upper case letter,
// one number and one special character,
//not including ambiguous characters like iIl|1 0oO
function randomPassword($len = 8) {
//enforce min length 8
if($len < 8)
$len = 8;