Skip to content

Instantly share code, notes, and snippets.

View datoga's full-sized avatar

David Torres datoga

  • Aircall
  • Valencia, Spain
  • X @datoga
View GitHub Profile
@datoga
datoga / main.go
Created September 15, 2021 06:07
redis cache bug - main failed once demo with dropped connection
package main
import (
"context"
"fmt"
"github.com/go-redis/cache/v8"
"github.com/go-redis/redis/v8"
)
const key = "key"
@datoga
datoga / auth_request_signing.go
Created February 16, 2020 08:40
Implementing retry policy for auth_request_signing.go
package form3
import (
"bytes"
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"encoding/base64"
"fmt"
@datoga
datoga / dns.sol
Last active May 7, 2018 06:10
First DNS contract
pragma solidity ^0.4.0;
contract dns {
uint constant month = 60*60*24*30; // 1 month in seconds
uint constant RegisterFee = 1 finney;
uint constant RenewFee = 1 finney;
address creator;
struct DNSEntry {