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
| #!/bin/bash | |
| # Para primeira rodada de script | |
| sudo apt update | |
| # Programas essenciais | |
| sudo apt install zsh curl git fonts-powerline -y | |
| # Oh My Zsh | |
| if [ -d "/home/$USER/.oh-my-zsh" ] |
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
| xxd -b arquivo.comp | cut -d: -f 2 | sed 's/ .*//; s/ //g' |
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
| #!/bin/bash | |
| git config --global user.name "" | |
| git config --global user.email "" | |
| echo "Configurações limpas" |
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
| -- Monads https://medium.com/@julianoalves/functors-applicatives-e-monads-explicados-com-desenhos-2c45d5db7d25 | |
| data Arv a = Vazia | Node a (Arv a) (Arv a) deriving (Eq, Show, Read) | |
| instance Functor Arv where | |
| fmap f Vazia = Vazia | |
| fmap f (Node a l r) = Node (f a) (fmap f l) (fmap f r) | |
| singleton :: a -> Arv a | |
| singleton a = Node a Vazia Vazia |
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
| quickSort :: (Ord a) => [a] -> [a] | |
| quickSort [] = [] | |
| quickSort (x:xs) = | |
| fSorted ++ [x] ++ eSorted | |
| where | |
| fSorted = quickSort [a | a <- xs, a <= x] | |
| eSorted = quickSort [a | a <- xs, a > x] | |
| -- 1 | |
| mmc :: Int -> Int -> Int |