summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshymad <czilukim@o2.pl>2017-09-24 11:38:43 +0200
committerAshymad <czilukim@o2.pl>2017-09-24 11:38:43 +0200
commit1126174d51b270431381577ee3f9a6bdd9073a75 (patch)
treeecb2e2e70937bcd8bd2b32ba954c1dc9e4c8d5c1
parentd5df330bcb8c7be624b510343697e84b2bef5a89 (diff)
Initial commit
-rw-r--r--DST_change_to_client_only/run.bat15
-rw-r--r--KeePassXC_sync_database/sync_kpsdb.sh12
-rw-r--r--MC_multiple_mod_folders/regenerate.tcl20
3 files changed, 47 insertions, 0 deletions
diff --git a/DST_change_to_client_only/run.bat b/DST_change_to_client_only/run.bat
new file mode 100644
index 0000000..e399241
--- /dev/null
+++ b/DST_change_to_client_only/run.bat
@@ -0,0 +1,15 @@
+@echo off
+::Ver 1.0
+::sfk sel . modinfo.lua +run -yes "sfk filt $file -where client_only_mod -rep _false_true_ -write -yes || sfk ftext $file client_only_mod -justrc && echo(>>$file && echo(client_only_mod = true>>$file"
+
+::Ver 2.0
+::sfk select . modinfo.lua +perline -yes "ftext #text client_only_mod -justrc +if rc=1 filter #text -where client_only_mod -rep _false_true_ -write -yes +if rc=0 xed #text \"/[end]/\nclient_only_mod = true\n/\" -tofile #text"
+
+::Ver 2.0.1
+::sfk select . modinfo.lua +perline -yes "ftext #text client_only_mod -justrc +if rc=1 xed #text \"/*client_only_mod*/client_only_mod = true/\" -tofile #text +if rc=0 xed #text \"/[end]/\nclient_only_mod = true\n/\" -tofile #text"
+
+::Ver 2.1.1
+::sfk select . modinfo.lua +perline -yes "xed #text \"/[lstart]*client_only_mod*/client_only_mod = true/\" -tofile #text +if rc=0 xed #text \"/[end]/\nclient_only_mod = true\n/\" -tofile #text"
+
+::Ver 2.1.1c
+sfk select . modinfo.lua +perline -yes "xed #text \"/[lstart]*client_only_mod*/client_only_mod = true/\" -tofile #text +if rc=0 xed #text \"/[end]/\nclient_only_mod = true\n/\" -tofile #text +tell [Yellow]File: [Green]#file"
diff --git a/KeePassXC_sync_database/sync_kpsdb.sh b/KeePassXC_sync_database/sync_kpsdb.sh
new file mode 100644
index 0000000..accbdf5
--- /dev/null
+++ b/KeePassXC_sync_database/sync_kpsdb.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+DB_PATH="/mnt/data/Documents/Workspace/KeePass/Databa5e.kdbx"
+
+! test -d /tmp/sync && mkdir /tmp/sync
+rsync -aP 5hy.men:~/Backup/Databa5e.kdbx /tmp/sync/ &&
+
+cp "$DB_PATH" "${DB_PATH}.bckp.$(date +%Y-%m-%d)" &&
+
+keepassxc-cli merge -s "$DB_PATH" /tmp/sync/Databa5e.kdbx &&
+
+rsync -aP "$DB_PATH" 5hy.men:~/Backup/Databa5e.kdbx
diff --git a/MC_multiple_mod_folders/regenerate.tcl b/MC_multiple_mod_folders/regenerate.tcl
new file mode 100644
index 0000000..2cd1d7b
--- /dev/null
+++ b/MC_multiple_mod_folders/regenerate.tcl
@@ -0,0 +1,20 @@
+#!/bin/env tclsh
+
+puts {Regenerating mods...}
+
+set dir [file dirname [file normalize [info script]]]
+cd $dir
+cd ..
+set mcdir [pwd]
+file delete -force mods
+file mkdir mods
+
+cd $dir
+set sdirs [glob -type d *]
+
+foreach sdir $sdirs {
+ foreach item [glob -nocomplain -directory $sdir -tails *] {
+ puts "mods/$item -> [file tail $dir]/$sdir/$item"
+ file link $mcdir/mods/$item $dir/$sdir/$item
+ }
+}