aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-07-07 06:30:23 +0000
committerterminaldweller <thabogre@gmail.com>2022-07-07 06:30:23 +0000
commited09c5f82ed5ef4932f67af72551807e13a4412d (patch)
tree6ad4a8bcbd08a9cf8b6b3e6a2871d200b478d9eb
parentupdated haproxy (diff)
downloadscripts-ed09c5f82ed5ef4932f67af72551807e13a4412d.tar.gz
scripts-ed09c5f82ed5ef4932f67af72551807e13a4412d.zip
a lot of updates
-rw-r--r--.newsboat/urls1
-rw-r--r--.tmux.conf4
-rw-r--r--.vimrc8
-rw-r--r--.zshrc11
-rwxr-xr-xbin/xman9
-rwxr-xr-xdocker/docker_builders.sh22
-rwxr-xr-xelvis/searxng98
-rwxr-xr-xlesscolor.sh6
-rw-r--r--terminaldweller.com/prosody/config/prosody.cfg.lua142
-rw-r--r--terminaldweller.com/searxng/Caddyfile1
10 files changed, 216 insertions, 86 deletions
diff --git a/.newsboat/urls b/.newsboat/urls
index a6cee80..c788e78 100644
--- a/.newsboat/urls
+++ b/.newsboat/urls
@@ -2,6 +2,7 @@ https://www.reddit.com/r/CryptoCurrency.rss
http://feeds.feedburner.com/abseilio
https://www.cyberciti.biz/atom/atom.xml
https://www.semicolonandsons.com/feed
+https://blog.terminaldweller.com/rss/feed
# (Youtube)
# Horror
diff --git a/.tmux.conf b/.tmux.conf
index b2507db..19db849 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -83,7 +83,7 @@ bind-key M-w command-prompt -p "Move Current Window To? (e.g 3.1; session_name:6
bind-key ! break-pane -d -n _hidden_pane
bind-key @ join-pane -s $.0
-bind-key p popup -w 80% -h 80% -E ksh
+bind-key p popup -w 80% -h 80% -E xonsh
#to support nested tmux sessions for ssh workflows
bind -T root F6 \
@@ -147,10 +147,12 @@ bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
setw -g monitor-activity off
set -g visual-activity off
+# pane border style
set -g pane-active-border-style fg='#669933',bold
set -g pane-border-style fg='#0099ff'
set -g pane-border-status top
set -g pane-border-lines heavy
+# set -g pane-border-format "#{pane_index}:#{s/sudo//:pane_current_command}"
set -g pane-border-format "#{pane_index}:#{pane_current_command}"
# message text
diff --git a/.vimrc b/.vimrc
index bd761bb..6032a0b 100644
--- a/.vimrc
+++ b/.vimrc
@@ -1452,8 +1452,8 @@ augroup END
let b:ale_c_flawfinder_executable= "/home/devi/devi/flawfinder/flawfinder-2.0.19/flawfinder.py"
augroup ALEC
autocmd!
- autocmd FileType c let b:ale_linters = {'c': ['clang-tidy', 'flawfinder']}
- autocmd FileType c let b:ale_fixers = {'c': ['clang-format']}
+ " autocmd FileType c let b:ale_linters = {'c': ['clang-tidy', 'flawfinder']}
+ " autocmd FileType c let b:ale_fixers = {'c': ['clang-format']}
augroup END
let b:ale_cpp_flawfinder_executable= "/home/devi/devi/flawfinder/flawfinder-2.0.19/flawfinder.py"
augroup ALECPP
@@ -1486,8 +1486,8 @@ let b:ale_sh_shfmt_options = "-w -"
let b:ale_sh_shellcheck_options = '-x'
augroup ALESH
autocmd!
- autocmd FileType sh let b:ale_linters = {'sh': ['shellcheck']}
- autocmd FileType sh let b:ale_fixers = {'sh': ['shfmt']}
+ autocmd FileType sh,bash let b:ale_linters = {'sh': ['shellcheck']}
+ autocmd FileType sh,bash let b:ale_fixers = {'sh': ['shfmt']}
augroup END
augroup ALECSS
autocmd!
diff --git a/.zshrc b/.zshrc
index 5e982bd..0b71f2e 100644
--- a/.zshrc
+++ b/.zshrc
@@ -312,7 +312,11 @@ export STARDICT_DATA_DIR
export LIBGL_ALWAYS_INDIRECT=1
#export PULSE_SERVER=tcp:192.168.1.103
export WWW_HOME="duckduckgo.com"
+# http://download.huzheng.org/
alias def="sdcv --color"
+alias defe="sdcv --color -u dictd_www.dict.org_gcide"
+alias defd="sdcv --color -u LDaF"
+alias deff="sdcv --color -u XMLittre"
#goenv
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
@@ -712,5 +716,12 @@ eval "$(luarocks-5.3 path)"
source /usr/share/fzf/completion.zsh
source /usr/share/fzf/key-bindings.zsh
+# deno
+export DENO_INSTALL="/home/devi/.deno"
+export PATH="$DENO_INSTALL/bin:$PATH"
+export DVM_DIR="/home/devi/.dvm"
+export PATH="$DVM_DIR/bin:$PATH"
+export PATH=/home/devi/.bun/bin:$PATH
+
[[ -s "/home/devi/.gvm/scripts/gvm" ]] && source "/home/devi/.gvm/scripts/gvm"
# [[ -s "/usr/share/grc/grc.zsh" ]] && source /usr/share/grc/grc.zsh
diff --git a/bin/xman b/bin/xman
new file mode 100755
index 0000000..5f4efed
--- /dev/null
+++ b/bin/xman
@@ -0,0 +1,9 @@
+#!/bin/sh
+# xmandoc MANPAGE - read manpage of possibly not installed package
+
+xlocate "man/man..\?/$1\.[0-9]" 2>/dev/null |
+ { grep . || { echo "xmandoc: No entry for $1 found." 1>&2; exit 1; } } |
+ while read -r pkg page; do
+ page=${page#* -> }
+ xbps-query --cat=$page ${pkg%-*} | mandoc -O width=205 -a
+ done
diff --git a/docker/docker_builders.sh b/docker/docker_builders.sh
new file mode 100755
index 0000000..f791e6a
--- /dev/null
+++ b/docker/docker_builders.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+SOCKS_4_PROXY="socks5://127.0.0.1:9995"
+SOCKS_6_PROXY="socks5://[::1]:9993"
+NO_PROXY="localhost,127.0.0.0/8,192.168.0.0/16,::1"
+# create the builders
+# --driver-opt env.no_proxy=${NO_PROXY} \
+docker buildx create \
+ --driver-opt env.http_proxy=${SOCKS_6_PROXY} \
+ --driver-opt env.https_proxy=${SOCKS_6_PROXY} \
+ --name proxy_builder_6
+
+# --driver-opt env.no_proxy=${NO_PROXY} \
+docker buildx create \
+ --driver-opt env.http_proxy=${SOCKS_4_PROXY} \
+ --driver-opt env.https_proxy=${SOCKS_4_PROXY} \
+ --name proxy_builder_4
+
+docker buildx create --name armbuilder
+
+# choose one as default
+docker buildx use proxy_builder_6
diff --git a/elvis/searxng b/elvis/searxng
new file mode 100755
index 0000000..6f42adf
--- /dev/null
+++ b/elvis/searxng
@@ -0,0 +1,98 @@
+#!/bin/sh
+# a modified version of the searx elvi, for my instance of searxng
+# elvis: searxng -- Search using searx metasearch engine instances (https://searx.me and others)
+# author: ng0 -- contact: ng0@we.make.ritual.n0.is
+# 2016-08-14
+
+. surfraw || exit 1
+
+w3_config_hook () {
+ def SURFRAW_searx_categories "$SURFRAW_categories"
+ def SURFRAW_searx_base_url "$SURFRAW_url"
+}
+
+w3_usage_hook () {
+ cat <<EOF
+
+Usage: $w3_argv0 [options] [search words]...
+Description:
+ Use the searx metasearch engine
+
+ -category,c=CATEGORIES
+
+ Local options:
+ default | search category "general" (default)
+ vid | search category "videos"
+ socialm | search category "social+media"
+ news | search category "news"
+ music | search category "music"
+ map | search category "map"
+ it | search category "it"
+ img | search category "images"
+ files | search category "files"
+ Default: general
+
+ -url,u=URL
+
+ Local options:
+ 1 | https://searx.terminaldweller.com
+ 2 | https://searx.laquadrature.net
+ 3 | https://www.privatesearch.io
+ o1 | http://searchb5a7tmimez.onion (laquadrature)
+ o2 | http://ulrn6sryqaifefld.onion (searx.me)
+ cjdns | fc00:59dd:3bb2:d592:4083:c138:5489:560a
+ Default: https://searx.terminaldweller.com
+
+EOF
+ w3_global_usage
+}
+mkopts category= url=
+w3_complete_hook_opt ()
+{
+ local opt="$1"
+ case "$opt" in
+ -c=*|-category=*) echo default vid socialm news music map it img files ;;
+ -u=*|-url=*) echo 1 2 3 o1 o2 cjdns ;;
+ *) return 1 ;;
+ esac
+}
+
+w3_parse_option_hook () {
+ opt="$1"
+ optarg="$2"
+ case "$opt" in
+ -c*=*) setopt SURFRAW_searx_categories $optarg ;;
+ -u*=*) setopt SURFRAW_searx_base_url $optarg ;;
+ *) return 1 ;;
+ esac
+ return 0
+}
+
+w3_config
+w3_parse_args "$@"
+
+case "$SURFRAW_searx_categories" in
+ default*) category="general" ;;
+ vid*) category="videos" ;;
+ socialm*) category="social+media" ;;
+ news*) category="news" ;;
+ music*) category="music" ;;
+ map*) category="map" ;;
+ it*) category="it" ;;
+ img*) category="images" ;;
+ files*) category="files" ;;
+ *) category="general" ;;
+esac
+case "$SURFRAW_searx_base_url" in
+ 1*) searx_url="https://searx.terminaldweller.com" ;;
+ 2*) searx_url="https://searx.laquadrature.net" ;;
+ 3*) searx_url="https://www.privatesearch.io" ;;
+ o1*) searx_url="http://searchb5a7tmimez.onion" ;;
+ o2*) searx_url="http://ulrn6sryqaifefld.onion" ;;
+ cjdns*) searx_url="fc00:59dd:3bb2:d592:4083:c138:5489:560a" ;;
+ *) searx_url="https://searx.terminaldweller.com" ;;
+esac
+# w3_args now contains a list of arguments
+escaped_args=$(w3_url_of_arg $w3_args)
+
+w3_browse_url "${searx_url}/?q=${escaped_args}&categories=${category}"
diff --git a/lesscolor.sh b/lesscolor.sh
index 4a8dc93..108f0a6 100755
--- a/lesscolor.sh
+++ b/lesscolor.sh
@@ -64,9 +64,9 @@ case "$1" in
*.qbs|*.slim|*.xqy|*.xquery|*.xq|*.xql|*.xqm|*.whiley|*.x10)
pygmentize -f 256 -O style="$PYGMENTIZE_STYLE" "$1" | nl -b a;;
*)
- # interp=$(get_interp "$1")
- # pygmentize -f 256 -O style="$PYGMENTIZE_STYLE" -l "$interp" "$1" | nl -b a
- pygmentize -f 256 -O style="$PYGMENTIZE_STYLE" -g "$1" | nl -b a
+ interp=$(get_interp "$1")
+ pygmentize -f 256 -O style="$PYGMENTIZE_STYLE" -l "$interp" "$1" | nl -b a
+ # pygmentize -f 256 -O style="$PYGMENTIZE_STYLE" -g "$1" | nl -b a
esac
exit 0
diff --git a/terminaldweller.com/prosody/config/prosody.cfg.lua b/terminaldweller.com/prosody/config/prosody.cfg.lua
index d2c5e7d..ba67de7 100644
--- a/terminaldweller.com/prosody/config/prosody.cfg.lua
+++ b/terminaldweller.com/prosody/config/prosody.cfg.lua
@@ -12,7 +12,6 @@ daemonize = false;
--
-- Good luck, and happy Jabbering!
-
---------- Server-wide settings ----------
-- Settings in this section apply to the whole server and are the default settings
-- for any virtual hosts
@@ -25,70 +24,67 @@ admins = {"devi@chat.terminaldweller.com"}
-- Enable use of libevent for better performance under high load
-- For more information see: https://prosody.im/doc/libevent
---use_libevent = true
+-- use_libevent = true
-- Prosody will always look in its source directory for modules, but
-- this option allows you to specify additional locations where Prosody
-- will look for modules first. For community modules, see https://modules.prosody.im/
---plugin_paths = {}
+-- plugin_paths = {}
-- This is the list of modules Prosody will load on startup.
-- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
-- Documentation for bundled modules can be found at: https://prosody.im/doc/modules
modules_enabled = {
- -- Generally required
- "roster"; -- Allow users to have a roster. Recommended ;)
- "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
- "tls"; -- Add support for secure TLS on c2s/s2s connections
- "dialback"; -- s2s dialback support
- "disco"; -- Service discovery
-
- -- Not essential, but recommended
- "carbons"; -- Keep multiple clients in sync
- "pep"; -- Enables users to publish their avatar, mood, activity, playing music and more
- "private"; -- Private XML storage (for room bookmarks, etc.)
- "blocklist"; -- Allow users to block communications with other users
- "vcard4"; -- User profiles (stored in PEP)
- "vcard_legacy"; -- Conversion between legacy vCard and PEP Avatar, vcard
- "limits"; -- Enable bandwidth limiting for XMPP connections
-
- -- Nice to have
- "version"; -- Replies to server version requests
- "uptime"; -- Report how long server has been running
- "time"; -- Let others know the time here on this server
- "ping"; -- Replies to XMPP pings with pongs
- --"register"; -- Allow users to register on this server using a client and change passwords
- --"mam"; -- Store messages in an archive and allow users to access it
- --"csi_simple"; -- Simple Mobile optimizations
-
- -- Admin interfaces
- "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
- --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
-
- -- HTTP modules
- "bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
- --"websocket"; -- XMPP over WebSockets
- --"http_files"; -- Serve static files from a directory over HTTP
-
- -- Other specific functionality
- --"groups"; -- Shared roster support
- --"server_contact_info"; -- Publish contact information for this service
- --"announce"; -- Send announcement to all online users
- --"welcome"; -- Welcome users who register accounts
- --"watchregistrations"; -- Alert admins of registrations
- --"motd"; -- Send a message to users when they log in
- --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
- --"proxy65"; -- Enables a file transfer proxy service which clients behind NAT can use
+ -- Generally required
+ "roster", -- Allow users to have a roster. Recommended ;)
+ "saslauth", -- Authentication for clients and servers. Recommended if you want to log in.
+ "tls", -- Add support for secure TLS on c2s/s2s connections
+ "dialback", -- s2s dialback support
+ "disco", -- Service discovery
+ -- Not essential, but recommended
+ "carbons", -- Keep multiple clients in sync
+ "pep", -- Enables users to publish their avatar, mood, activity, playing music and more
+ "private", -- Private XML storage (for room bookmarks, etc.)
+ "blocklist", -- Allow users to block communications with other users
+ "vcard4", -- User profiles (stored in PEP)
+ "vcard_legacy", -- Conversion between legacy vCard and PEP Avatar, vcard
+ "limits", -- Enable bandwidth limiting for XMPP connections
+ -- Nice to have
+ "version", -- Replies to server version requests
+ "uptime", -- Report how long server has been running
+ "time", -- Let others know the time here on this server
+ "ping", -- Replies to XMPP pings with pongs
+ -- "register"; -- Allow users to register on this server using a client and change passwords
+ -- "mam"; -- Store messages in an archive and allow users to access it
+ -- "csi_simple"; -- Simple Mobile optimizations
+ -- Admin interfaces
+ "admin_adhoc", -- Allows administration via an XMPP client that supports ad-hoc commands
+ -- "admin_telnet"; -- Opens telnet console interface on localhost port 5582
+
+ -- HTTP modules
+ "bosh" -- Enable BOSH clients, aka "Jabber over HTTP"
+ -- "websocket"; -- XMPP over WebSockets
+ -- "http_files"; -- Serve static files from a directory over HTTP
+
+ -- Other specific functionality
+ -- "groups"; -- Shared roster support
+ -- "server_contact_info"; -- Publish contact information for this service
+ -- "announce"; -- Send announcement to all online users
+ -- "welcome"; -- Welcome users who register accounts
+ -- "watchregistrations"; -- Alert admins of registrations
+ -- "motd"; -- Send a message to users when they log in
+ -- "legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
+ -- "proxy65"; -- Enables a file transfer proxy service which clients behind NAT can use
}
-- These modules are auto-loaded, but should you want
-- to disable them then uncomment them here:
modules_disabled = {
- -- "offline"; -- Store offline messages
- -- "c2s"; -- Handle client connections
- -- "s2s"; -- Handle server-to-server connections
- -- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
+ -- "offline"; -- Store offline messages
+ "c2s" -- Handle client connections
+ -- "s2s"; -- Handle server-to-server connections
+ -- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
}
-- Disable account creation by default, for security
@@ -114,23 +110,16 @@ s2s_secure_auth = false
-- certificates. They will be authenticated using DNS instead, even
-- when s2s_secure_auth is enabled.
---s2s_insecure_domains = { "insecure.example" }
+-- s2s_insecure_domains = { "insecure.example" }
-- Even if you disable s2s_secure_auth, you can still require valid
-- certificates for some domains by specifying a list here.
---s2s_secure_domains = { "jabber.org" }
+-- s2s_secure_domains = { "jabber.org" }
-- Enable rate limits for incoming client and server connections
-limits = {
- c2s = {
- rate = "10kb/s";
- };
- s2sin = {
- rate = "30kb/s";
- };
-}
+limits = {c2s = {rate = "10kb/s"}, s2sin = {rate = "30kb/s"}}
-- Required for init scripts and prosodyctl
pidfile = "/var/run/prosody/prosody.pid"
@@ -145,13 +134,12 @@ authentication = "internal_hashed"
-- through modules. An "sql" backend is included by default, but requires
-- additional dependencies. See https://prosody.im/doc/storage for more info.
---storage = "sql" -- Default is "internal"
+-- storage = "sql" -- Default is "internal"
-- For the "sql" backend, you can uncomment *one* of the below to configure:
---sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
---sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
---sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
-
+-- sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
+-- sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
+-- sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
-- Archiving configuration
-- If mod_mam is enabled, Prosody will store a copy of every message. This
@@ -166,9 +154,7 @@ archive_expires_after = "1w" -- Remove archived messages after 1 week
-- Logging configuration
-- For advanced logging see https://prosody.im/doc/logging
-log = {
- {levels = {min = "info"}, to = "console"};
-}
+log = {{levels = {min = "info"}, to = "console"}}
-- Uncomment to enable statistics
-- For more info see https://prosody.im/doc/statistics
@@ -185,20 +171,20 @@ log = {
certificates = "certs"
-- HTTPS currently only supports a single certificate, specify it here:
---https_certificate = "/etc/prosody/certs/localhost.crt"
+-- https_certificate = "/etc/prosody/certs/localhost.crt"
----------- Virtual hosts -----------
-- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
-- Settings under each VirtualHost entry apply *only* to that host.
VirtualHost "chat.terminaldweller.com"
- enabled = true
- ssl = {
- key = "/etc/letsencrypt/live/chat.terminaldweller.com/privkey.pem";
- certificate = "/etc/letsencrypt/live/chat.terminaldweller.com/fullchain.pem";
- }
+enabled = true
+ssl = {
+ key = "/etc/letsencrypt/live/chat.terminaldweller.com/privkey.pem",
+ certificate = "/etc/letsencrypt/live/chat.terminaldweller.com/fullchain.pem"
+}
---VirtualHost "example.com"
+-- VirtualHost "example.com"
-- certificate = "/path/to/example.crt"
------ Components ------
@@ -208,9 +194,9 @@ VirtualHost "chat.terminaldweller.com"
---Set up a MUC (multi-user chat) room server on conference.example.com:
Component "conference.chat.terminaldweller.com" "muc"
- restrict_room_creationi = "admin"
+restrict_room_creationi = "admin"
--- Store MUC messages in an archive and allow users to access it
---modules_enabled = { "muc_mam" }
+-- modules_enabled = { "muc_mam" }
---Set up an external component (default component port is 5347)
--
@@ -218,5 +204,5 @@ Component "conference.chat.terminaldweller.com" "muc"
-- transports to other networks like ICQ, MSN and Yahoo. For more info
-- see: https://prosody.im/doc/components#adding_an_external_component
--
---Component "gateway.example.com"
+-- Component "gateway.example.com"
-- component_secret = "password"
diff --git a/terminaldweller.com/searxng/Caddyfile b/terminaldweller.com/searxng/Caddyfile
index be88221..7f16a1d 100644
--- a/terminaldweller.com/searxng/Caddyfile
+++ b/terminaldweller.com/searxng/Caddyfile
@@ -1,6 +1,7 @@
{
admin off
https_port 8081
+ http_port 8082
}
{$SEARXNG_HOSTNAME} {