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
<!DOCTYPE html> | |
<html> | |
<title> TESTE AJAX </title> | |
<body> | |
<button onclick="nome_da_funcao()">CLIQUE AQUI</button> | |
<div id="teste"> </div> | |
</body> | |
</html> |
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
apt-get update && apt-get upgrade | |
apt-get install python-software-properties | |
add-apt-repository ppa:ondrej/php | |
apt-get update | |
apt-get install php7.2 | |
apt-get install php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml |
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
# bin bash! | |
sudo add-apt-repository ppa:certbot/certbot | |
sudo apt-get update | |
sudo apt-get install python-certbot-apache | |
sudo certbot --apache -d example.com | |
sudo certbot --apache -d example.com -d www.example.com | |
sudo certbot renew --dry-run |
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
/** | |
* | |
* @var db Base de dados para backup e restauracao | |
*/ | |
var db = window.openDatabase("CAMINHO DO BANCO", "1.0", "NOME DO BANCO", 5 * 2048); | |
/** | |
* Mostra o erro de arquivo | |
* @param {obj} error Recebe o objeto de erro | |
* @returns {void} | |
*/ |
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
// Corrigindo o problema relacionado ao chasert do banco | |
// Setar 191max | |
public function boot(){ | |
Schema::defaultStringLength(191); | |
} |
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
<?php | |
function capitalize($string, $encoding = 'UTF-8') | |
{ | |
$word_splitters = [' ', '-', "O’", "L’", "D’", 'St.', 'Mc', "Dall'", "l’", "d’", "a’", "o’"]; | |
$lowercase_exceptions = ['the', 'van', 'den', 'von', 'und', 'der', 'da', 'of', 'and', "d’", | |
'das', 'do', 'dos', 'e', 'el']; | |
$uppercase_exceptions = ['III', 'IV', 'VI', 'VII', 'VIII', 'IX', 'ME', 'EIRELI', 'EPP', 'S/A', 'S.A', 'LTDA']; | |
$string = mb_strtolower($string, $encoding); | |
$string = str_replace("'", "’", $string); | |
foreach ($word_splitters as $delimiter) |
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
{ | |
"files.autoSave": "afterDelay", | |
"files.autoSaveDelay": 2500, | |
"php.suggest.basic": true, | |
"php.validate.enable": true, | |
"editor.tabSize": 2, | |
"editor.tabCompletion": true, | |
"workbench.panel.location": "bottom", | |
"editor.minimap.enabled": false, | |
"editor.renderWhitespace": "none", |
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
<?php | |
if(isset($_POST ['nome']) && !empty($_POST ['nome'])){ | |
$nome = addslashes(strip_tags($_POST['nome'])); | |
$email = addslashes(strip_tags($_POST['email'])); | |
$para = 'emaildestino@teste.com'; | |
$assunto = 'Dados Página'; | |
$corpo = "Nome: ".$nome."\r\n"."E-mail: ".$email; |
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
/* | |
Install repository GIT | |
composer require barryvdh/laravel-ide-helper | |
Inserir no array de provides | |
local: Config\app.php | |
Inserir | |
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, |
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 () { | |
$('#tbl_veiculos').DataTable({ | |
processing: true, | |
serverSide: true, | |
ajax: '/api/XXXXXX/XXXXXX-json', | |
columns:[ | |
{data :'XXXXXX', name:'XXXXXX'}, | |
], | |
"columnDefs": [ |
OlderNewer