Skip to content

Instantly share code, notes, and snippets.

View adelmofilho's full-sized avatar
🇧🇷
This Too Shall Pass

Adelmo Filho adelmofilho

🇧🇷
This Too Shall Pass
View GitHub Profile
@adelmofilho
adelmofilho / cdk_synth.yaml
Created March 1, 2021 15:06
ML Discovery S01E02
Resources:
MldiscoveryServiceRoleEB31CFF1:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: sts:AssumeRole
Effect: Allow
Principal:
Service: lambda.amazonaws.com
@adelmofilho
adelmofilho / docker-compose.jenkins-sock.yml
Last active June 21, 2020 00:30
Docker sock mount approach to run Jenkins as a Docker container
# This docker-compose file intent to run a Jenkins container connected to the host machine Docker daemon.
#
# A discussion about potential security issues and improvements on this approach can be found at:
# https://forums.docker.com/t/using-docker-in-a-dockerized-jenkins-container/322/11
#
# Source: http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
version: '3.1'
volumes:
@adelmofilho
adelmofilho / docker-compose.jenkins-dind.yml
Created June 21, 2020 00:17
Docker-in-Docker approach to run Jenkins as a Docker container
# This docker-compose file intent to create a multi-container application
# that runs a Jenkins container connected via TLS to a Docker-in-Docker (dind) container as Docker daemon.
#
# Advice about this approach can be found at:
# http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
#
# As well discussion about another alternatives on this setup can be found at:
# https://forums.docker.com/t/using-docker-in-a-dockerized-jenkins-container/322/11
#
# Quick reference about Docker-in-Docker can be fount at:
@adelmofilho
adelmofilho / main.tf
Last active January 30, 2020 03:19
terraform main file
/*
* DigitalOcean Provider
* https://www.terraform.io/docs/providers/do/index.html
*/
provider "digitalocean" {
token = "${var.token}"
api_endpoint = "${var.api_endpoint}"
}
@adelmofilho
adelmofilho / youtube_api_request.R
Created October 21, 2018 16:27
Extração de dados dos vídeos do canal do Pirula
library(stringr)
library(dplyr)
library(RJSONIO)
library(magrittr)
isNull <- function(x){
if (is.null(x)) { y <- NA }
else { y <- x }
return(y)