Skip to content

Instantly share code, notes, and snippets.

View cristian-aldea's full-sized avatar
🎁
Today is a gift, that is why we call it the Present.

Cristian Aldea cristian-aldea

🎁
Today is a gift, that is why we call it the Present.
View GitHub Profile
@cristian-aldea
cristian-aldea / confirm.py
Created September 27, 2021 03:14
Python: Confirmation function
def confirm() -> bool:
"""
Ask user to enter Y or N (case-insensitive).
:return: True if the answer is Y.
:rtype: bool
"""
answer = ""
while answer not in ["y", "n"]:
answer = input("Continue? [y/n]? ").lower()
return answer == "y"
@cristian-aldea
cristian-aldea / slick-terminal.md
Last active May 19, 2024 19:27
Ubuntu + Zsh + Oh My Zsh + Powerlevel10k = Sliiiiiiiiiiiiick

Based on: https://gist.github.com/kevin-smets/8568070

This gist outlines the steps needed to setup zsh, ohmyzsh and the powerlevel10k theme, available for anyone to follow.

  1. Setup required dependencies

    # update packages
    sudo apt update