Reference: macOS 11 Big Sur Nginx Setup: Multiple PHP Versions
Other Refs:
How to setup macOS Multi PHP Development Environment with MySQL and phpmyadmin
Don’t use the default homebrew core tap for PHP. Use shivammathur/php.
Reference: macOS 11 Big Sur Nginx Setup: Multiple PHP Versions
Other Refs:
How to setup macOS Multi PHP Development Environment with MySQL and phpmyadmin
Don’t use the default homebrew core tap for PHP. Use shivammathur/php.
<?php | |
// Use command line in generate.sh | |
// Generation code line by line | |
include __DIR__ . "/vendor/autoload.php"; | |
include __DIR__ . "/bootstrap/app.php"; | |
// Check https://github.com/laravel/framework/blob/8.x/src/Illuminate/Foundation/Console/KeyGenerateCommand.php | |
$key = "base64:" . base64_encode(Illuminate\Encryption\Encrypter::generateKey(config("app.cipher"))); |
MY_KEY=key1|value1,key2|value2 |
function resetSameTopElmsHeight(container, childSelector) { | |
var cols, ph, pt, tempElms, i, ch, co, j; | |
cols = container.find(childSelector); | |
ph = -1; | |
pt = -1; | |
tempElms = []; | |
for (i in cols) { | |
ch = $(cols[i]).outerHeight(); |
<?php | |
$pages = 22; | |
$current = 1; | |
if (isset($_GET['p'])) { | |
$current = filter_var($_GET['p'], FILTER_SANITIZE_NUMBER_INT); | |
} | |
$maxShow = 10; | |
$start = 1; |
#Add at the top after # .bashrc | |
[ -z "$PS1" ] && return | |
#Add at the bottom | |
alias mycomposer="/usr/bin/php-cli -d suhosin.executor.include.whitelist=phar /home/userdir/bin/composer.phar" |
<?php | |
/** | |
* Total Length: 12 digits | |
* [1][2002][0012345] | |
* | | | | |
* | | -> Random: 7 digits | |
* | -> Birth Year: 4 digits | |
* -> Gender 1 male / 2 female: 1 digit | |
*/ |
<div class="wrap"> | |
<h1>My Plugin Admin Page</h1> | |
<h2 class="nav-tab-wrapper"> | |
<a class="nav-tab nav-tab-active" href="#tab1">Tab 1</a> | |
<a class="nav-tab" href="#tab2">Tab 2</a> | |
</h2> | |
<div id="tab1"> | |
<h3>Tab 1 Content</h3> |
<?php | |
$y = date('Y'); | |
$m = date('m'); | |
$d = date('d'); | |
$restrictStart = mktime(0, 30, 0, $m, $d, $y); | |
$restrictEnd = mktime(1, 30, 0, $m, $d, $y); | |
$time = time(); | |
if ($time < $restrictStart || $time > $restrictEnd) { | |
die('not yet!'); |
#!/bin/sh | |
#path to script: /path_to_git_repo/.git/hooks/pre-commit | |
#DB Details | |
DBHOST=localhost | |
DBUSER=myuser | |
DBPASS=mypass | |
DBNAME=test_dbname |