activate conda in shell with this command
eval "$(/home/localstack/anaconda3/bin/conda shell.bash hook)"configure bioconda
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge| """ | |
| Quick and dirty script to compare the sitemap of an old nikola page with its hugo successor | |
| """ | |
| from lxml import etree | |
| import requests | |
| def get_urls(filename: str) -> set[str]: | |
| tree_sitemap = etree.parse(filename) | |
| ns = {"sitemap": "http://www.sitemaps.org/schemas/sitemap/0.9"} |
| #!/bin/bash | |
| set -euo pipefail | |
| # Prerequisites: | |
| # - await.sh: https://gist.github.com/alexrashed/9dc04e78cff737b7cbb42861b6555221#file-await-sh | |
| # - ntfy: https://github.com/binwiederhier/ntfy | |
| # - Github CLI: https://cli.github.com/ | |
| if [[ $# -eq 0 ]]; then | |
| echo "No URL given, trying to get URL for PR in current branch..." |
| # syntax=docker/dockerfile:1.3 | |
| FROM busybox | |
| RUN --mount=type=secret,id=GITHUB_TOKEN echo "This is the token: $(cat /run/secrets/GITHUB_TOKEN)" |
activate conda in shell with this command
eval "$(/home/localstack/anaconda3/bin/conda shell.bash hook)"configure bioconda
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge| #!/bin/bash | |
| # Simple bash script to wait for a worfklwo to finish (f.e. to trigger a notification) | |
| # Based on https://github.com/rockymadden/circleci-cli | |
| token=$CIRCLECI_TOKEN | |
| resolution=15 | |
| workflow=$1 | |
| function await() { | |
| function go() { |
| from collections import defaultdict | |
| from typing import List | |
| import logging | |
| from botocore.model import OperationModel | |
| from localstack.aws.spec import list_services | |
| def resolvable(operation_models: List[OperationModel]): |
| from typing import cast, Callable | |
| from botocore.model import StructureShape, ListShape, Shape, MapShape, ServiceModel | |
| from localstack.aws.spec import list_services | |
| def traverse_members(service: ServiceModel, shape: Shape, fun: Callable, traversed_shapes=None, hierarchy=0): | |
| if traversed_shapes is None: | |
| traversed_shapes = [] |
| # Alpine | |
| apk add coreutils | |
| apk info | xargs -n1 -I{} apk info -s {} | xargs -n4 | awk '{print $4,$1}' | numfmt --field=1 --to=iec-i --suffix=B | sort -rh | head -n20 | |
| # Debian | |
| dpkg-query -Wf '${Installed-Size}\t${Package}\n' | awk '{print $1,$2}' | numfmt --field=1 --from-unit=1024 --to=iec-i --suffix=B | sort -rh | head -n20 |
| #!/bin/bash | |
| # This is just a writeup to build an ext4 FS on top of ZFS to overcome issues with the Docker ZFS storage driver. | |
| # DO NOT EXECUTE THIS SCRIPT IF YOU DO NOT KNOW WHAT YOU'RE DOING! | |
| sudo zfs create -V 100G rpool/docker-overlay | |
| sudo mkfs.ext4 /dev/zvol/rpool/docker-overlay | |
| sudo mount /dev/zvol/rpool/docker-overlay /var/lib/docker-overlay | |
| docker system prune -af | |
| sudo su | |
| cat > /etc/docker/daemon.json << EOF | |
| { |