pacman -S arch-install-scriptsCreate base rootfs with pacstrap utility (this will also install systemd and linux, which can be removed later)
pacstrap -i -c -d ~/containers/arch base base-devel| require 'matrix' | |
| class Matrix | |
| def []=(i, j, x) | |
| @rows[i][j] = x | |
| end | |
| end | |
| class GameOfLife | |
| def initialize(row, col) |
| -module(p26). | |
| -export([combinations/2]). | |
| % Generates all combinations of List by length Of | |
| % Antilex order | |
| combinations(List, Of) when List == []; Of == 0 -> | |
| []; | |
| combinations(List, Of) -> | |
| Mask = vallist(length(List), 0), |
| # Fortunately GIT has a very easy solution for this, just run the following command on the file or path you want to ignore the changes of: | |
| $ git update-index --assume-unchanged <file> | |
| # If you wanna start tracking changes again run the following command: | |
| $ git update-index --no-assume-unchanged <file> |
| Add following lines in section [alias] your git config file (~/.gitconfig). | |
| lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative | |
| lg2 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit | |
| lg = !"git lg1" | |
| Now you can use $ git lg $ git lg1 or $ git lg2 to get really fancy git logs. |
| """ | |
| Simple engine for maching regular languages. | |
| Proof of concept that regexps can be built on top of Python generators. | |
| """ | |
| def literal(c): # regexp 'a' | |
| assert len(c) < 2 | |
| def matcher(input): | |
| if input.startswith(c): | |
| yield input[len(c):] |
| import piggyphoto | |
| import pygame | |
| def quit_pressed(): | |
| for event in pygame.event.get(): | |
| if event.type == pygame.QUIT: | |
| return True | |
| return False | |
| def show(file): |
| module StackMachine where | |
| type Value = Double | |
| data Instruction = IPush Value | IAdd | ISubtract | IMultiply | IDivide | |
| deriving (Show) | |
| data Expr = Lit Value | |
| | Add Expr Expr | |
| | Subtract Expr Expr |