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
#!/usr/bin/env python3 | |
# /// script | |
# requires-python = ">=3.11" | |
# dependencies = [ | |
# "p-tqdm", | |
# ] | |
# /// | |
# | |
# Find the temporal offset between two videos. | |
# Do this by computing the PSNR of the first against the second video for all frames |
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
#!/usr/bin/env bash | |
# | |
# Update the ufw rules such that a Traefik container is reachable | |
set -e | |
for cmd in ufw-docker ufw docker; do | |
if ! command -v "$cmd" > /dev/null; then echo "Install $cmd first!"; exit 1; fi | |
done |
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
#!/usr/bin/env bash | |
# | |
# Start a reverse proxy for the Postgres DB, | |
# exposing port 5432 locally. | |
# | |
# To use this, on your local machine, run: | |
# | |
# ssh -t -L 5432:localhost:5432 username@hostname 'cd $HOME/path/to/folder/ && ./dbproxy.sh' | |
set -e |
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
#!/usr/bin/env bash | |
# | |
# A Docker entrypoint for starting Foreman with multiple Sidekiq processes | |
# | |
# Required in the Dockerfile: | |
# | |
# gem install foreman --no-document | |
echo_stderr() { |
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
#!/usr/bin/env bash | |
# | |
# Download latest chrome installer for Linux and rename | |
set -e | |
cd "$(dirname "$0")" || exit 1 | |
if ! command -v dpkg-deb &> /dev/null; then | |
echo "ERROR: dpkg-deb is not installed" |
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
#!/usr/bin/env python3 | |
import argparse | |
import json | |
def main(): | |
parser = argparse.ArgumentParser(description="Convert Trello JSON to Markdown") | |
parser.add_argument("file", type=str, help="Trello JSON file") | |
parser.add_argument("-l", "--list", help="Filter list name to convert") |
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
# syntax=docker/dockerfile:1 | |
FROM debian:bullseye | |
ENV DEBIAN_FRONTEND noninteractive | |
# ============================================================================== | |
# Main dependencies | |
RUN apt-get update -qq \ | |
&& apt-get install -y \ |
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
#!/usr/bin/env python3 | |
# | |
# Cleanup Docker tags from GitLab registry | |
# | |
# Requirements: | |
# | |
# - skopeo | |
# - Python 3.9 or higher | |
# - Pip packages: `pip3 install loguru joblib packaging` | |
# |
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
FROM alpine:latest | |
# install ffmpeg and xvfb, as well as mpv | |
RUN apk add --no-cache ffmpeg xvfb mpv bash \ | |
&& rm -rf /var/cache/apk/* | |
ENTRYPOINT ["/bin/bash"] |
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
# ============================================================================== | |
# Color snippets | |
# Bashly, https://github.com/DannyBen/bashly | |
# Licensed under the MIT License (MIT) | |
# | |
# Copyright (c) Danny Ben Shitrit | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |
NewerOlder