Aggregate multiple Erlang cover reports in HTML format into one.
Input cover report file names are given as command line arguments. The result is written to stdout.
| # A bash function that can be put in the alias file or in .bashrc | |
| md () | |
| { | |
| ( printf "%s\n" "---" "title: $1" "section: 7" "header: $(ls $PWD/$1)" "date: $(stat --printf=%y $1 | cut -f1 -d' ')" "---"; | |
| cat "$1" ) | pandoc -s -f markdown -t man | man -l - | |
| } | 
| #!/usr/bin/env escript | |
| %% -*- erlang -*- | |
| %% ----------------------------------------------------------------------------- | |
| %% | |
| %% Generates a callgraph in graphviz format. | |
| %% | |
| %% Only calls within a single module are visualized. The exported | |
| %% functions are represented by a filled node. | |
| %% | 
| -module(erlang_util). | |
| -spec forall_but_last(fun ((A) -> any()), nonempty_list(A)) -> A. | |
| forall_but_last(_Fun, [Last]) -> Last; | |
| forall_but_last(Fun, [X|Xs]) -> Fun(X), forall_but_last(Xs). | |
| %% [Xs, Ys, ...] -> [[X, Y, ...] || X <- Xs, Y <- Ys, ...] | |
| -spec pick_from_each([[]]) -> [[]]. | |
| pick_from_each([]) -> [[]]; | |
| pick_from_each([Xs|Xss]) -> | 
| -module(take_n_bytes). | |
| -export([take_n_bytes/2]). | |
| %% @doc Take N bytes, avoiding copying. | |
| -spec take_n_bytes(integer(), iolist()) -> | |
| {Chunk :: iolist(), Rest :: iolist()}. | |
| take_n_bytes(0, Rest) -> | |
| {[], Rest}; | |
| take_n_bytes(N, Bin) when is_binary(Bin) -> | 
| #!/usr/bin/perl | |
| # This script shows bus and ferry departures from two hard-coded locations. | |
| use strict; | |
| use warnings; | |
| use Encode 'encode'; | |
| print_stop('Lindholmspiren (Göteborg)'); | |
| print "-" x 50, "\n"; | 
| #!/usr/bin/perl | |
| #------------------------------------------------------- | |
| # Add scrum tasks to a user story from the command line | |
| # Viktor Söderqvist, 2017-04-24 | |
| #------------------------------------------------------- | |
| use strict; | |
| use warnings; | 
| # Current git branch | |
| alias b='git branch | grep "^*" | sed "s/^\* *//"' |