This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.
- Haskell is a functional programming language.
| -- define data type | |
| data Tree a = EmptyTree | Node a (Tree a, Tree a) deriving (Show, Read, Eq) | |
| -- create single node | |
| treeNode :: a -> Tree a | |
| treeNode item = Node item (EmptyTree, EmptyTree) | |
| -- covert from/to list | |
| treeFromList :: (Ord a) => [a] -> Tree a | |
| treeFromList items = foldr treeInsert EmptyTree $ reverse items |
This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.
| # Install ARCH Linux with encrypted file-system and UEFI | |
| # The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
| # Download the archiso image from https://www.archlinux.org/ | |
| # Copy to a usb-drive | |
| dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
| # Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
| # Set swedish keymap |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
Free O'Reilly books and convenient script to just download them.
Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post
How to use:
download.sh file and put it into a directory where you want the files to be saved.cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.| Out of the night that covers me, | |
| Black as the pit from pole to pole, | |
| I thank whatever gods may be | |
| For my unconquerable soul. | |
| In the fell clutch of circumstance | |
| I have not winced nor cried aloud. | |
| Under the bludgeonings of chance | |
| My head is bloody, but unbowed. |
| # Install ARCH Linux with encrypted file-system and UEFI | |
| # The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
| # Download the archiso image from https://www.archlinux.org/ | |
| # Copy to a usb-drive | |
| dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
| # Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
| # Set swiss-french keymap |
| git config --global url."git@github.com:".insteadOf "https://github.com/" |