This file contains hidden or 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 artisan storage:link |
This file contains hidden or 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
Após instalar o MariaDB você consiga entrar no banco de dados sem senha ou mesmo digitando qualquer senha ele entra, faça os passos a seguir para resolver esse problema. | |
1 - Conectar no banco: | |
sudo mysql -u root | |
2 - Consultar usuário cadastrados na tabela user | |
SELECT user, host FROM mysql.user; | |
+------------------+-----------+ | |
| User | Host | |
This file contains hidden or 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 hidden or 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
# EXTENSÕES PHP | |
sudo apt install php7.2 libapache2-mod-php7.2 php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-cli php7.2-zip | |
# INSTALANDO O COMPOSER UBUNTU 16+ | |
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer | |
#PERMISSÕES PASTA PROJETO | |
sudo chown -R www-data:www-data /var/www/html/MyProject/ | |
sudo chmod -R 755 /var/www/html/MyProject/ |
This file contains hidden or 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 hidden or 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
//Define um data de inicio | |
var startDate = new Date('2018-03-20'); | |
//Determina os dias para estimativa (EX.: Expira em 30 dias, faltam 30 dias...) | |
var estimate = 30; | |
//Retorna a quantidade de dias restantes para o tempo estimado | |
function remainingDays(startDate, estimate){ | |
//Define a data atual com a final | |
var finishDate = new Date().getFullYear() + "-" + (new Date().getMonth()+1) + "-" + new Date().getDate(); | |
This file contains hidden or 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
#Configurações básicas | |
git config --global user.name "<username>" | |
git config --global user.email "<email>" | |
git config --global core.editor <comando editr> //Opcional | |
#Todas as informações de configuração | |
git config --list | |
#Verificar configuração | |
git config user.name |
This file contains hidden or 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
*Pré requisitos ********* | |
=> git instalado | |
=> heroku cli instalado | |
=> aplicação gerenciada pelo git | |
************************* | |
#Login no heroku | |
heroku login | |
#Criando aplicação |
This file contains hidden or 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
# Requirements: | |
# Node Installed | |
# Safe User that is running as node | |
#1) Install pm2 | |
sudo npm install -g pm2 | |
#2) Set-up PM2 to autostart upon server rebooting | |
#sudo env PATH=$PATH:/usr/local/bin pm2 startup <platform> -u <safe_user_not_root> | |
sudo env PATH=$PATH:/usr/local/bin pm2 startup ubuntu -u ubuntu |