Rodar o Container do MYSQL
docker run --name dump -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql
Importar .sql
para o container:
docker exec -i <CONTAINER> mysql -uroot -pSENHA --database=dump < dump.sql
Exportar um .sql
para o host:
package main | |
import ( | |
"bytes" | |
"encoding/base64" | |
"fmt" | |
"io/ioutil" | |
"mime/multipart" | |
"net/smtp" | |
"os" |
#!/bin/sh | |
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <[email protected]> | |
# | |
# SPDX-License-Identifier: MIT | |
arch=$(dpkg --print-architecture) | |
echo "Detected architecture: $arch" | |
case "$arch" in |
Rodar o Container do MYSQL
docker run --name dump -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql
Importar .sql
para o container:
docker exec -i <CONTAINER> mysql -uroot -pSENHA --database=dump < dump.sql
Exportar um .sql
para o host:
Para CPF | |
/^\d{3}\.\d{3}\.\d{3}\-\d{2}$/ | |
Para CNPJ | |
/^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/ | |
Para ambos ao mesmo tempo |
A very simple example of using a map of channels for pub/sub in go.
To run it go here http://play.golang.org/p/eXwppMgHR3