Skip to content

Instantly share code, notes, and snippets.

View luigiMinardi's full-sized avatar
🎯
Focusing

Luigi Minardi luigiMinardi

🎯
Focusing
View GitHub Profile
@luigiMinardi
luigiMinardi / format_mac_book.md
Created March 12, 2022 22:41
How to format a mac book

How to Format your Mac Book

I have a 2012 Mac that time to time get stuck in the loading screen or get a infinite white screen.

Cuz of that i already formated it 3 times, so now I'll make a guide of how to format your Mac Book. For everyone that needs it and for me who everytime that need to format again need to re-search everything another time cuz already forgot how to do it.

Anyway, lets go to the how to do everything that Mac says for you to do, and some others.

To Apple, the circle with a line through it, the Mac starts up to an Apple logo progress bar, the blank screen and probably some others is solved by macOS Recovery (press power button for 10s until your mac turns off then turn on and hold cmd + R). Then you repair your disk with the Disk Utility, if it don't work reinstall the macOS.

@luigiMinardi
luigiMinardi / resumo_python_oo.md
Created March 12, 2022 22:36
Resumo python Orientação a Objeto

O que é OO?

Opa, tudo certo? Pense nesses nomes dificeis como convensões que foram dadas pra nomear certas coisas dentro do código, não se preocupe muito se você sabe exatamente o nome dessas coisas, foque em conseguir escrever o código em si e saiba que vai sempre ter gente pra te ajudar no que precisar.

A respeito dos nomes vou te explicar alguns aqui:

*vou colocar entre parênteses o nome em inglês pra você :)

modulo (module)

@luigiMinardi
luigiMinardi / docker_es.md
Last active April 6, 2022 11:36
Estudiando Docker

Introduccion al Docker

Docker es una herramienta muy importante para el dia a dia de trabajo de un desarollador, en ese gist voy a introducirlos al basico de dockers y mostrarlos algunos comandos utiles.

Leyenda

<any> = un parametro obligatorio

<?any> = un parametro opcional

Search

@luigiMinardi
luigiMinardi / alias_zsh.md
Created October 11, 2022 14:43
List of zsh git aliases [2022]
g=git
ga='git add'
gaa='git add --all'
gam='git am'
gama='git am --abort'
gamc='git am --continue'
gams='git am --skip'
gamscp='git am --show-current-patch'
gap='git apply'
@luigiMinardi
luigiMinardi / TypeScriptGenericsCheatSheet.md
Last active October 20, 2022 18:36
TypeScript Generics Cheat Sheet

P - Property
T - Type
K - Key
V - Value
E - Element
N – Number
S, U, etc. – 2nd, 3rd, 4th... types

Sources:

@luigiMinardi
luigiMinardi / howto_boot-arch.md
Created August 3, 2023 13:58
HOWTO - Booting arch

How to boot arch with btrfs and i3wm

ISO

First download arch iso and make sure to have a spare pendrive to format as a bootable one. If you like distro hopping a lot Ventoy may be a good option instead of using other ways to put just the arch iso in the pendrive. Even more if you have a larger pendrive than the at most 4gb needed for any linux distro.

After changing the boot order to the pendrive first and booting into it choose Arch Linux Install Medium to start.

Ping

Now check your internet with ping gnu.org. If you have wifi read the man.

Time

@luigiMinardi
luigiMinardi / howto_use-i3wm-on-arch.md
Created August 3, 2023 14:01
Minimal i3wm install from bare arch installation

Make sure to be logged in your user and not as root when running this commands to not cause any problem later on.

sudo pacman -Syu to make sure everything is up to date, than

Install xorg

sudo pacman -S xorg-server xorg-xinit

Install i3

@luigiMinardi
luigiMinardi / duplicate-files.md
Last active October 13, 2023 21:10
Bash adventures

Use jdupes to recursivelly search a directory for duplicates (symlinks also searched) then save results in a file.

jdupes -sr . > dups.txt

Go through the first group of duplicates (original and duplicate(s)) on the .txt and open it with the default option that you have (so that you can compare both and choose if you want to delete one of them or not).

cat dups.txt | while read line; do if [ -z "$line" ]; then break; else xdg-open $line; fi; done 
@luigiMinardi
luigiMinardi / AddYourCertificateToLinkedIn.js
Last active January 11, 2024 20:08
Add your Boot.dev certificate to LinkedIn
// ==UserScript==
// @name Button to add boot.dev certificate to linkedin
// @namespace https://github.com/luigiMinardi
// @match https://www.boot.dev/certificate/*
// @grant none
// @version 0.6.10
// @author luigiMinardi
// @license MIT
// @description Adds a button to add your boot.dev certificate to linkedin
// @homepageURL https://gist.github.com/luigiMinardi/62b0492d187e39e495272b10d40f6aee
@luigiMinardi
luigiMinardi / tutorial_django_rest_api_with_drf.md
Last active January 26, 2024 11:00
How to start a REST API with Django and DRF

How to start a REST API with Django and DRF

In this gist you will learn the basic to create a simple REST API with Django and Django REST Framework with a basic crud.

Create venv

python3 -m venv .venv

Activate venv

mac/linux