-
Falhas de processo, inexperiencia, cases de dificuldade
- Experiencias sobre tentar implementar a filosofia de microservicos (componentes) de forma arcaica com API's end-to-end com uma comunicação feita por um cliente HTTP
- Dificuldade de estruturar a arquitetura
- Dificuldade de manter o codigo e integrações
-
Historia e filosofia
- Era dos Componentes
- Filosofia de microserviço
- Responsabilidade unica
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 structlog | |
structlog.configure( | |
processors=[ | |
structlog.processors.TimeStamper(fmt="iso"), | |
structlog.processors.add_log_level, | |
structlog.processors.EventRenamer("msg"), | |
structlog.processors.JSONRenderer(), | |
] | |
) |
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
swagger: "2.0" | |
info: | |
description: "StoneLog Reverse API to connect with logistic services" | |
version: "1.0.0" | |
title: "StoneLog Reverse API" | |
contact: | |
email: "[email protected]" | |
license: | |
name: "Apache 2.0" | |
url: "http://www.apache.org/licenses/LICENSE-2.0.html" |
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
const nameKey = 'numero' | |
const quantityKey = 'qtd' | |
const product = [1, 1, 2, 2, 2, 3, 4, 5, 5] | |
const reduced = product.reduce((acc, num) => ({ | |
...acc, | |
[num.toString()]: ((acc && acc[num] || 0) + 1) | |
}), {}) | |
const formated = Object.keys(reduced).map((num) => ({ |
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
const NEW_VALUE = 1 | |
const forms = document.querySelectorAll('form') | |
const save = ({ input, submit }) => new Promise(async(resolve, reject) => { | |
try { | |
input.value = NEW_VALUE | |
await submit.click() | |
resolve() | |
} catch (err) { | |
reject(err) |
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 { PipeTransform, Pipe } from '@angular/core'; | |
improt { isPlainObject } from 'lodash'; | |
@Pipe({ name: 'keys' }) | |
export class KeysPipe implements PipeTransform { | |
transform(value, args: string[]): Array<String> | null { | |
if (!isPlainObject(value)) { | |
return null; | |
} | |
return Object.keys(value); |
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
function Plugin () { | |
const seneca = this | |
const MergeValidate = require('btime-merge-validate-package') | |
const mergeValidate = MergeValidate(seneca) | |
const PICK_FIELDS = [ | |
'field' | |
] | |
seneca.add({ role: 'plugin', cmd: 'create' }, cmd_create) |
curl -L http://goo.gl/Zu98AA
<html>
<head>
<title>
CTF Nível básico
</title>
<meta charset="utf-8">
</head>
<body>
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
<?php | |
return [ | |
"database" => [ | |
"host" => "localhost" | |
] | |
]; |
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 { first, find } from 'lodash' | |
export interface IGeoLocationModel { | |
lat: string | |
lng: string | |
country: string | |
parseGoogleMapResponse(result: object): void | |
} | |
export class GeoLocationModel implements IGeoLocationModel { |
NewerOlder