Skip to content

Instantly share code, notes, and snippets.

View igorvieira's full-sized avatar
🏠
Working from home

Igor Vieira igorvieira

🏠
Working from home
View GitHub Profile
# Repository or organization name
> Description
## Build Setup
``` bash
# install dependencies
npm install or yarn
@igorvieira
igorvieira / Coffee.js
Created March 10, 2021 14:05 — forked from agneym/Coffee.js
Buy me a Coffee with React and Styled Components
import React from 'react';
import styled from 'styled-components';
const Button = styled.a`
line-height: 2;
height: 5rem;
text-decoration: none;
display:inline-flex;
color: #FFFFFF;
background-color: #FF813F;
@igorvieira
igorvieira / README.md
Created January 14, 2021 17:43 — forked from mayank23/README.md
Jest Mock Any Property on Window Utility - with automatic cleanup

Jest Mock Any Property on Window Utility - with automatic cleanup.

@igorvieira
igorvieira / test-devborne.md
Last active August 26, 2020 22:21
Test front-end Devborne

Teste front-end

Nesse teste, nós queremos que seja feita uma lista dos repositórios com stars do Github onde para cada repositório selecionado seja possível adicionar um comentário ao mesmo por usuário, isso utilizando react, com uma api em rest ou graphql, o que é esperado desse teste:

Obrigatórios:

  • Testes unitários.
  • Uso de Create React App.
  • Que tenha autenticação para o acesso a aplicação e listagem do mesmo.
  • Seja possível ver uma lista de repositórios.
/* This is intentionally blank just and exists to secure a decent gist name */

Backend Coding Challenge

Design an API that save game speedruns and serves a leaderboard.

Background

In several games, finishing the game is deemed just too easy for some gamers, so they decide to see how fast they can finish the entire game. In fact, speedruns became so popular that many players compete with other players to see if they can break each other records, even if that means beating the time by just a couple of seconds. We want to create an API that can registers those records and also serve a leaderboard.

Requirements

postgres:
image: postgres:14.6-alpine
ports:
- '5432:5432'
environment:
POSTGRES_USER: 'user'
POSTGRES_PASSWORD: 'password'
POSTGRES_DB: 'database'
volumes:
- ./init:/docker-entrypoint-initdb.d/
@igorvieira
igorvieira / gist:5c1041fcff865dd54f48ab9924644596
Created June 7, 2018 20:36 — forked from bergus/gist:1387854
Correct easiest way to find duplicate values in a JavaScript array - Native unique function implementation
/*
* I saw this thread: http://stackoverflow.com/questions/840781/easiest-way-to-find-duplicate-values-in-a-javascript-array
* The solutions from gist:1305056 were elegant, but wrong. So here's mine:
*/
Array.prototype.unique = function(test) {
/* returns a new, sorted Array without duplicates */
if (!Array.isArray(this))
throw new TypeError("Array.prototype.unique must be called on an Array");
return this.slice(0).sort().filter( typeof test == "function"
? function(v, i, a) { return !i || !test(v, a[i-1]); }
@igorvieira
igorvieira / settings.json
Last active March 25, 2024 02:46
Vscode settings
{
"[astro]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[dockercompose]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
@igorvieira
igorvieira / README.md
Last active September 27, 2022 15:18
Set path for rbenv in your zsh on Ubuntu

zsh + Ruby(rbenv) on Ubuntu

If yout have problems for check ruby versions on your ubuntu + zsh, just put this in your terminal and set path for your rbenv

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshenv
$ echo 'eval "$(rbenv init -)"' >> ~/.zshenv