Skip to content

Instantly share code, notes, and snippets.

View thiagozs's full-sized avatar
:octocat:
Have a nice day

Thiago Zilli Sarmento thiagozs

:octocat:
Have a nice day
View GitHub Profile
<!-- Game canvas -->
<canvas id="c"></canvas>
<!-- Gameplay HUD -->
<div class="hud">
<div class="hud__score">
<div class="score-lbl"></div>
<div class="cube-count-lbl"></div>
</div>
<div class="pause-btn"><div></div></div>
@thiagozs
thiagozs / eventemitter.go
Created May 29, 2023 19:13
Test case eventemitter golang chalenge
package eventemitter
import (
"fmt"
)
type Data func(data interface{})
var (
datas = make(map[string][]Data)
@thiagozs
thiagozs / bluetooth-reconnect
Created April 24, 2023 14:11 — forked from AndBondStyle/bluetooth-reconnect
Simple linux service for brute-force bluetooth auto-connection
#!/bin/bash
# Miminum delay between iterations, in seconds
delay=10
# Pairs of [bluetooth MAC, test expression]
targets=(
"98:B6:E9:47:F0:4F" "test ! -e /dev/input/js0"
"98:B6:E9:72:6C:31" "test -z \"\$(bluetoothctl info 98:B6:E9:72:6C:31 | grep 'Connected: yes')\""
)
@thiagozs
thiagozs / cosmos.sh
Created April 17, 2023 17:22
=Cosmos scripts bootstrap
#!/bin/bash
rm -r ~/.simapp
cd ~/workspace/cosmos-sdk
./build/simd tendermint unsafe-reset-all
./build/simd init demo
./build/simd keys --keyring-backend test add b9lab
./build/simd add-genesis-account --keyring-backend test b9lab 100000000stake
./build/simd gentx --keyring-backend test b9lab 70000000stake --chain-id $(jq -r '.chain_id' ~/.simapp/config/genesis.json)
./build/simd collect-gentxs
@thiagozs
thiagozs / keybase.md
Created April 14, 2023 17:33
Keybase proof

Keybase proof

I hereby claim:

  • I am thiagozs on github.
  • I am thiagozs (https://keybase.io/thiagozs) on keybase.
  • I have a public key ASApUHr6Hze-uyJtilGgWwKkkyIF0FSP5vnkelRxx0q2zwo

To claim this, I am signing this object:

@thiagozs
thiagozs / aws-lambda-calculator.go
Created March 15, 2023 21:09
AWS lambda calculator
package main
import (
"flag"
"fmt"
)
type Pricing struct {
Region string
PerRequestPrice float64 // in USD per 1 million requests
@thiagozs
thiagozs / docker_compose.yml
Last active February 17, 2023 20:38
Docker Compose postgre and pgadmin
version: '3.9'
services:
postgres:
container_name: postgres
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: secret
PGDATA: /data/postgres
@thiagozs
thiagozs / regexp_schema.go
Created December 13, 2022 14:11
Golang regexp parse schema.rb ruby database
package main
import (
"fmt"
"regexp"
)
func main() {
schema := `
ActiveRecord::Schema.define(version: 2022_12_05_175521) do
@thiagozs
thiagozs / fizzBuzz.go
Created August 19, 2022 22:19
HackerRank FizzBuzz
package main
import (
"bufio"
"fmt"
"io"
"os"
"strconv"
"strings"
)
@thiagozs
thiagozs / gradingStudents.go
Created August 19, 2022 22:01
HackerRank gradingStudents
package main
import (
"bufio"
"fmt"
"io"
"os"
"strconv"
"strings"
"math"