This file contains 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
#!/usr/bin/env bash | |
function error() { | |
# $1 err code | |
# $2 err msg | |
echo -e "error: $1: $2" | |
} | |
function tgz() { | |
local longopts="help,output:,force" |
This file contains 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
using System; | |
// makes sure that all references passed to this api are valid | |
// imho calls yielding nulls should actually yield err/exception if using this interface | |
#nullable enable | |
namespace Result; | |
/// <summary> | |
/// Covariant interface for <see cref="Result{TOk, TErr}"/> that assists in consumer variable binding. |
This file contains 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
GREEN="" | |
RED="" | |
NO_COLOR="" | |
BLUE="" | |
if [ "$color_prompt" = yes ]; then | |
GREEN='\033[01;32m' | |
RED='\033[01;31m' | |
NO_COLOR='\033[00m' | |
BLUE='\033[34m' |
This file contains 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
from typing import ( | |
Sequence, | |
Iterable, | |
Callable | |
) | |
type Predicate[ T ] = Callable[ [ T ] , bool ] | |
type Converter[ TIn , TOut ] = Callable[ [ TIn ] , TOut ] | |
class QueryException( Exception ): |