This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import urllib | |
import zipfile | |
import uuid | |
import os | |
import shutil | |
def lambda_handler(event, context): | |
print("[lambda_handler] Start") | |
bucket_name = event['Records'][0]['s3']['bucket']['name'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2017-03-20", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"logs:CreateLogGroup", | |
"logs:CreateLogStream", | |
"logs:PutLogEvents" | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Busca de imagens pelo nome no docker hub | |
docker search <nome para busca> | |
//Criação do contêiner de rabbitmq com portas redirecionadas | |
docker run -d –hostname my-rabbit –name rabbitmq -p 8080:15672 -p 5672:5672 rabbitmq:3-management | |
//Criação do contêiner alpine ligado pela rede com o outro contêiner | |
docker run -it –name <nome do contêiner> --link <nome do outro contêiner> alpine /bin/sh | |
//Construir a imagem a partir do Dockerfile. Apenas um por diretório. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine | |
# de qual imagem essa nova imagem será criada | |
MAINTAINER [email protected] | |
# responsável pela imagem | |
RUN mkdir /var/www | |
RUN echo "teste" > /var/www/arquivo.txt | |
# roda os comandos dentro da imagem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override IEnumerable<Player> GetAll() | |
{ | |
const string sql = "SELECT J.*, T.NM_TIME FROM TB_JOGADOR AS J INNER JOIN TB_TIME AS T ON J.ID_TIME = T.ID"; | |
using (var db = new SqlConnection(ConnectionString)) | |
{ | |
var result = db.Query(sql); | |
return result.Select(player => new Player | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override IEnumerable<Player> GetAll() | |
{ | |
using (var db = new SqlConnection(ConnectionString)) | |
{ | |
return db.GetAll<Player, Team, Player>((player, team) => | |
{ | |
player.Team = team; | |
return player; | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using Domain.Entities; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Repository; | |
using Repository.Repositories; | |
namespace Tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Dapper.FluentMap; | |
using Dapper.FluentMap.Dommel; | |
using Repository.Mappers; | |
namespace Repository | |
{ | |
public static class RegisterMappings | |
{ | |
public static void Register() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Dapper.FluentMap.Dommel.Mapping; | |
using Domain.Entities; | |
namespace Repository.Mappers | |
{ | |
public class TeamMap : DommelEntityMap<Team> | |
{ | |
public TeamMap() | |
{ | |
ToTable("TB_TIME"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Dapper.FluentMap.Dommel.Mapping; | |
using Domain.Entities; | |
namespace Repository.Mappers | |
{ | |
public class PlayerMap : DommelEntityMap<Player> | |
{ | |
public PlayerMap() | |
{ | |
ToTable("TB_JOGADOR"); |
NewerOlder