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 / 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

@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 / 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 / .zshrc
Last active April 8, 2024 20:41
My .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@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 / tex-colors.md
Last active April 19, 2024 19:20
Github markdown colors (Using Tex and the github MathJax support)

Small warning for everyone that are thinking if using Tex colors is a good idea or not

  • 2023-05-02 - Since a few days ago \colorbox and \fcolorbox are broken and Github did't talk about if it's a temporary thing or if it will not be added back.
    • 2024-01-04 - Since it has not being added back I deduce that it will never be so I removed all mentions to it on the rest of the gist.
  • 2023-09-29 - Tex seems to not work on h1 to h6 anymore (markdown #'s)
    • 2024-01-04 - Now it works again, I'll keep the message for a while to remember that it may change again in the future

As you can se with the above message(s) Tex may not be very stable and may not be an option to you as of the dates expressed above. You can also check other tex problems here.

Github released Tex support and colors* to the markdown and you din't realized

@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