Skip to content

Instantly share code, notes, and snippets.

View IsTheJack's full-sized avatar
🇮🇪
Dublin

Roberto Oliveira IsTheJack

🇮🇪
Dublin
View GitHub Profile
@IsTheJack
IsTheJack / AboutOurCSSPattern.md
Created February 6, 2020 17:16
How to protect the CSS scope properly using SASS and BEM

How to protect the CSS scope properly using SASS and BEM

Some truths about css:

  • CSS works in cascade
  • CSS works globally

Some Problems with Cascade

  • You could have problems with specificities
[
"Ache For",
"Act Out",
"Add On",
"Add Up",
"Agree With",
"Aim At",
"Answer Back",
"Apply For/To",
"Ask Around",
[
"a",
"abandon",
"ability",
"able",
"abortion",
"about",
"above",
"abroad",
"absence",
@IsTheJack
IsTheJack / Task.md
Last active December 20, 2019 13:32

Criar Lista de Produtos

Olá! Precisamos criar uma tela de inventário de produtos, mas antes vamos criar um componente de lista. Esse componente tem algumas características.

  • Exibe a foto de um produto
    • A foto pode não existir
  • Divide em meses baseando-se na data de criação de um produto

Imagem do component

@IsTheJack
IsTheJack / kb_black_friday_dump.json
Created November 30, 2019 02:52
Real life dump from a huge tech Brazilian E-commerce
This file has been truncated, but you can view the full file.
{
"quant_ofertas": 1086,
"categorias": [
{
"nome": "Hardware",
"amigavel": "hardware",
"codigo": 1,
"secs": [
{
"nome": "Coolers",
Index Year Age Name Movie
1 1928 22 Janet Gaynor Seventh Heaven, Street Angel and Sunrise: A Song of Two Humans
2 1929 37 Mary Pickford Coquette
3 1930 28 Norma Shearer The Divorcee
4 1931 63 Marie Dressler Min and Bill
5 1932 32 Helen Hayes The Sin of Madelon Claudet
6 1933 26 Katharine Hepburn Morning Glory
7 1934 31 Claudette Colbert It Happened One Night
8 1935 27 Bette Davis Dangerous
9 1936 27 Luise Rainer The Great Ziegfeld
{
"categoriesSelection":[
{
"category":{
"id":"3a3430aa-deae-4df9-94e0-58eec5f0b57b",
"name":"Eat In",
"products_total":79,
"description":"Est alias quam voluptatem illum repellendus id eligendi."
},
"productsExclusionList":[
@IsTheJack
IsTheJack / storybook-example.jsx
Created April 18, 2019 22:16
Just a simple use of the Storybook
import * as React from 'react'
// tslint:disable-next-line: no-implicit-dependencies
import { storiesOf } from '@storybook/react'
import ComponentName from './ComponentName'
storiesOf('ComponentName', module)
.add('some case of use', () => (
<ComponentName>Hello Button!!!</ComponentName>
))
@IsTheJack
IsTheJack / simple-test.js
Created April 18, 2019 16:55
Simple component test using Jest, React DOM and React
// This file should be named as Button.spec.tsx
import * as React from 'react'
import * as ReactDOM from 'react-dom'
import Button from './'
describe('component Button', () => {
it('renders without crashing', () => {
const div = document.createElement('div')
ReactDOM.render(<Button />, div)
@IsTheJack
IsTheJack / Dockerfile
Created January 24, 2019 00:35
DUVA docker
# This Dockerfile is for the development environment
FROM node:latest
# Some dependencies for Cypress
RUN apt-get update
RUN apt-get install xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 -y
# Define folder in container
RUN mkdir -p /app