Skip to content

Instantly share code, notes, and snippets.

View enriquebeta6's full-sized avatar

Enrique Mora enriquebeta6

View GitHub Profile
@nepsilon
nepsilon / how-to-git-patch-diff.md
Last active July 4, 2024 13:39
How to generate and apply patches with git? — First published in fullweb.io issue #33

How to generate and apply patches with git?

It sometimes happen you need change code on a machine from which you cannot push to the repo. You’re ready to copy/paste what diff outputs to your local working copy.

You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:

1. Generate the patch:

git diff > some-changes.patch
@MicahZoltu
MicahZoltu / discord.js
Last active October 21, 2021 08:18
Reaction Hotkey for various chat clients.
window.addEventListener('keydown', event => {
if (!event.shiftKey || !event.ctrlKey || event.key != '|') return
const container = document.querySelector('main > div:first-of-type > div:first-of-type > div:first-of-type > ol > li:last-of-type > div')
container.dispatchEvent(new MouseEvent('mousemove', { bubbles: true }));
container.querySelector('div[aria-label="Add Reaction"]').click()
})
@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active March 27, 2024 06:09
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

@sibelius
sibelius / awsLamdbaExperience.md
Last active October 31, 2023 00:09
AWS Lamdba Learning Path - What do you need to learn about aws lambdas?
  • learn how to bundle backend using webpack in a single bundle (check this https://gist.github.com/jgcmarins/2860f547f5d785dce24ca0eadbe3abdd)
  • learn how to automate lamdba deploys using serveless or aws cdk (github actions)
  • learn how to configure and automate api gateway
  • learn how to automate tests lambdas using jest
  • learn how to configure, automate and use RDS Proxy to fast database workflow in lamdbas (also cache database connections)
  • how the performance gain using RDS Proxy over normal database usage
  • learn about cold start and lambda statefull (https://www.swyx.io/stateful-serverless/)
  • expose a CRUD api in lamdba
  • put everything on open source (github)
  • write a blog post about each of the topics above
@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
@sibelius
sibelius / backendLearningPath.md
Created January 15, 2021 14:59
Backend Learning Path - Basics that you should learn
  • learn about basic database modelling, use excalidraw
  • learn how to connect to a database and performe queries
  • learn how to expose a CRUD API REST and/or GraphQL
  • learn how to document the API using Swagger, swagger-jsdoc is the best for it
  • learn how to test your API using Postman, and also automated using jest and supertest
  • learn how to consume other APIs using fetch

Also check Docker Learning Path and Lambda Learning Path

@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

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