This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function table.shuffle(input, debug) | |
if not type(input) == "table" then print("table.shuffle ERROR: <input> must be array") return nil end | |
if not type(debug) == "nil" or not type(debug) == "boolean" then print("table.shuffle ERROR: <debug> must be nil or boolean") return nil end | |
if debug == nil then debug = false end -- if debug is true, it'll print the output | |
math.randomseed(os.time()) | |
local output = {} | |
while true do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
BUILD_DEPS="zip unzip git" | |
DEPS="php7.3 curl redis supervisor apache2 php7.3-{xml,mbstring,common,curl,opcache} composer" | |
JIKAN_PATH="/var/www/jikan" | |
apt-get update \ | |
&& apt-get -y dist-upgrade \ | |
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \ | |
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu $(lsb_release -s -c) main" | tee /etc/apt/sources.list.d/php.list \ |