Skip to content

Instantly share code, notes, and snippets.

View Tsugami's full-sized avatar

Yslan Ramos Tsugami

View GitHub Profile

Como Pensar

Ler e entender um pouco desse artigo. https://wiki.c2.com/?FeynmanAlgorithm

  • Reconhecer como você pensa
  • Descrever métodos que você usa para pensar
  • Entender métodos diferentes de pensar
  • Fazer perguntas sobre tudo(incluindo sobre perguntas)

Perguntas

@matheusoliveira
matheusoliveira / history.sql
Last active April 26, 2023 14:48
PGConf.Brasil 2022 - JSON on PostgreSQL, from zero to hero
/**
* Este arquivo contém o histórico de TODOS comandos que executei durante o treinamento.
* Pode conter alguns erros e falhas, mas fica aqui caso eu tenha esquecido de deixar algum exemplo
* mais claro nos demais arquivos.
*/
select '{"a":1, "b":2}'::jsonb @> '{"b":2}'::jsonb;
\e
select '{"a":1, "b":2}'::jsonb;
select '{"a":1, "b":2, "b": 3}'::json;
select '{"a":1, "b":2, "b": 3}'::json -> 'b';

Roadmap de estudos de SQL

Aviso: Muitas vezes detalhes de várias operações podem variar de banco para banco. Em questões onde fiquei em dúvida, este documento segue o funcionamento do PostgreSQL, pois é o banco que conheço melhor.

Pré-requisito: Álgebra Relacional básica

Antes de começar a escrever SQL, você precisa entender o modelo de como um banco de dados relacional funciona. Não precisa se aprofundar muito, mas você precisa entender como que dados e relacionamentos entre eles são representados. (Nota importante: Relacionamento e relação não são a

@fersilva16
fersilva16 / input.ts
Last active December 30, 2021 01:48
Transform imports to namespace import
import { load } from '@workspace/shared';
import Foo from '@workspace/shared';
import * as Bar from '@workspace/shared';
load();
Foo.doSomething();
Bar.default.doSomething();
function test() {
const load = {};
@ySnoopyDogy
ySnoopyDogy / RandomFromProbability.ts
Last active October 28, 2021 00:52
A function that return an element among other elements based on a set probability for each one
interface ProbabilityProps<T> {
probability: number;
value: T;
}
// Input Example:
/* calculateProbability([
{value: 'Cat', probability: 29},
@the-sofi-uwu
the-sofi-uwu / diversao.md
Last active October 14, 2021 18:22
Coisas divertidas da programação

Coisas que eu recomendo vcs usarem algum dia pq é divertido

DHALL - Linguagem de configuração incrivel

https://dhall-lang.org/

NIX - Package manager com gerações e que é reversivel e OS baseado nisso

https://nixos.org/

Unison - Language for distributed systems:

@sibelius
sibelius / learning-path-web3.md
Last active June 18, 2024 17:52
Learning Path Web3
  • learn blockchain concepts
  • learn ethereum
  • learn how to use metamask
  • learn how to use hardhat (https://hardhat.org/)
  • learn how to deploy and interact with a smart contract
  • learn common smart contract standards like ERC20 (token), ERC721 (nft), ERC1155 (opensea)
  • learn ipfs
  • learn how to read blockchain explorers like https://etherscan.io/
  • learn how to use web3 and etherjs
  • learn solidity
@pjchender
pjchender / Form.tsx
Created June 28, 2021 05:21
Nested Object Fields in React Hook Form
import { DevTool } from '@hookform/devtools';
import { yupResolver } from '@hookform/resolvers/yup';
import { Button, makeStyles, TextField } from '@material-ui/core';
import { Controller, SubmitHandler, useForm } from 'react-hook-form';
import * as yup from 'yup';
const useStyles = makeStyles(theme => ({
root: {
display: 'flex',
flexDirection: 'column',
@sibelius
sibelius / testingConcept.md
Last active February 1, 2024 17:36
testing library concept and basic test

You first need to undestand the concept of frontend tests.

You should not test the implementation but the behavior

You test like the end user

For instance, imagine a login screen with email and password inputs and a submit button

The test should input the email and the password, then click in the submit button.

@sibelius
sibelius / dockerLearnPath.md
Last active October 31, 2023 00:09
Docker Learn Path - What do you need to know about Docker
  • learn why we need docker
  • learn how to define a Dockerfile
  • learn how to build a docker
  • learn how to list images
  • learn how to run docker with port forward
  • learn how to go inside docker to debug, running /bin/bash
  • learn docker compose
  • learn how to send a docker image to a reqistry (dockerhub or aws ecr)
  • learn how to deploy a docker to kubernetes, aws ecs or another platform
  • learn how to use docker volumes