This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print('___________________') | |
print('| C A R D Á P I O |') | |
print('¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯') | |
print('| 1. Cubo \n| 2. Paralelepípedo \n| 3. Prisma \n| 4. Pirâmide \n| 5. Cilindro \n| 6. Esfera \n') | |
q1 = input('Qual é o de hoje? ') | |
if q1 == '1': | |
cubo = input('Tamanho da aresta? ') | |
medida = input('MM - CM - M : ') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print('______________') | |
print('| H E L L O |') | |
print('¯¯¯¯¯¯¯¯¯¯¯¯¯¯') | |
from datetime import date | |
d2 = date.today() | |
(d2.day) | |
(d2.month) | |
(d2.year) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default | |
xkb_symbols "abnt2" { | |
// Based on a very simple Brazilian ABNT2 keyboard, | |
// by Ricardo Y. Igarashi (iga@that.com.br). | |
// With added support for dead keys in I18N applications, | |
// by Conectiva (http://www.conectiva.com.br). | |
include "latin" | |
name[Group1]="Portuguese (Brazil)"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isValidCreditCard = (cardNumber: string): boolean => { | |
// Based on https://en.wikipedia.org/wiki/Luhn_algorithm | |
const checkDigit = Number(cardNumber.substr(-1)); | |
const sum = cardNumber.split('').reduceRight((acc, curr, index) => { | |
let result: number = acc; | |
const currNumb = Number(curr); | |
// Last digit is the ckeck digit | |
if (index + 1 === cardNumber.length) result = acc; | |
else if (Math.abs(index + 1 - cardNumber.length) % 2) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ret_status="%(?:%{$fg_bold[cyan]%}⎛ :%{$fg_bold[red]%}⎛ )" | |
PROMPT='${ret_status}%{$fg[cyan]%}%~%{$reset_color%} $(git_prompt_info)%{$reset_color%} | |
%(?:%{$fg_bold[cyan]%}⎝ $:%{$fg_bold[red]%}⎝ $)%{$reset_color%} ' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My aliases | |
# -- General -- | |
alias pls="sudo" | |
alias sugo="sudo" | |
alias grep="grep --color" | |
alias stts="systemctl status" | |
alias cl="clear" | |
# -- npm |