cd
to directory, then
php -S localhost:9000
document.addEventListener('submit', function (e) { | |
const form = e.target; | |
let isValid = form.checkValidity(); | |
if (!isValid) { | |
return false; | |
} | |
e.preventDefault(); | |
let data = new FormData(form); |
cd
to directory, then
php -S localhost:9000
echo '<pre style="white-space:normal; border:2px solid grey; margin:1rem; padding:1rem; font-size:12px;">'; | |
print_r( vsprintf(str_replace(array('?'), array('\'%s\''), $query->toSql()), $query->getBindings()) ); | |
echo '</pre>'; |
Via stackoverflow and docs.npmjs.com
On the command line, in your home directory, create a directory for global installations:
mkdir ~/.npm-global
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: POST, GET, DELETE, PUT, PATCH, OPTIONS'); | |
header('Access-Control-Allow-Headers: token, Content-Type'); | |
header('Access-Control-Max-Age: 1728000'); | |
header('Content-Length: 0'); | |
header('Content-Type: text/plain'); | |
die(); | |
} |
module.exports = { | |
outputDir : 'public_html' | |
} |
$resp = $this->json('GET', "THE_URL", [ | |
// THE PAYLOAD | |
]); | |
dd((array)json_decode($resp->content())); |
<?php | |
/** | |
* Check a list of plugins are activated, and alert if not. | |
* @param required_plugins[] should be updated to include the list of required plugins. | |
* @param `?show_active_plugins` can be appended to any URL within wp-admin to show a list of currently active plugins. | |
*/ | |
class checkRequiredPlugin { | |
private $required_plugins = [ | |
'woocommerce/woocommerce.php', | |
]; |
RewriteEngine On | |
RewriteCond %{HTTP_REFERER} !/wp-admin/ [NC] | |
RewriteRule ^(wp-content/uploads/.+?\.(jpe?g|png|gif|svg))$ https://domain.com/$1 [R=301,L] |