Skip to content

Instantly share code, notes, and snippets.

View ehsansouri23's full-sized avatar
๐Ÿ˜ƒ
Just Hope :)

Ehsan Souri ehsansouri23

๐Ÿ˜ƒ
Just Hope :)
View GitHub Profile
@ecoshub
ecoshub / IntToByteArray.go
Last active August 23, 2024 08:31
golang integer to byte array and byte array to integer function
package main
import (
"fmt"
"unsafe"
)
func main(){
// integer for convert
num := int64(1354321354812)
@haidoan
haidoan / createAndSignTx.go
Last active October 29, 2023 08:33
Creating raw bitcoin transaction multiple input output golang
func GetPayToAddrScript(address string) []byte {
rcvAddress, _ := btcutil.DecodeAddress(address, &chaincfg.TestNet3Params)
rcvScript, _ := txscript.PayToAddrScript(rcvAddress)
return rcvScript
}
type TXRef struct{
TXHash string
TXOutputN int
}
@crosstyan
crosstyan / main.go
Last active January 7, 2025 02:18
A websocket based multiroom chat using golang and gin
package main
import (
"log"
"net/http"
"net/url"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
@acastro2
acastro2 / example.go
Last active October 26, 2024 15:50
Kafka retries with Go
package main
import (
"context"
"crypto/tls"
"encoding/json"
"fmt"
"math/rand"
"time"