+++ /dev/null
-#!/usr/bin/env sh
-
-dir=${1:-\.}
-[ -d $dir/bin ] || mkdir $dir/bin
-find $dir -name '*.c' -not -iwholename '*cache*' | while read i; do
- ${CC:-cc} -o bin/$(basename "$i" .c) "$i"
-done
+++ /dev/null
-#!/usr/bin/env sh
-# ufetch-armaan. My customized version of ufetch that doesn't print the ascii
-# art, and focuses on information that changes often. Ufetch was written
-# by jschx (Joe Schillinger), and is ISC licensed.
-# https://gitlab.com/jschx/ufetch
-
-## INFO
-host="$(cat /etc/hostname)"
-os="Arch Linux"
-kernel="$(uname -sr)"
-uptime="$(uptime -p | sed \
- -e 's/up //' \
- -e 's/hour./hr/' \
- -e 's/minute./min/')"
-date="$(date +%Y-%m-%0e)"
-time="$(date +%r)"
-tasks="$(task list due.before:week | tail -n 1 | head -c -7)"
-
-## DEFINE COLORS
-bold='\033[1m'
-white='\033[0;37m'
-reset='\033[0m'
-
-lc="${reset}${bold}${white}" # labels
-nc="${reset}${bold}${white}" # user and hostname
-ic="${reset}" # info
-
-## OUTPUT
-printf "${nc}${USER}${ic}@${nc}${host}${reset}
-${lc}OS ${ic}${os}${reset}
-${lc}KERNEL ${ic}${kernel}${reset}
-${lc}UPTIME ${ic}${uptime}${reset}
-${lc}DATE ${ic}${date}${reset}
-${lc}TIME ${ic}${time}${reset}
-${lc}TASKS ${ic}${tasks}${reset}
-"
+++ /dev/null
-#!/usr/bin/env python3
-
-import argparse
-from os import path, makedirs
-from pathlib import Path
-from shutil import copyfile
-
-def parse_args():
- parser = argparse.ArgumentParser(
- description="Copy file to Wasabi-mounted directory")
- parser.add_argument("input", type=str, nargs=1, help="input file")
- parser.add_argument("output", type=str, nargs="*", help="output path")
- parser.add_argument("-p", "--private", action="store_true",
- help="Copy to private directory")
- parser.add_argument("-m", "--mkdir", action="store_true",
- help="Create parent directories if necesary")
-
- return parser.parse_args()
-
-def outp(args):
- if not args.output:
- out = path.basename(args.input[0])
- else:
- out = args.output[0]
- return out
-
-def main(args):
- out = outp(args)
- inp = args.input[0]
-
- if args.private:
- s3path = priv_path
- s3bin = priv_bin
- else:
- s3path = pub_path
- s3bin = pub_bin
-
- fpath = s3path + out
- if args.mkdir and not path.exists(fpath):
- makedirs(Path(fpath).parent)
-
- copyfile(inp, fpath)
- print(endp + s3bin + "/" + out)
-
-if __name__ == "__main__":
- endp = "https://s3.us-east-2.wasabisys.com/"
- pub_path = "/home/armaa/.local/mnt/public/"
- pub_bin = "armaan-public"
- priv_path = "/home/armaa/.local/mnt/private/"
- priv_bin = "armaan-private"
- main(parse_args())
+++ /dev/null
-#!/usr/bin/env bash
-# Executed over SSH on builds.sr.ht for my websites
-
-set -e
-
-gitrun() {
- git -C $dir reset --hard
- git -C $dir pull origin main --rebase
-}
-
-if [[ $1 == "gemini" ]]; then
- dir=/var/www/armaanb.net-gemini
- gitrun
- (cd /var/www/armaanb.net-gemini ; make)
-elif [[ $1 == "gopher" ]]; then
- dir=/var/www/armaanb.net-gopher
- gitrun
-elif [[ $1 == "fortune" ]]; then
- dir=/var/www/fortune-online
- gitrun
-elif [[ $1 == "http" ]]; then
- dir=/var/www/armaanb.net-http
- gitrun
- (cd /var/www/armaanb.net-http ; make -B)
-fi