- commit
- bf0b6f1
- parent
- 24c4406
- author
- xxwhirlpool
- date
- 2026-03-25 07:12:30 -0400 EDT
misc
20 files changed,
+34,
-525
+32,
-63
1@@ -1,21 +1,23 @@
2+#!/bin/bash
3 # ~/.bashrc: executed by bash(1) for non-login shells.
4 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
5 # for examples
6
7+######################################
8+# default stuff i'm scared to change
9+######################################
10+
11 # If not running interactively, don't do anything
12 case $- in
13 *i*) ;;
14 *) return;;
15 esac
16
17-# don't put duplicate lines or lines starting with space in the history.
18-# See bash(1) for more options
19 HISTCONTROL=ignoreboth
20
21 # append to the history file, don't overwrite it
22 shopt -s histappend
23
24-# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
25 HISTSIZE=1000
26 HISTFILESIZE=2000
27
28@@ -23,10 +25,6 @@ HISTFILESIZE=2000
29 # update the values of LINES and COLUMNS.
30 shopt -s checkwinsize
31
32-# If set, the pattern "**" used in a pathname expansion context will
33-# match all files and zero or more directories and subdirectories.
34-#shopt -s globstar
35-
36 # make less more friendly for non-text input files, see lesspipe(1)
37 [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
38
39@@ -40,16 +38,8 @@ case "$TERM" in
40 xterm-color|*-256color) color_prompt=yes;;
41 esac
42
43-# uncomment for a colored prompt, if the terminal has the capability; turned
44-# off by default to not distract the user: the focus in a terminal window
45-# should be on the output of commands, not on the prompt
46-#force_color_prompt=yes
47-
48 if [ -n "$force_color_prompt" ]; then
49 if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
50- # We have color support; assume it's compliant with Ecma-48
51- # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
52- # a case would tend to support setf rather than setaf.)
53 color_prompt=yes
54 else
55 color_prompt=
56@@ -76,33 +66,7 @@ esac
57 if [ -x /usr/bin/dircolors ]; then
58 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
59 alias ls='ls --color=auto'
60- #alias dir='dir --color=auto'
61- #alias vdir='vdir --color=auto'
62-
63 alias grep='grep --color=auto'
64- alias fgrep='fgrep --color=auto'
65- alias egrep='egrep --color=auto'
66-fi
67-
68-# colored GCC warnings and errors
69-#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
70-
71-# some more ls aliases
72-alias ll='ls -alF'
73-alias la='ls -A'
74-alias l='ls -CF'
75-
76-# Add an "alert" alias for long running commands. Use like so:
77-# sleep 10; alert
78-alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
79-
80-# Alias definitions.
81-# You may want to put all your additions into a separate file like
82-# ~/.bash_aliases, instead of adding them here directly.
83-# See /usr/share/doc/bash-doc/examples in the bash-doc package.
84-
85-if [ -f ~/.bash_aliases ]; then
86- . ~/.bash_aliases
87 fi
88
89 # enable programmable completion features (you don't need to enable
90@@ -122,24 +86,21 @@ fi
91
92 # general
93
94-alias nano=micro
95-alias sudo="sudo "
96 alias icat="kitten icat"
97-alias freeze="freeze -c user $1"
98-alias fd="fdfind "
99+alias fd="fdfind"
100 alias neofetch="hyfetch"
101 alias fastfetch="hyfetch"
102 alias bat="batcat"
103 alias cat="bat --paging=never"
104 alias rced="micro ~/.bashrc && source ~/.bashrc"
105+alias ps="ps auxww"
106 alias dd="askdd"
107 alias copy="xclip -sel clipboard"
108-alias upperc="tr '[:lower:]' '[:upper:]'"
109-alias lowerc="tr '[:upper:]' '[:lower:]'"
110-
111-# lazy ass way for me to get my idol mp3s from youtube
112-# usage: ytmp3 url
113-alias ytmp3="yt-dlp -f ba -x --audio-format mp3"
114+alias open="xdg-open"
115+alias c="clear"
116+alias updupgr="sudo apt update && sudo apt upgrade"
117+alias freeze="freeze -c user"
118+alias glow="glow -p"
119
120 # some cd bookmarks
121 alias dotf="cd /home/kat/dotfiles"
122@@ -159,8 +120,11 @@ alias gitd="git diff --staged"
123 alias gdiff="gitd"
124 alias gits="git status"
125 alias gita="git add ."
126-# this is for pushing to my site eunoia.sayitditto.net
127-alias pusheu="git push bytes main && cd /home/kat/Documents/Git/-mine/eunoia-astro/src/utils && node git-changelog.js"
128+alias pusheu="git push bytes main && cd /home/kat/Documents/Git/-mine/eunoia-astro/src/utils && node git-changelog.js && cd ../../"
129+
130+# dev
131+alias irb="rv run irb"
132+alias ipy="python3 -i"
133
134 # vpn split tunnel aliases based on a small script @ ~/.local/bin/mvpn
135 alias mftp="mvpn filezilla"
136@@ -195,10 +159,6 @@ export FZF_DEFAULT_OPTS=" \
137 --color=marker:#BABBF1,fg+:#C6D0F5,prompt:#CA9EE6,hl+:#E78284 \
138 --color=border:#414559,label:#C6D0F5"
139
140-if [ -f ~/.privatevars ]; then
141- . ~/.privatevars
142-fi
143-
144 export LEDGER_FILE=~/.config/hledger/katmoney.journal
145
146 ######################################
147@@ -209,7 +169,7 @@ export LEDGER_FILE=~/.config/hledger/katmoney.journal
148 # insane sysadmin website woman adventures
149 portfree() {
150 while
151- port=$(shuf -n 1 -i 49152-65535)
152+ port=$(shuf -n 1 -i 1024-65535)
153 netstat -atun | grep -q "$port"
154 do
155 continue
156@@ -220,15 +180,18 @@ portfree() {
157 # print internal & external IPs
158 whatip() {
159 # internal
160- echo -n "internal IP: " | lolcat -p 0.7; hostname -I | awk '{print $1}'
161+ echo -n "internal IP: " | lolcat -p 0.7
162+ hostname -I | awk '{print $1}'
163+
164 # external
165- echo -n "external IP: " | lolcat -p 0.7; curl -4 icanhazip.com
166+ echo -n "external IP: " | lolcat -p 0.7
167+ curl -4 icanhazip.com
168 }
169
170 # password generator. takes input for password length by number
171 passgen() {
172 PASSLENGTH=$(gum input --placeholder "type a number")
173- date +%s | sha256sum | base64 | head -c $PASSLENGTH ; echo
174+ date +%s | sha256sum | base64 | head -c "$PASSLENGTH"; echo
175 }
176
177 cdmess() {
178@@ -236,17 +199,23 @@ cdmess() {
179 # https://blog.larah.me/mess-directory/
180 today_tmpdir="${TMPDIR-/tmp}/${USER}_mess/$(date +%F)"
181 mkdir -p "$today_tmpdir"
182- cd "$(mktemp -d -p "${today_tmpdir}" XXXX)"
183+ cd "$(mktemp -d -p "${today_tmpdir}" XXXX)" || exit 1
184 }
185
186 # to get quick notifs
187 # after long commands
188 notif() {
189 notify-send "done!"
190- aplay -q /usr/share/sounds/sound-icons/start
191+ paplay /usr/share/sounds/sound-icons/start
192 spd-say -t female3 -r +25 "done!"
193 }
194
195+# make & cd into a folder
196+mkcd() {
197+ mkdir -p "$@" && cd "$_" || exit 1;
198+}
199+
200+
201 ######################################
202 # misc
203 ######################################
R config/.config/config =>
config/.config/yt-dlp/config
+0,
-0
+1,
-1
1@@ -20,5 +20,5 @@ stdinpaste() {
2 case "$1" in
3 "") default ;;
4 "-i") stdinpaste && echo -e "\n" ;;
5- *) takearg "$@" ;;
6+ *) takearg "$@" && echo -e "\n" ;;
7 esac
+1,
-1
1@@ -20,5 +20,5 @@ stdinpaste() {
2 case "$1" in
3 "") default ;;
4 "-i") stdinpaste && echo -e "\n" ;;
5- *) takearg "$@" ;;
6+ *) takearg "$@" && echo -e "\n" ;;
7 esac
R scripts/Scripts/copymagnets_bookmarklet.js =>
scripts/Scripts/bookmarklets/copymagnets_bookmarklet.js
+0,
-0
+0,
-297
1@@ -1,297 +0,0 @@
2-#!/bin/bash
3-
4-# gallery.sh
5-# Author: Nils Knieling - https://github.com/Cyclenerd/gallery_shell
6-# Inspired by: Shapor Naghibzadeh - https://github.com/shapor/bashgal
7-#
8-#
9-#
10-# modified by kat @ girlonthemoon.xyz for personal use
11-#
12-#
13-#
14-
15-#########################################################################################
16-#### Configuration Section
17-#########################################################################################
18-
19-MY_HEIGHT_SMALL=400
20-MY_HEIGHT_LARGE=800
21-MY_QUALITY=100
22-MY_THUMBDIR="__thumbs"
23-MY_INDEX_HTML_FILE="index.html"
24-MY_TITLE=$(gum input --placeholder "title of document and header")
25-MY_FOOTER='created with <a href="https://github.com/Cyclenerd/gallery_shell">gallery.sh</a>'
26-
27-# Use convert from ImageMagick
28-MY_CONVERT_COMMAND="convert"
29-# Use JHead for EXIF Information
30-MY_EXIF_COMMAND="jhead"
31-
32-MY_CSS="https://stash.4-walls.net/gallery/assets/md2html.css"
33-
34-# Debugging output
35-# true=enable, false=disable
36-MY_DEBUG=true
37-
38-#########################################################################################
39-#### End Configuration Section
40-#########################################################################################
41-
42-
43-MY_SCRIPT_NAME=$(basename "$0")
44-MY_DATETIME=$(date -u "+%Y-%m-%d %H:%M:%S")
45-MY_DATETIME+=" UTC"
46-
47-function usage {
48- MY_RETURN_CODE="$1"
49- echo -e "Usage: $MY_SCRIPT_NAME [-t <title>] [-d <thumbdir>] [-h]:
50- [-t <title>]\\t sets the title (default: $MY_TITLE)
51- [-d <thumbdir>]\\t sets the thumbdir (default: $MY_THUMBDIR)
52- [-h]\\t\\t displays help (this message)"
53- exit "$MY_RETURN_CODE"
54-}
55-
56-function debugOutput(){
57- if [[ "$MY_DEBUG" == true ]]; then
58- echo "$1" # if debug variable is true, echo whatever's passed to the function
59- fi
60-}
61-
62-function getFileSize(){
63- # Be aware that BSD stat doesn't support --version and -c
64- if stat --version &>/dev/null; then
65- # GNU
66- MY_FILE_SIZE=$(stat -c %s "$1" | awk '{$1/=1000000;printf "%.2fMB\n",$1}')
67- else
68- # BSD
69- MY_FILE_SIZE=$(stat -f %z "$1" | awk '{$1/=1000000;printf "%.2fMB\n",$1}')
70- fi
71- echo "$MY_FILE_SIZE"
72-}
73-
74-while getopts ":t:d:h" opt; do
75- case $opt in
76- t)
77- MY_TITLE="$OPTARG"
78- ;;
79- d)
80- MY_THUMBDIR="$OPTARG"
81- ;;
82- h)
83- usage 0
84- ;;
85- *)
86- echo "Invalid option: -$OPTARG"
87- usage 1
88- ;;
89- esac
90-done
91-
92-debugOutput "- $MY_SCRIPT_NAME : $MY_DATETIME"
93-
94-### Check Commands
95-command -v $MY_CONVERT_COMMAND >/dev/null 2>&1 || { echo >&2 "!!! $MY_CONVERT_COMMAND it's not installed. Aborting."; exit 1; }
96-command -v $MY_EXIF_COMMAND >/dev/null 2>&1 || { echo >&2 "!!! $MY_EXIF_COMMAND it's not installed. Aborting."; exit 1; }
97-
98-### Create Folders
99-[[ -d "$MY_THUMBDIR" ]] || mkdir "$MY_THUMBDIR" || exit 2
100-
101-MY_HEIGHTS[0]=$MY_HEIGHT_SMALL
102-MY_HEIGHTS[1]=$MY_HEIGHT_LARGE
103-for MY_RES in "${MY_HEIGHTS[@]}"; do
104- [[ -d "$MY_THUMBDIR/$MY_RES" ]] || mkdir -p "$MY_THUMBDIR/$MY_RES" || exit 3
105-done
106-
107-#### Create Startpage
108-debugOutput "$MY_INDEX_HTML_FILE"
109-cat > "$MY_INDEX_HTML_FILE" << EOF
110-<!DOCTYPE HTML>
111-<html lang="en">
112-<head>
113- <meta charset="utf-8">
114- <title>$MY_TITLE</title>
115- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
116- <meta name="robots" content="noindex, nofollow">
117- <link rel="stylesheet" href="$MY_CSS">
118-</head>
119-<body>
120-<header>
121- <h1 class="title">$MY_TITLE</h1>
122-</header>
123-<main>
124-EOF
125-
126-### Photos (JPG)
127-if [[ $(find . -maxdepth 1 -type f -iname \*.jpg | wc -l) -gt 0 ]]; then
128-
129-MY_ROWS='3'
130-echo '<div class="row row-cols-sm-1 row-cols-md-'"$((MY_ROWS-2))"' row-cols-lg-'"$((MY_ROWS-1))"' row-cols-xl-'"$MY_ROWS"' py-5">' >> "$MY_INDEX_HTML_FILE"
131-## Generate Images
132-MY_NUM_FILES=0
133-for MY_FILENAME in *.[jJ][pP][gG]; do
134- MY_FILELIST[$MY_NUM_FILES]=$MY_FILENAME
135- (( MY_NUM_FILES++ ))
136- for MY_RES in "${MY_HEIGHTS[@]}"; do
137- if [[ ! -s $MY_THUMBDIR/$MY_RES/$MY_FILENAME ]]; then
138- debugOutput "$MY_THUMBDIR/$MY_RES/$MY_FILENAME"
139- $MY_CONVERT_COMMAND -auto-orient -strip -quality $MY_QUALITY -resize x$MY_RES "$MY_FILENAME" "$MY_THUMBDIR/$MY_RES/$MY_FILENAME"
140- fi
141- done
142- cat >> "$MY_INDEX_HTML_FILE" << EOF
143-<div class="col">
144- <p>
145- <a href="$MY_THUMBDIR/$MY_FILENAME.html"><img src="$MY_THUMBDIR/$MY_HEIGHT_SMALL/$MY_FILENAME" alt="Thumbnail: $MY_FILENAME" class="rounded mx-auto d-block" height="$((MY_HEIGHT_SMALL/2))"></a>
146- </p>
147-</div>
148-EOF
149-done
150-echo '</div>' >> "$MY_INDEX_HTML_FILE"
151-
152-## Generate the HTML Files for Images in thumbdir
153-MY_FILE=0
154-while [[ $MY_FILE -lt $MY_NUM_FILES ]]; do
155- MY_FILENAME=${MY_FILELIST[$MY_FILE]}
156- MY_PREV=""
157- MY_NEXT=""
158- [[ $MY_FILE -ne 0 ]] && MY_PREV=${MY_FILELIST[$((MY_FILE - 1))]}
159- [[ $MY_FILE -ne $((MY_NUM_FILES - 1)) ]] && MY_NEXT=${MY_FILELIST[$((MY_FILE + 1))]}
160- MY_IMAGE_HTML_FILE="$MY_THUMBDIR/$MY_FILENAME.html"
161- MY_EXIF_INFO=$($MY_EXIF_COMMAND "$MY_FILENAME")
162- MY_FILESIZE=$(getFileSize "$MY_FILENAME")
163- debugOutput "$MY_IMAGE_HTML_FILE"
164- cat > "$MY_IMAGE_HTML_FILE" << EOF
165-<!DOCTYPE HTML>
166-<html lang="en">
167-<head>
168-<meta charset="utf-8">
169-<title>$MY_FILENAME</title>
170-<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
171-<meta name="robots" content="noindex, nofollow">
172-<link rel="stylesheet" href="$MY_CSS">
173-</head>
174-<body>
175-<header>
176- <h1 class="title">$MY_TITLE</h1>
177-</header>
178-<main>
179-EOF
180-
181- # Pager
182- echo '<div class="navigation-btns">' >> "$MY_IMAGE_HTML_FILE"
183- if [[ $MY_PREV ]]; then
184- echo '<a href="'"$MY_PREV"'.html" accesskey="p" title="⌨️ PC: [Alt]+[Shift]+[P] / MAC: [Control]+[Option]+[P]" class="btn btn-secondary " role="button">« previous</a>' >> "$MY_IMAGE_HTML_FILE"
185- else
186- echo '<a href="#" class="btn btn-secondary disabled" role="button" aria-disabled="true">« previous</a>' >> "$MY_IMAGE_HTML_FILE"
187- fi
188- cat >> "$MY_IMAGE_HTML_FILE" << EOF
189-</div>
190-<header>
191- <h3 class="title">$MY_FILENAME</h3>
192-</header>
193-EOF
194- if [[ $MY_NEXT ]]; then
195- echo '<a href="'"$MY_NEXT"'.html" accesskey="n" title="⌨️ PC: [Alt]+[Shift]+[N] / MAC: [Control]+[Option]+[N]" class="btn btn-secondary ">Next »</a>' >> "$MY_IMAGE_HTML_FILE"
196- else
197- echo '<a href="#" class="btn btn-secondary disabled" role="button" aria-disabled="true">Next »</a>' >> "$MY_IMAGE_HTML_FILE"
198- fi
199- echo '</div></div>' >> "$MY_IMAGE_HTML_FILE"
200-
201- cat >> "$MY_IMAGE_HTML_FILE" << EOF
202-<div class="row">
203- <div class="col">
204- <p><img src="$MY_HEIGHT_LARGE/$MY_FILENAME" class="img-fluid" alt="image: $MY_FILENAME"></p>
205- </div>
206-</div>
207-<p><a class="btn btn-primary" href="../$MY_FILENAME">download original ($MY_FILESIZE)</a></p>
208-EOF
209-
210- # EXIF
211- if [[ $MY_EXIF_INFO ]]; then
212- cat >> "$MY_IMAGE_HTML_FILE" << EOF
213-<div class="row">
214-<pre class="exif-info">
215-$MY_EXIF_INFO
216-</pre>
217-EOF
218- fi
219-
220- # Footer
221- cat >> "$MY_IMAGE_HTML_FILE" << EOF
222-</main> <!-- // main container -->
223-<br>
224-<footer class="footer-gallery">
225- <span>$MY_FOOTER - $MY_DATETIME</span>
226-</footer>
227-</body>
228-</html>
229-EOF
230- (( MY_FILE++ ))
231-done
232-
233-fi
234-#
235-# ### Movies (MOV or MP4)
236-# if [[ $(find . -maxdepth 1 -type f -iname \*.mov -o -iname '*.mp4' | wc -l) -gt 0 ]]; then
237-# cat >> "$MY_INDEX_HTML_FILE" << EOF
238-# <div class="row">
239-# <div class="col">
240-# <div class="page-header"><h2>Movies</h2></div>
241-# </div>
242-# </div>
243-# <div class="row">
244-# <div class="col">
245-# EOF
246-# if [[ $(find . -maxdepth 1 -type f -iname \*.mov | wc -l) -gt 0 ]]; then
247-# for MY_FILENAME in *.[mM][oO][vV]; do
248-# MY_FILESIZE=$(getFileSize "$MY_FILENAME")
249-# cat >> "$MY_INDEX_HTML_FILE" << EOF
250-# <a href="$MY_FILENAME" class="btn btn-primary" role="button">$MY_FILENAME ($MY_FILESIZE)</a>
251-# EOF
252-# done
253-# fi
254-# if [[ $(find . -maxdepth 1 -type f -iname \*.mp4 | wc -l) -gt 0 ]]; then
255-# for MY_FILENAME in *.[mM][pP]4; do
256-# MY_FILESIZE=$(getFileSize "$MY_FILENAME")
257-# cat >> "$MY_INDEX_HTML_FILE" << EOF
258-# <a href="$MY_FILENAME" class="btn btn-primary" role="button">$MY_FILENAME ($MY_FILESIZE)</a>
259-# EOF
260-# done
261-# fi
262-# echo '</div></div>' >> "$MY_INDEX_HTML_FILE"
263-# fi
264-#
265-# ### Downloads (ZIP)
266-# if [[ $(find . -maxdepth 1 -type f -iname \*.zip | wc -l) -gt 0 ]]; then
267-# cat >> "$MY_INDEX_HTML_FILE" << EOF
268-# <div class="row">
269-# <div class="col">
270-# <div class="page-header"><h2>Downloads</h2></div>
271-# </div>
272-# </div>
273-# <div class="row">
274-# <div class="col">
275-# EOF
276-# for MY_FILENAME in *.[zZ][iI][pP]; do
277-# MY_FILESIZE=$(getFileSize "$MY_FILENAME")
278-# cat >> "$MY_INDEX_HTML_FILE" << EOF
279-# <a href="$MY_FILENAME" class="btn btn-primary" role="button">$MY_FILENAME ($MY_FILESIZE)</a>
280-# EOF
281-# done
282-# echo '</div></div>' >> "$MY_INDEX_HTML_FILE"
283-# fi
284-#
285-# ### Footer
286-# cat >> "$MY_INDEX_HTML_FILE" << EOF
287-# </main> <!-- // main container -->
288-# <br>
289-# <footer class="footer mt-auto py-3 bg-light">
290-# <div class="container">
291-# <span class="text-muted">$MY_FOOTER - $MY_DATETIME</span>
292-# </div>
293-# </footer>
294-# </body>
295-# </html>
296-# EOF
297-
298-debugOutput "= done"
1@@ -1,4 +0,0 @@
2-until gotify-desktop; do
3- echo "'gotify' crashed with exit code $?. Respawning.." >&2
4- sleep 1
5-done
+0,
-13
1@@ -1,13 +0,0 @@
2-import os
3-from storygraph_api import User
4-from dotenv import load_dotenv
5-from pathlib import Path
6-
7-dotenv_path = Path('/home/kat/Documents/Code/Git/storygraph-api/.env')
8-
9-load_dotenv(dotenv_path=dotenv_path)
10-cookie = os.getenv('COOKIE') # retrieve cookie from .env file
11-uname = 'visualkill' #some username
12-user = User()
13-result = user.currently_reading(uname,cookie=cookie)
14-print(result)
1@@ -1,40 +0,0 @@
2-#FROM - an alpine image or any image that you may use and are facing the issue
3-FROM node:6-alpine
4-
5-# WORKDIR - any workdir that you may use
6-# RUN some other commands if needed
7-
8-# If you also need fonts then add this - Select any fonts from here https://wiki.alpinelinux.org/wiki/Fonts#List_of_fonts_in_Alpine_Linux:~:text=ttf%2Dubuntu%2Dfont%2Dfamily
9-# Just replace ttf-ubuntu-font-family with fonts that you need
10-RUN apk --update add ttf-ubuntu-font-family fontconfig && rm -rf /var/cache/apk/*
11-
12-RUN apk add imagemagick
13-
14-# if ever you need to change phantom js version number in future ENV comes handy as it can be used as a dynamic variable
15-ENV PHANTOMJS_VERSION=2.1.1
16-
17-RUN apk add --no-cache curl && \
18- cd /tmp && curl -Ls https://github.com/topseom/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz | tar xz && \
19- cp -R lib lib64 / && \
20- cp -R usr/lib/x86_64-linux-gnu /usr/lib && \
21- cp -R usr/share /usr/share && \
22- cp -R etc/fonts /etc && \
23- curl -k -Ls https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar -jxf - &&\
24- cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs && \
25- rm -fR phantomjs-2.1.1-linux-x86_64 && \
26- apk del curl
27-
28-# RUN any other commands still pending
29-# ENTRYPOINT
30-# CMD
31-
32-RUN mkdir -p /raster-root \
33- && mkdir -p /raster-output
34-COPY rasterize.js /raster-root/
35-WORKDIR /raster-root
36-
37-COPY . .
38-# These line for /entrypoint.sh
39-COPY entrypoint.sh /entrypoint.sh
40-RUN chmod +x /entrypoint.sh
41-entrypoint "/entrypoint.sh"
1@@ -1,9 +0,0 @@
2-### i don't use this anymore (i replaced it with a curl command piped to imagemagick. felt like a god doing that.) but keeping here just in case...
3-
4-## for optiplex 9020 server
5-
6-run with following cron job on the server:
7-
8-```bash
9-*/30 * * * * cd /home/kat/pjs && /usr/bin/docker compose run --rm pjs /home/kat/pjs/entrypoint.sh && /home/kat/pjs/rsync.sh >> /home/kat/pjs/test2.log 2>&1
10-```
1@@ -1,8 +0,0 @@
2-services:
3- pjs:
4- build: .
5- ports:
6- - "9283:5000"
7- command: /bin/sh -c "entrypoint.sh"
8- volumes:
9- - /home/kat/pjs/output:/raster-output
1@@ -1,3 +0,0 @@
2-#!/bin.bash
3-
4-phantomjs --ignore-ssl-errors=true --ssl-protocol=any --web-security=true /raster-root/rasterize.js http://wttr.in/New_York?0pqT /raster-output/wttr.png && magick /raster-output/wttr.png -crop 460x460+0+0 -transparent black /raster-output/wttr.png
1@@ -1,50 +0,0 @@
2-"use strict";
3-var page = require('webpage').create(),
4- system = require('system'),
5- address, output, size, pageWidth, pageHeight;
6-
7-if (system.args.length < 3 || system.args.length > 5) {
8- console.log('Usage: rasterize.js URL filename [paperwidth*paperheight|paperformat] [zoom]');
9- console.log(' paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"');
10- console.log(' image (png/jpg output) examples: "1920px" entire page, window width 1920px');
11- console.log(' "800px*600px" window, clipped to 800x600');
12- phantom.exit(1);
13-} else {
14- address = system.args[1];
15- output = system.args[2];
16- page.viewportSize = { width: 1024, height: 2000};
17- if (system.args.length > 3 && system.args[2].substr(-4) === ".pdf") {
18- size = system.args[3].split('*');
19- page.paperSize = size.length === 2 ? { width: size[0], height: size[1], margin: '0px' }
20- : { format: system.args[3], orientation: 'portrait', margin: '1cm' };
21- } else if (system.args.length > 3 && system.args[3].substr(-2) === "px") {
22- size = system.args[3].split('*');
23- if (size.length === 2) {
24- var pageWidth = parseInt(size[0], 10),
25- pageHeight = parseInt(size[1], 10);
26- page.viewportSize = { width: pageWidth, height: pageHeight };
27- page.clipRect = { top: 0, left: 0, width: pageWidth, height: pageHeight };
28- } else {
29- console.log("size:", system.args[3]);
30- var pageWidth = parseInt(system.args[3], 10),
31- pageHeight = parseInt(pageWidth * 3/4, 10); // it's as good an assumption as any
32- console.log ("pageHeight:",pageHeight);
33- page.viewportSize = { width: pageWidth, height: pageHeight };
34- }
35- }
36- if (system.args.length > 4) {
37- page.zoomFactor = system.args[4];
38- }
39- page.open(address, function (status) {
40- if (status !== 'success') {
41- console.log('Unable to load the address!');
42- phantom.exit(1);
43- } else {
44- window.setTimeout(function () {
45- page.render(output);
46- console.log("Success");
47- phantom.exit();
48- }, 200);
49- }
50- });
51-}
1@@ -1 +0,0 @@
2-rsync -ave 'ssh' /home/kat/pjs/output/wttr.png kat@192.168.1.123:/home/kat/.config/conky
+0,
-21
1@@ -1,21 +0,0 @@
2-from plexapi.server import PlexServer
3-from plexapi.myplex import MyPlexAccount
4-
5-SERVER_URL = 'http://192.168.1.123:32400'
6-TOKEN = 'x'
7-PLAYLIST_TITLE = 'watchlistexport1'
8-USERNAME = "x"
9-PASSWORD = "x"
10-
11-plex = PlexServer(SERVER_URL, TOKEN)
12-account = MyPlexAccount(USERNAME, PASSWORD)
13-
14-item = account.watchlist(libtype='movie')
15-
16-for item in account.watchlist():
17- plex.library.search(guid=item.guid)
18- for lol in item:
19- tada = item.title
20-
21- for help in plex.library.search(tada, libtype='movie'):
22- print(help.media[0].parts[0].file)
+0,
-14
1@@ -1,14 +0,0 @@
2-import os
3-from dotenv import load_dotenv
4-from pathlib import Path
5-from Comic_Geeks import Comic_Geeks
6-
7-dotenv_path = Path('/home/kat/Documents/Code/Git/comicgeeks-0.3.4')
8-
9-load_dotenv(dotenv_path=dotenv_path)
10-cookie = os.getenv('COOKIE')
11-
12-client = Comic_Geeks(cookie)
13-
14-# get info about an issue
15-client.issue_info(3616996)
R scripts/Scripts/charmbracelet_vhs/nyancat.tape =>
scripts/Scripts/vhs/nyancat.tape
+0,
-0
R scripts/Scripts/charmbracelet_vhs/parrot.tape =>
scripts/Scripts/vhs/parrot.tape
+0,
-0
R scripts/Scripts/charmbracelet_vhs/pbtape2.tape =>
scripts/Scripts/vhs/pbtape2.tape
+0,
-0
R scripts/Scripts/charmbracelet_vhs/train.tape =>
scripts/Scripts/vhs/train.tape
+0,
-0