sudo apt update
sudo apt install apache2 curl
Configure Apache Firewall
String.prototype.slugify = function (separator = "-") { | |
return this | |
.toString() | |
.normalize('NFD') // split an accented letter in the base letter and the acent | |
.replace(/[\u0300-\u036f]/g, '') // remove all previously split accents | |
.toLowerCase() | |
.trim() | |
.replace(/[^a-z0-9 ]/g, '') // remove all chars not letters, numbers and spaces (to be replaced) | |
.replace(/\s+/g, separator); | |
}; |
<?php | |
namespace EDGVI10; | |
class Helpers | |
{ | |
public static function getEnv($filepath) | |
{ | |
$env = file_get_contents($filepath); |
<?php | |
function base64url_encode($data) | |
{ | |
$base64 = base64_encode($data); | |
if ($base64 === false) return false; | |
$url = strtr($base64, '+/', '-_'); |
{ | |
"uuid": "123456-123456-123456-123456-123456", | |
"name": "Eduardo Gomes Vieira", | |
"nickname": "edgvi10", | |
"role": "developer", | |
"key": "value" | |
} |
<?php | |
function parseValue($value) | |
{ | |
$functions = ["UUID()", "NOW()", "NULL"]; | |
$useapostrofe = true; | |
if ($useapostrofe) $useapostrofe = (array_search($value, $functions) === false) ? true : false; | |
if ($useapostrofe) $useapostrofe = (hexdec(intval($value)) == hexdec($value)) ? false : true; | |
if ($useapostrofe) $useapostrofe = (hexdec(floatval($value)) == hexdec($value)) ? false : true; |
Array.prototype.search = function (keyword, options) { | |
const results = []; | |
if (options === undefined) options = {}; | |
this.map(item => { | |
if (typeof item === "object") { | |
var keys = Object.keys(item); | |
if ("fields" in options) | |
keys = options["fields"]; |
export const search = (list, keyword, options) => { | |
if (options === undefined) options = {}; | |
if (typeof list === "object") { | |
const results = {}; | |
Object.keys(list).map(item_index => { | |
const item = list[item_index]; | |
if (typeof item === "object") { | |
var keys = Object.keys(item); |
:root { | |
--md-red-50: #ffebee; | |
--md-red-100: #ffcdd2; | |
--md-red-200: #ef9a9a; | |
--md-red-300: #e57373; | |
--md-red-400: #ef5350; | |
--md-red-500: #f44336; | |
--md-red-600: #e53935; | |
--md-red-700: #d32f2f; | |
--md-red-800: #c62828; |
UPDATE `produtos` SET | |
`CODIGO_INTERNO` = TRIM('0' FROM `CODIGO_BARRAS`), | |
`CODIGO_BARRA_REF` = `CODIGO_BARRAS`, | |
`CODIGO_FORNECEDOR` = '0001', | |
-- `CODIGO_LOJA` = '002', | |
`DATA_CAD` = DATE(NOW()), | |
`DATA_ALT` = DATE(NOW()), | |
`DATAINI_PROM` = DATE(NOW()), | |
`DATAFIM_PROM` = DATE(NOW()), |