# install at https://multipass.run/
multipass launch --name microk8s-flux --mem 2G
multipass shell microk8s-flux
# assume ubuntu with snap installed, if not install it via
apt install snapd
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
| #!/bin/bash | |
| # Adapted from https://stackoverflow.com/a/47436840 | |
| function lib_installed() { /sbin/ldconfig -N -v $(sed 's/:/ /' <<< $LD_LIBRARY_PATH) 2>/dev/null | grep $1; } | |
| function check() { lib_installed $1 && echo "$1 is installed" || echo -e "\nERROR: $1 is NOT installed\n"; } | |
| check libcuda.so | |
| check libcudart | |
| check libcudnn |
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
| repos.txt |
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
| KAMAL_REGISTRY_PASSWORD=dckr_pat_xXXxx_x0xXxXx-xX-XXX0xX0x-x | |
| RAILS_MASTER_KEY=00x00xxx000xxx000000xx0x000x0x00 | |
| POSTGRES_PASSWORD=xXxxx0xXXx0 | |
| MEILI_MASTER_KEY=xXxxx0xXXx0 | |
| BLAZER_DATABASE_URL=postgres://service:{POSTGRES_PASSWORD}@service-name-postgres:5432/service_production |
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 | |
| # shellcheck disable=SC2207 | |
| base_url="https://github.com/$user_name/$repo_name/releases" | |
| pkg_path=$(pwd) | |
| distro=$(uname) # Linux / Darwin | |
| arch=$(uname -m) # x86_64 / aarch64 / arm64 | |
| help() { |
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 bfg bin from https://rtyley.github.io/bfg-repo-cleaner/ | |
| # * Copy somewhere in path (e.g., ~/.local/bin) | |
| SCRIPT_DIR=$(dirname "$(readlink -f "$0")") | |
| java -jar "${SCRIPT_DIR}/bfg-1.14.0.jar" "$@" |
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 json | |
| from decouple import config | |
| from gql import gql, Client | |
| from gql.transport.requests import RequestsHTTPTransport | |
| from gql.transport.exceptions import TransportServerError, TransportQueryError | |
| api_key = config('OMNIVORE_API_KEY') |
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 | |
| # shellcheck disable=SC2143,SC2317 | |
| # TODO: debug ctrl-d | |
| # trap ctrl-c, ctrl-d, and ctrl-z | |
| trap_card() { | |
| echo -e "\nGoodbye!"; exit 0 | |
| } | |
| trap trap_card SIGINT SIGQUIT SIGTSTP |
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
| const std = @import("std"); | |
| pub fn main() !void { | |
| var buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | |
| const cwd = std.os.getcwd(&buf) catch |err| { | |
| std.debug.print("> [error] detecting current working directory, err={}\n", .{err}); | |
| return; | |
| }; | |
| var gpa = std.heap.GeneralPurposeAllocator(.{}){}; |