Skip to content

Instantly share code, notes, and snippets.

View dxdns's full-sized avatar

Diógenes Rodrigues dxdns

View GitHub Profile
@dxdns
dxdns / Install Android Studio Manual on Linux
Created January 24, 2025 23:51 — forked from lawgimenez/Install Android Studio Manual on Linux
Install Android Studio Manual on Linux
sudo dnf upgrade
sudo dnf update
sudo dnf install bzip2-libs.i686 zlib.i686 ncurses-libs.i686 -y
Download Android Studio from developer.android.com and it comes in tar.gz file. Cd to download folder and then run on terminal
sudo tar -zxvf android-studio-*-linux.tar.gz
sudo mv android-studio /opt/
@dxdns
dxdns / wsl-info.md
Created September 23, 2024 22:31 — forked from WillianTomaz/wsl-info.md
Instruções do WSL (Instalação, Backup e Restauração)

Instruções para Instalação, Backup e Restauração do WSL 2

  • Observação:

    • Sempre buscar pela documentação oficial, este documento é um tutorial
      que pode não te atender conforme tenha novas atualizações do processo de instalação.
    • As referências estão no final do documento.
  • Foi utilizado:

  • Windows 10

@dxdns
dxdns / data.json
Last active March 17, 2025 17:21
projects
[
{"name": "nfe-to-pdf", "language": "typescript"},
{"name": "image-to-text", "language": "typescript"},
{"name": "files", "language": "typescript"},
{"name": "icms", "language": "typescript"},
{"name": "sql", "language": "typescript"},
{"name": "qr-code", "language": "typescript"}
]
func openbrowser(url string) {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
case "darwin":
err = exec.Command("open", url).Start()
@dxdns
dxdns / revprox.go
Created May 18, 2024 00:23 — forked from JalfResi/revprox.go
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
@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)