Skip to content

Instantly share code, notes, and snippets.

@luzfcb
luzfcb / template_LGPD.md
Last active July 22, 2024 03:30
Template LGPD - Template para solicitar exclusão de dados conforme a LGPD - Lei Geral de Proteção de Dados do brasil. LEI Nº 13.709, DE 14 DE AGOSTO DE 2018. Disclaimer: Não sou advogado e não me responsabilizo por qualquer coisa decorrente do uso desde conteudo. Use por sua conta e risco.

Olá <NOME_EMPRESA>.

Vocês estão me enviando <email, ligação, SMS, via plataforma Whatsapp, via plataforma Telegram> comerciais não-solicitados, portanto SPAM.

No dia vocês enviaram ao meu uma mensagem comércial, com o seguinte texto:

<MENSAGEM>
@phortuin
phortuin / postgres.md
Last active July 16, 2024 04:19
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql@14

(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)

@ilyar
ilyar / use-daedalus-socket-cardano-cli.sh
Last active February 21, 2023 09:27
Use Daedalus socket for cardano-cli for Mainnet or Testnet the Cardano
#!/usr/bin/env bash
# Install cardano-cli or use docker https://gist.github.com/ilyar/bf4c2346be1a74c50e488181986808fb
#
# Linux https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-linux/latest-finished
# Win64 https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-win64/latest-finished
# Macos https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-macos/latest-finished
# Extcact only cardano-cli into /usr/local/bin/cardano-cli
# Check
cardano-cli --version
package mw
import (
"fmt"
"net/http"
"time"
)
type Logger struct{}
func main() {
// STEP 1, STEP 2, STEP 3
// ...
// Start the server in a child routine
go func() {
if err := s.Serve(listener); err != nil {
log.Fatalf("Failed to serve: %v", err)
}
}()
@cinhtau
cinhtau / kafka-playbook.yml
Last active April 28, 2022 22:50
Ansible playbook to start a minimum HA Apache Kafka + ZooKeeper cluster of 3 nodes with docker containers, on host 1 Kafka Manager is started
# playbook for Apache Kafka deployment
# with docker containers
---
- hosts: all
vars:
ids:
host01: 1
host02: 2
host03: 3
package app
import (
"net/http"
u "lens/utils"
"strings"
"go-contacts/models"
jwt "github.com/dgrijalva/jwt-go"
"os"
"context"
@baijum
baijum / protectedapi.go
Last active October 1, 2019 01:48
Securing API end points using Negroni, Gorilla Mux, and JWT Middleware
package main
import (
"net/http"
jwtmiddleware "github.com/auth0/go-jwt-middleware"
jwt "github.com/dgrijalva/jwt-go"
"github.com/gorilla/mux"
"github.com/urfave/negroni"
)
@waichee
waichee / create_docker_container.sh
Created February 14, 2017 10:12
Steps to create a docker container with dependencies required for compiling Tensorflow Serving
# Clone the Tensorflow Serving source
git clone https://github.com/tensorflow/serving
cd serving && git checkout <commit_hash>
# Build the docker image (time to go get yourself a coffee, maybe a meal as well, this will take a while.)
docker build -t some_user_namespace/tensorflow-serving:latest -f ./serving/tensorflow_serving/tools/docker/Dockerfile.devel .
# Run up the Docker container in terminal
docker run -ti some_user_namespace/tensorflow-serving:latest
@raghothams
raghothams / demography_mapper.py
Last active September 19, 2017 03:01
Spark 2.X MongoDB
from pyspark.sql import SparkSession
spark = SparkSession \
.builder \
.appName("demography mapper") \
.getOrCreate()
df_user = spark.read.format("com.mongodb.spark.sql.DefaultSource")\
.option("spark.mongodb.input.uri", "mongodb://localhost:27017/raw.user").load()