Skip to content

Instantly share code, notes, and snippets.

View pablodz's full-sized avatar
🚀
9.99x Engineer

Pablo pablodz

🚀
9.99x Engineer
View GitHub Profile
@pablodz
pablodz / Dockerfile
Last active July 11, 2023 23:10
Easy way to compile grpc, grpc_plugins and protoc to compile all .proto files to any language
FROM ubuntu:latest
WORKDIR /app
RUN apt-get update && \
apt-get install -y \
build-essential \
autoconf \
libtool \
pkg-config \
@pablodz
pablodz / gobs.go
Created March 23, 2023 05:41
gobs instead of json marshal golang
package main
import (
"bytes"
"encoding/gob"
"fmt"
"github.com/go-redis/redis"
)
type Address struct {
package example
import "github.com/pablodz/inotifywaitgo/inotifywaitgo"
func Example() {
dir := "./my_files"
files := make(chan []byte)
errors := make(chan []byte)
go inotifywaitgo.WatchPath(&inotifywaitgo.Settings{
@pablodz
pablodz / main.go
Created January 11, 2023 03:38
Example multitenant microservice written in golang
package main
import (
"fmt"
"net/http"
)
// Tenant struct to hold tenant information
type Tenant struct {
ID int
@pablodz
pablodz / main.go
Created January 10, 2023 23:21
Send a sentry error with custom fields simplistic way
package logger
import (
"fmt"
"log"
"os"
"time"
"github.com/getsentry/sentry-go"
)
@pablodz
pablodz / config
Created September 30, 2022 03:41 — forked from busterc/config
[Fix Slow BitBucket] remove IPv6 from ssh/git for bitbucket.org #git #bitbucket #ssh
# https://bitbucket.org/site/master/issues/8809/cloning-and-pushing-excruciatingly-slow#comment-34263833
Host bitbucket.org
AddressFamily inet
X Y Z R G B Intensity
731001.53 9246012.31 3316.09 241 227 242 8481.00
731002.11 9246010.85 3316.43 168 163 195 11565.00
731000.32 9246012.16 3317.49 182 167 188 8481.00
731002.40 9246011.24 3315.82 148 137 167 8738.00
731000.35 9246012.20 3317.24 204 189 212 5654.00
731001.29 9246010.10 3318.00 132 127 154 6168.00
731001.67 9246010.62 3317.10 179 174 204 7710.00
731001.81 9246011.19 3316.55 168 162 189 7967.00
731002.92 9246010.82 3315.35 194 179 200 11565.00
@pablodz
pablodz / dia_1.csv
Created July 9, 2022 00:07
dia_1.csv
X Y Z R G B Intensity
731000.31 9246012.06 3317.59 126 119 163 5911.00
731002.53 9246010.16 3316.46 118 110 160 6939.00
731000.50 9246012.30 3316.79 127 121 159 3855.00
731000.25 9246012.73 3317.08 126 120 157 5654.00
731001.47 9246010.60 3317.28 121 114 159 4369.00
731000.70 9246011.82 3317.23 123 116 161 5140.00
731001.55 9246010.33 3317.76 117 110 156 3598.00
731000.17 9246012.24 3317.63 123 117 159 6939.00
731002.04 9246011.01 3316.09 119 113 153 9766.00
@pablodz
pablodz / install-jitsi-desktop.bash
Created June 9, 2022 15:07 — forked from joker-x/install-jitsi-desktop.bash
Install jitsi-desktop 2.10.5550-1 on Ubuntu 20.04 or 22.04
#!/bin/bash
# Install jitsi-desktop 2.10.5550-1 on Ubuntu 20.04 or 22.04:
# ----------------------------------------------------------
# Add missing dependencies and force to run with openjdk-8
[ "$(id -u)" -ne 0 ] && echo "This script must be run as root" && exit 1
function installDependencies() {
apt update
@pablodz
pablodz / Dockerfile
Created January 30, 2022 21:20
Dockerfile to build in Flutter
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
# Prerequisites
RUN apt update && apt install -y \
curl \
wget \
git \
unzip \