Skip to content

Instantly share code, notes, and snippets.

View gufranco's full-sized avatar

Gustavo Franco gufranco

View GitHub Profile
@gufranco
gufranco / README-Template.md
Created July 2, 2018 01:18 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

USE AT YOUR OWN RISK!!
How do I determine the current MHz?
Run this in a terminal:
sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
It will display the maximum CPU frequence
How can stress test or benchmark?
/**
* Retries the given function until it succeeds given a number of retries and an interval between them. They are set
* by default to retry 5 times with 1sec in between. There's also a flag to make the cooldown time exponential
* @author Daniel Iñigo <danielinigobanos@gmail.com>
* @param {Function} fn - Returns a promise
* @param {Number} retriesLeft - Number of retries. If -1 will keep retrying
* @param {Number} interval - Millis between retries. If exponential set to true will be doubled each retry
* @param {Boolean} exponential - Flag for exponential back-off mode
* @return {Promise<*>}
*/

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',
@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;
@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 / 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:

{
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": true,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"quoteProps": "as-needed"
import { Service, Inject } from 'typedi';
import {
JsonController,
Post,
Body,
UnauthorizedError,
BadRequestError,
Get,
Param,
OnUndefined,
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,
) {