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
#!/bin/sh | |
# GPL-3.0-or-later | |
# | |
# Usage: semver-to-docker-labels.sh SEMANTIC_VERSION_STRING | |
# | |
# Print possible docker labels for a semantic version string. | |
# For semantic version with no pre-release or build number. It will output: | |
# |
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 | |
GNUPGHOME="$HOME/.gnupg" | |
PIDFILE="$GNUPGHOME/win-gpg-agent-relay.pid" | |
LOGFILE="$GNUPGHOME/win-gpg-agent-relay.log" | |
is_pid_running() { | |
if [[ -z "$1" ]]; then | |
return 1 | |
fi |
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 Iterable, Iterator, Sequence | |
def range_gen(n=10): | |
"""Range implemented as generator""" | |
# It is used like an iterator, | |
# each time next() is called on this generator, | |
# code is resumed from yield clause. | |
# This allows for lazy computed iterators. | |
i = 0 |
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
# This launches fish if parent process is not fish. Not used anymore | |
if [[ $(ps --no-header --pid=$PPID --format=cmd) != "fish" ]]; then | |
exec fish | |
fi |