Skip to content

Instantly share code, notes, and snippets.

View nenodias's full-sized avatar

Horácio Dias Baptista Neto nenodias

View GitHub Profile
@nenodias
nenodias / main.go
Created October 25, 2024 16:36
Example Mysql Table with *string id
package main
import (
"context"
"fmt"
"log"
"time"
"github.com/vingarcia/ksql"
"github.com/vingarcia/ksql/adapters/kmysql"
@nenodias
nenodias / gist:e3c14b3c869c462d5883cd95786a589d
Last active May 23, 2024 12:01
Raspberry pi Chrome-arm64.deb Chromiun-arm64.deb
https://archive.raspberrypi.org/debian/pool/main/c/chromium-browser/
https://www.blackmoreops.com/2021/09/16/add-raspberry-pi-repository-in-ubuntu/#google_vignette
@nenodias
nenodias / main.py
Created April 24, 2024 03:39
Exemplo tkinter utilizando Thread e Command e disabilitando botão que inicia ação
from dataclasses import dataclass
from threading import Thread, Lock
from tkinter import *
from tkinter import messagebox
from time import sleep
from typing import Any
STATE = "state"
ENABLED = "normal"
DISABLED = "disabled"
@nenodias
nenodias / main.py
Created April 24, 2024 03:00
Exemplo tkinter utilizando thread
from threading import Thread
from tkinter import *
from time import sleep
cont=0
def clicou():
global cont
while True:
cont+=1
conta_label.config(text=f"contando: {cont}")
@nenodias
nenodias / main.py
Last active April 24, 2024 03:00
Exemplo tkinter utilizando o método after (Callback)
from tkinter import *
from time import sleep
cont=0
def clicou():
global cont
while True:
cont+=1
conta_label.config(text=f"contando: {cont}")
print(cont)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x615c5e]
goroutine 38 [running]:
go/types.(*Checker).handleBailout(0xc00043c000, 0xc0002cdbd0)
/usr/local/go/src/go/types/check.go:367 +0x88
panic({0xa9d000?, 0xfa2cb0?})
/usr/local/go/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xc17ab8, 0xfa99a0})
@nenodias
nenodias / Dockerfile
Created March 26, 2024 22:22
Golang DockerFile
FROM debian:12-slim as builder
RUN apt update && apt install -y --no-install-recommends \
ca-certificates \
git \
wget \
tar \
gcc \
g++ \
make \
@nenodias
nenodias / README.md
Created January 26, 2024 12:47
Altera attributo de xml com python3

Para executar o script é necessário o python3 instalado e configurado no PATH.

python3 altera_xml.py arquivo.xml
@nenodias
nenodias / main.go
Created April 27, 2023 15:33
Go Rabbitmq
package main
import (
"context"
"fmt"
"log"
"time"
amqp "github.com/rabbitmq/amqp091-go"
)
@nenodias
nenodias / README.md
Created April 2, 2023 21:36
Python Pika - AMQP Producer/Consumer

Example using Python + Pika for producing and receiving messages from AMQP