Some useful commands and scripts for MySQL.
Update: All these commands and more at https://github.com/joseluisq/awesome-mysql-queries-commands
mysql -h host -u username -p password --default_character_set utf8 database_name < mysql_script.sql
git config --global alias.superlog "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all" |
Some useful commands and scripts for MySQL.
Update: All these commands and more at https://github.com/joseluisq/awesome-mysql-queries-commands
mysql -h host -u username -p password --default_character_set utf8 database_name < mysql_script.sql
## docker-compose para correr wordpress con una base de datos en mysql | |
## by PeladoNerd https://youtu.be/eoFxMaeB9H4 | |
version: '3.1' | |
services: | |
wordpress: | |
image: wordpress:php7.1-apache | |
ports: |
Este es un instructivo para un tutorial en Youtube https://youtu.be/pliGG1M87W8
Create an empty git repo or reinitialize an existing one
$ git init
## | |
## How to install mcrypt in php7.2 / php7.3 | |
## Linux / MacOS / OSX | |
## | |
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/ | |
# |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
/************************************************ | |
* | |
* 📩📩📩 window.postMessage() 📩📩📩 | |
* | |
* The window.postMessage() method safely enables cross-origin communication | |
* between Window objects; e.g., between a page and a pop-up that it spawned, | |
* or between a page and an iframe embedded within it. | |
* | |
************************************************/ |
<?php | |
include "fpdf/fpdf.php"; | |
$pdf = new FPDF($orientation='P',$unit='mm', array(45,350)); | |
$pdf->AddPage('P', array(80,350)); | |
$pdf->SetFont('Arial','B',8); //Letra Arial, negrita (Bold), tam. 20 | |
$textypos = 5; | |
$pdf->setY(2); | |
$pdf->setX(2); | |
$pdf->Cell(5,$textypos,"NOMBRE DE LA EMPRESA"); |