Skip to content

Instantly share code, notes, and snippets.

View dxdns's full-sized avatar

Diógenes Rodrigues dxdns

View GitHub Profile
@dxdns
dxdns / go-module-rename.sh
Created February 17, 2024 15:10
go-module-rename
OLD_MODULE_NAME="old-module-name"
read -p "Enter OLD_MODULE_NAME: " OLD_MODULE_NAME
NEW_MODULE_NAME="hello-host"
read -p "Enter NEW_MODULE_NAME: " NEW_MODULE_NAME
go mod edit -module $NEW_MODULE_NAME
find . -name '*.go' -print0 \
| xargs -0 sed -i -e "s|${OLD_MODULE_NAME}|${NEW_MODULE_NAME}|"
@dxdns
dxdns / README.md
Created February 2, 2024 20:41 — forked from tmiller/README.md
A very simple example of using a map of channels for pub/sub in go.
@dxdns
dxdns / sender.go
Created February 2, 2024 17:05 — forked from douglasmakey/sender.go
Golang - send an email with attachments.
package main
import (
"bytes"
"encoding/base64"
"fmt"
"io/ioutil"
"mime/multipart"
"net/smtp"
"os"
@dxdns
dxdns / filename-test
Last active November 23, 2023 12:13
0.2
We couldn’t find that file to show.
@dxdns
dxdns / golang-tls.md
Created May 24, 2023 18:01 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
,_---~~~~~----._
_,,_,*^____ _____``*g*\"*,
/ __/ /' ^. / \ ^@q f
[ @f | @)) | | @)) l 0 _/
\`/ \~____ / __ \_____/ \
| _l__l_ I
} [______] I
] | | | |
] ~ ~ |
| |

Postman

O Postman permite realizar requisições HTTP a partir de uma interface muito amigável e intuitiva, independente de linguagem, podendo testar diversas rotas rapidamente, além de combinações de parâmetros e retornos.

Disponível tambem para extensão no Google Chrome: Clique aqui

Instalando

Passo 1

Faça o download pelo terminal sequindo os passos abaixo, ou diretamente no site: Clique aqui

@dxdns
dxdns / gist:baffa1f5217564169dd3b26aa94365e6
Created May 1, 2021 14:47 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@dxdns
dxdns / aberto-quitado-receber-recibo.md
Last active March 25, 2024 17:25
comandos sql | firebirdsql
reabrir uma conta a receber, que está como quitada, mas não tem o recibo de baixa
update contas_receber set vlr_quitacao = 0, situacao = 'ABERTO'
where id not in (select id_conta from recibo_receber_itens where id_conta = contas_receber.id) and situacao = 'QUITADO'