Commit bf0b6f1

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