Skip to content

Instantly share code, notes, and snippets.

View dxdns's full-sized avatar

Diógenes Rodrigues dxdns

View GitHub Profile
@douglasmakey
douglasmakey / sender.go
Last active February 2, 2024 17:05
Golang - send an email with attachments.
package main
import (
"bytes"
"encoding/base64"
"fmt"
"io/ioutil"
"mime/multipart"
"net/smtp"
"os"
@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active May 19, 2024 21:03
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <sanderthedragon@zoho.com>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in
@raisiqueira
raisiqueira / DUMP-MYSQL.md
Last active June 22, 2022 14:49
MYSQL DUMP container Docker

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:

@igorcosta
igorcosta / cpf_cnpj_validator
Created June 26, 2014 19:13
Regex para validar CPF e CNPJ
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
@tmiller
tmiller / README.md
Last active February 2, 2024 20:41
A very simple example of using a map of channels for pub/sub in go.