Skip to content

Instantly share code, notes, and snippets.

View gufranco's full-sized avatar

Gustavo Franco gufranco

View GitHub Profile
import express, { Express, Request, Response } from 'express'
import bodyParser from 'body-parser'
import dotenv from 'dotenv-safe'
import prettyError from 'pretty-error'
import { handler } from './src/app'
import { SQSPayloadInterface } from './src/interfaces/PayloadInterface'
prettyError.start()
dotenv.config()
import HttpService from './HttpService';
export default class WitService {
constructor(private readonly httpService: HttpService) {
['WIT_API_URL', 'WIP_API_TOKEN'].forEach((environmentVar) => {
if (!process.env[environmentVar]) {
throw new Error(`Missing ${environmentVar} environment var`);
}
});
}

scrum

Columns

  1. To do
  2. Blocked
  3. In progress
  4. To deploy
  5. Ready to test
  6. QA validating
import HttpService from '../services/HttpService'
import { AxiosResponse } from 'axios'
import OrderInterface from '../interfaces/OrderInterface'
import * as AWS from 'aws-sdk'
export default class OrderRepository {
constructor(
private readonly httpService: HttpService,
private readonly sns: AWS.SNS,
) {
import { Service, Inject } from 'typedi';
import {
JsonController,
Post,
Body,
UnauthorizedError,
BadRequestError,
Get,
Param,
OnUndefined,
{
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": true,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"quoteProps": "as-needed"
@gufranco
gufranco / Keybase.md
Last active September 28, 2019 13:27
Keybase

Keybase proof

I hereby claim:

  • I am gufranco on github.
  • I am gufranco (https://keybase.io/gufranco) on keybase.
  • I have a public key ASADXEi_OPbd2J6da5oELYgSuMmMtYR_GtVFQ7cACkeHJAo

To claim this, I am signing this object:

@gufranco
gufranco / questions.txt
Created July 22, 2019 14:55
Questions for interview
1- Quais tecnologias você já usou em projetos que foram para produção? Quais foram os desafios encontrados?
2- Se pudesse voltar no tempo, o que você faria diferente atualmente? Por qual motivo?
3- Você já configurou algum servidor Linux? Se sim, explique qual tipo de servidor, o que usou e o motivo de cada escolha.
4- Com quais bancos de dados relacionais você já trabalhou? Qual você prefere e por qual motivo?
5- Já trabalhou com alguma base de dados NoSQL? Quais? Explique o motivo da escolha de um banco NoSQL no projeto.
@gufranco
gufranco / Question 1.js
Last active June 29, 2023 15:46
Interview
/*
* Implement function verify(text) which verifies whether parentheses within text are
* correctly nested. You need to consider three kinds: (), [], <> and only these kinds.
*/
function verify(string) {
string = string.replace(/[^\(\)\[\]\{\}\<\>]/g, '');
let previousString = '';
while (string.length !== previousString.length) {
previousString = string;

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',