Skip to content

Instantly share code, notes, and snippets.

View ddanielsantos's full-sized avatar
🥲

Daniel Santos ddanielsantos

🥲
  • Fadesp
  • Belém - PA - Brazil
  • 00:47 (UTC -03:00)
  • Bluesky @ddaniel.me
View GitHub Profile
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 8, 2025 08:28
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@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 / 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.

@sindresorhus
sindresorhus / esm-package.md
Last active May 8, 2025 09:12
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@sibelius
sibelius / asyncJoke.js
Created March 3, 2021 15:15
async joke
const asyncJoke = () => {
setTimeout(() => {
console.log('Knock nock');
}, 0);
console.log("Who's there?");
}
@sibelius
sibelius / LookingForTheFirstJob.md
Last active July 3, 2023 08:48
Looking for the First Job state

Looking for the First Job

Versão em Português

This is a very common state for people in college, people before/after a bootcamp, or people from another area.

The first job will be the hardest one to get, but it will get easier over time.

The interview will be harder than the job itself

@vit0rr
vit0rr / start.md
Last active April 22, 2025 14:27
Como iniciar no Rust?

A maneira mais comum para começar a estudar Rust é ler o livro oficial da linguagem. Irá ensinar sobre vários dos conceitos mais importantes sobre a linguagem.

A leitura pode ser acompanhada por:

@Grubba27
Grubba27 / fizzbuzz.ts
Created April 20, 2022 01:13
FizzBuzz made in typelevel
type Reverse<A> =
`${A}` extends `${infer AH}${infer AT}`
? `${Reverse<AT>}${AH}` : A
type Digs = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
type DigsNext<I = Digs, R = {}> =
I extends [infer Head, infer Next, ...infer Tail]
@huytd
huytd / money-parser.rs
Created May 8, 2022 08:57
A simple recursive descent parser in Rust
use std::fmt::Display;
/*
money = currency_symbol number ;
currency_symbol = '$' | '£' | '€' ;
number = INTEGER ;
*/
#[derive(Debug, PartialEq, Clone, Copy)]
enum TokenType {