1
1
Fork 0
This commit is contained in:
KenwoodFox 2025-10-14 17:44:51 -04:00
parent 9c819d6325
commit f46000649c
7 changed files with 104 additions and 40 deletions

View File

@ -4,6 +4,9 @@ set expandtab shiftwidth=4 tabstop=4
set autoindent
set clipboard=unnamedplus
" I want nvim using a venv for plugins and stuff
let g:python3_host_prog = expand('~/.venvs/nvim/bin/python')
" Plugins with vim-plug
call plug#begin('~/.vim/plugged')

View File

@ -1,24 +0,0 @@
[/home/joe/.local/share/plasma-vault/Blackmail.enc]
activities=
backend=cryfs
lastError=Unknown device (code: 1)
lastStatus=2
mountPoint=/home/joe/Vaults/Blackmail
name=Blackmail
offlineOnly=false
[/home/joe/.local/share/plasma-vault/NSFW.enc]
activities=
backend=cryfs
lastError=Cannot create the mount point (code: 0)
lastStatus=1
mountPoint=/home/joe/Vaults/NSFW
name=NSFW
offlineOnly=false
[EncryptedDevices]
/home/joe/.local/share/plasma-vault/Blackmail.enc=true
/home/joe/.local/share/plasma-vault/NSFW.enc=true
[UI-notice]
SkipNotice-cryfs-message=false

View File

@ -1,5 +1,5 @@
[user]
email = kenwood364@gmail.com
email = joe@kitsunehosting.net
name = KenwoodFox
signingkey = DD5E787D6C678F3F64
[alias]
@ -32,3 +32,5 @@
process = git-lfs filter-process
[diff "fcinfo"]
textconv = ~/.local/bin/fcinfo
[core]
hooksPath = /home/joe/.githooks

44
.githooks/pre-commit Executable file
View File

@ -0,0 +1,44 @@
#!/bin/sh
# Global pre-commit hook: print effective identity and ask to continue.
# Set BYPASS_COMMIT_IDENTITY_CHECK=1 to skip (e.g., in CI).
[ -n "$BYPASS_COMMIT_IDENTITY_CHECK" ] && exit 0
# Resolve effective identity (prefer repo-local config, fall back to global)
name="$(git config --get user.name)"
[ -z "$name" ] && name="$(git config --global --get user.name)"
email="$(git config --get user.email)"
[ -z "$email" ] && email="$(git config --global --get user.email)"
branch="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo '?')"
remote="$(git remote -v | awk '/\(push\)/{print $2; exit}' | sed 's#^https\?://##; s#git@##' )"
# Optional: block specific identities unless overridden
# Add your alt(s) here, comma-separated (exact match on email or name).
BLOCKED_EMAILS="${BLOCKED_EMAILS:-alt@example.com}"
BLOCKED_NAMES="${BLOCKED_NAMES:-Alt Name}"
is_blocked() {
needle="$1" haystack="$2"
printf '%s' "$haystack" | tr ',' '\n' | grep -Fxq "$needle"
}
printf '\n\033[1;33m⚠ Committing as:\033[0m \033[1m%s\033[0m <\033[1m%s\033[0m>\n' "$name" "$email"
[ -n "$branch" ] && printf ' Branch: %s\n' "$branch"
[ -n "$remote" ] && printf ' Remote: %s\n' "$remote"
printf ' Double-check this is the right account.\n\n'
if is_blocked "$email" "$BLOCKED_EMAILS" || is_blocked "$name" "$BLOCKED_NAMES"; then
printf '\033[1;31mBlocked identity detected.\033[0m Set BYPASS_COMMIT_IDENTITY_CHECK=1 to override just this commit.\n'
exit 1
fi
# Interactive confirm (skip if no TTY, e.g., merge drivers)
if [ -t 0 ]; then
printf 'Continue with commit? [y/N] '
read ans
case "$ans" in
y|Y) ;;
*) echo "Commit aborted."; exit 1 ;;
esac
fi

View File

@ -9,10 +9,14 @@ latex_symbols = {
"ohm": r"\Omega",
"A": r"\text{A}",
"V": r"\text{V}",
"milliamperes": r"\text{mA}",
"*": r"\cdot",
"N*m": r"\text{N} \cdot \text{m}",
"in*lb": r"\text{in} \cdot \text{lb}",
"||": r"\|",
"": r"-",
"μ": r"\mu",
"": r"-",
}
@ -66,8 +70,10 @@ def copy_to_clipboard(text):
def main():
try:
while True:
# Input the qalc expression
expression = input("Enter qalc expression: ")
expression = input("\nEnter qalc expression (Ctrl+C to exit): ")
# Run qalc and get the result
qalc_output = run_qalc(expression)
@ -79,13 +85,16 @@ def main():
latex_result = format_result_for_latex(qalc_output)
# Combine both input expression and result for final LaTeX output
final_latex_output = f"${latex_expression} {latex_result}$"
final_latex_output = f"{latex_expression} {latex_result}"
# Print and copy to clipboard
print(f"Final LaTeX output:\n{final_latex_output}")
copy_to_clipboard(final_latex_output)
print("LaTeX result copied to clipboard!")
except KeyboardInterrupt:
print("\nExiting...")
if __name__ == "__main__":
main()

View File

@ -22,7 +22,7 @@ host bitwarden
host frigate
IdentityFile ~/.ssh/hydroxonium
HostName 10.85.3.22
HostName 10.85.5.20
User joe
host portainer
@ -125,6 +125,10 @@ Host github.com
User git
IdentityFile ~/.ssh/github
Host snowsunehost
Hostname 10.85.3.65
User joe
# Also github but, for snowsune
Host github_snowsune
HostName ssh.github.com
@ -175,6 +179,9 @@ Host workLaptop
Host argen
HostName 10.20.30.224
Host asterisk
HostName 10.85.3.155
IdentityFile ~/.ssh/hydroxonium
# Pterodactyal stuff
Host wing1.kitsunehosting.net

23
.zshrc
View File

@ -144,3 +144,26 @@ export FZF_DEFAULT_OPTS="--layout=reverse --inline-info --height=80%"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# This is fo cumtanks lol
cumtanks() {
cd /home/joe/git/Snowsune/cumtanks || return 1
EPOCH=$(date +%s)
DATA_JSON="www/data.json"
tmpfile=$(mktemp)
awk -v epoch="$EPOCH" '
BEGIN { added=0 }
/"logs"[ \t]*:[ \t]*\[/ { inlogs=1 }
inlogs && /\]/ && !added {
sub(/\]/, " ,{ \"date\": " epoch ", \"text\": \"\" }\n ]")
added=1
}
{ print }
' "$DATA_JSON" > "$tmpfile" && mv "$tmpfile" "$DATA_JSON"
sed -i 's/,\n ]/\n ]/' "$DATA_JSON"
code -g "$DATA_JSON":$(grep -n '"logs"' "$DATA_JSON" | cut -d: -f1)
}
# For chat GPT
export OPENAI_API_KEY="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"