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
| 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. |
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
| # 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> |
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
| -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), |
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
| require 'matrix' | |
| class Matrix | |
| def []=(i, j, x) | |
| @rows[i][j] = x | |
| end | |
| end | |
| class GameOfLife | |
| def initialize(row, col) |
NewerOlder