From 66e1fd43c2cc6e6dfb28815b4d35e5ad1e54cf09 Mon Sep 17 00:00:00 2001
From: deletefromuser <45934893+deletefromuser@users.noreply.github.com>
Date: Sat, 25 Jun 2022 23:18:55 +0800
Subject: [PATCH 01/10] add zipmanga folder shell
---
shell/subrename/zipmanga.sh | 1 +
1 file changed, 1 insertion(+)
create mode 100644 shell/subrename/zipmanga.sh
diff --git a/shell/subrename/zipmanga.sh b/shell/subrename/zipmanga.sh
new file mode 100644
index 0000000..54d1c24
--- /dev/null
+++ b/shell/subrename/zipmanga.sh
@@ -0,0 +1 @@
+for dir in */; do ( cd "$dir" && zip -r ../"${dir%/}".zip . ) done
From b8917165c06c725a9ef59512f42bc529c593c579 Mon Sep 17 00:00:00 2001
From: deletefromuser <45934893+deletefromuser@users.noreply.github.com>
Date: Sat, 29 Oct 2022 11:57:10 +0800
Subject: [PATCH 02/10] try bookmarklet.
---
bookmarklet/demo.js | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 bookmarklet/demo.js
diff --git a/bookmarklet/demo.js b/bookmarklet/demo.js
new file mode 100644
index 0000000..9b7fbbb
--- /dev/null
+++ b/bookmarklet/demo.js
@@ -0,0 +1,18 @@
+// http://www.ruanyifeng.com/blog/2011/06/a_guide_for_writing_bookmarklet.html
+if (!window.jQuery) {
+
+ script = document.createElement('script');
+
+ script.src = 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js';
+
+ script.onload = foo;
+
+ document.body.appendChild(script);
+
+} else {
+ foo();
+}
+
+function foo() {
+ alert($('a')[0].innerHTML);
+}
\ No newline at end of file
From fe298ab972e00ba32914b28977594d5e505efacb Mon Sep 17 00:00:00 2001
From: deletefromuser <45934893+deletefromuser@users.noreply.github.com>
Date: Sun, 16 Jul 2023 16:49:28 +0800
Subject: [PATCH 03/10] add sukura editor macro
---
npp_macro/shortcuts.xml | 107 ++++++++++++++++++++++
sakura_editor_macro/escape_regex.mac | 5 +
sakura_editor_macro/grep_blog.mac | 2 +
sakura_editor_macro/import_from_excel.mac | 7 ++
shell/encoding.sh | 12 +++
shell/ic.sh | 11 +++
shell/subrename/rename.sh | 8 ++
7 files changed, 152 insertions(+)
create mode 100644 npp_macro/shortcuts.xml
create mode 100644 sakura_editor_macro/escape_regex.mac
create mode 100644 sakura_editor_macro/grep_blog.mac
create mode 100644 sakura_editor_macro/import_from_excel.mac
create mode 100644 shell/encoding.sh
create mode 100644 shell/ic.sh
create mode 100644 shell/subrename/rename.sh
diff --git a/npp_macro/shortcuts.xml b/npp_macro/shortcuts.xml
new file mode 100644
index 0000000..61d042e
--- /dev/null
+++ b/npp_macro/shortcuts.xml
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ firefox "$(FULL_CURRENT_PATH)"
+ iexplore "$(FULL_CURRENT_PATH)"
+ chrome "$(FULL_CURRENT_PATH)"
+ safari "$(FULL_CURRENT_PATH)"
+ http://www.php.net/$(CURRENT_WORD)
+ https://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD)
+ $(NPP_FULL_FILE_PATH) $(CURRENT_WORD) -nosession -multiInst
+ outlook /a "$(FULL_CURRENT_PATH)"
+
+
+
+
+
+
+
diff --git a/sakura_editor_macro/escape_regex.mac b/sakura_editor_macro/escape_regex.mac
new file mode 100644
index 0000000..b790ba1
--- /dev/null
+++ b/sakura_editor_macro/escape_regex.mac
@@ -0,0 +1,5 @@
+//キーボードマクロのファイル
+S_ReplaceAll('([\\.\\^\\$\\*\\+\\?\\(\\)\\[\\{\\\\\\|])', '\\\\$1', 22); // すべて置換
+S_ReDraw(0); // 再描画
+S_ReplaceAll('\\r\\n', '\\\\r\\\\n', 22); // すべて置換
+S_ReDraw(0); // 再描画
diff --git a/sakura_editor_macro/grep_blog.mac b/sakura_editor_macro/grep_blog.mac
new file mode 100644
index 0000000..6e9ea9f
--- /dev/null
+++ b/sakura_editor_macro/grep_blog.mac
@@ -0,0 +1,2 @@
+//キーボードマクロのファイル
+S_Grep('\\d+', '*', 'C:\\Users\\Shin.SHINJI-PC2\\Documents\\Code\\blog\\hugo-source\\content', 25393, 99); // Grep
diff --git a/sakura_editor_macro/import_from_excel.mac b/sakura_editor_macro/import_from_excel.mac
new file mode 100644
index 0000000..6798ce1
--- /dev/null
+++ b/sakura_editor_macro/import_from_excel.mac
@@ -0,0 +1,7 @@
+//Keyboard macro file
+ReplaceAll('\\t', '\',\'', 6); // Replace All
+ReDraw(0); // Redraw
+ReplaceAll('^', 'insert into XXX_YYY select \'', 6); // Replace All
+ReDraw(0); // Redraw
+ReplaceAll('$', '\' from dual ;commit;', 6); // Replace All
+ReDraw(0); // Redraw
\ No newline at end of file
diff --git a/shell/encoding.sh b/shell/encoding.sh
new file mode 100644
index 0000000..b5a79ae
--- /dev/null
+++ b/shell/encoding.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+#enter input encoding here
+FROM_ENCODING="GB2312"
+#output encoding(UTF-8)
+TO_ENCODING="UTF-8"
+#convert
+CONVERT=" iconv -f $FROM_ENCODING -t $TO_ENCODING"
+#loop to convert multiple files
+for file in *.txt; do
+ $CONVERT "$file" "$file" > "../${file}"
+done
+exit 0
\ No newline at end of file
diff --git a/shell/ic.sh b/shell/ic.sh
new file mode 100644
index 0000000..730875e
--- /dev/null
+++ b/shell/ic.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+#function batch_convert() {
+ for file in *.srt
+ do
+ # iconv -f BIG-5 -t UTF-8 "$file" > "sub/_$file"
+# mv -f "$file.new" "$file"
+recode BIG-5..UTF-8 "$file"
+ done
+#}
+
+#batch_convert ~/Media/sf_share/sub
\ No newline at end of file
diff --git a/shell/subrename/rename.sh b/shell/subrename/rename.sh
new file mode 100644
index 0000000..22c80a6
--- /dev/null
+++ b/shell/subrename/rename.sh
@@ -0,0 +1,8 @@
+mv *S01E01* The.Staircase.2022.S01E01.AMZN.WEB-DL.DDP2.0.H.264-BTW.ass
+mv *S01E02* The.Staircase.2022.S01E02.AMZN.WEB-DL.DDP2.0.H.264-BTW.ass
+mv *S01E03* The.Staircase.2022.S01E03.AMZN.WEB-DL.DDP2.0.H.264-BTW.ass
+mv *S01E04* The.Staircase.2022.S01E04.AMZN.WEB-DL.DDP2.0.H.264-BTW.ass
+mv *S01E05* The.Staircase.2022.S01E05.AMZN.WEB-DL.DDP2.0.H.264-BTW.ass
+mv *S01E06* The.Staircase.2022.S01E06.AMZN.WEB-DL.DDP2.0.H.264-BTW.ass
+mv *S01E07* The.Staircase.2022.S01E07.AMZN.WEB-DL.DDP2.0.H.264-BTW.ass
+mv *S01E08* The.Staircase.2022.S01E08.AMZN.WEB-DL.DDP2.0.H.264-BTW.ass
\ No newline at end of file
From 09013b63a3aca24d05cc558dc417d9ba1e58d209 Mon Sep 17 00:00:00 2001
From: deletefromuser <45934893+deletefromuser@users.noreply.github.com>
Date: Wed, 26 Jul 2023 21:11:21 +0800
Subject: [PATCH 04/10] schedule-windows-to-sleep-at-specific-time
---
bat/win10sleep.bat | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 bat/win10sleep.bat
diff --git a/bat/win10sleep.bat b/bat/win10sleep.bat
new file mode 100644
index 0000000..527ede1
--- /dev/null
+++ b/bat/win10sleep.bat
@@ -0,0 +1,9 @@
+:: https://www.addictivetips.com/windows-tips/schedule-sleep-on-windows-10/
+@echo off &mode 32,2 &color cf &title Power Sleep
+set "s1=$m='[DllImport ("Powrprof.dll", SetLastError = true)]"
+set "s2=static extern bool SetSuspendState(bool hibernate, bool forceCritical, bool disableWakeEvent);"
+set "s3=public static void PowerSleep(){ SetSuspendState(false, false, false); }';"
+set "s4=add-type -name Import -member $m -namespace Dll; [Dll.Import]::PowerSleep();"
+set "ps_powersleep=%s1%%s2%%s3%%s4%"
+call powershell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Bypass -Command "%ps_powersleep:"=\"%"
+exit
\ No newline at end of file
From 7607170caf894e14251d67a9de7f3d70f9cb9e98 Mon Sep 17 00:00:00 2001
From: deletefromuser <45934893+deletefromuser@users.noreply.github.com>
Date: Thu, 27 Jul 2023 09:59:53 +0800
Subject: [PATCH 05/10] how-do-i-make-a-hibernation-batch-file-Windows 10
---
bat/win10Hibernate.bat | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 bat/win10Hibernate.bat
diff --git a/bat/win10Hibernate.bat b/bat/win10Hibernate.bat
new file mode 100644
index 0000000..2bb2330
--- /dev/null
+++ b/bat/win10Hibernate.bat
@@ -0,0 +1,4 @@
+:: https://stackoverflow.com/questions/7977743/how-do-i-make-a-hibernation-batch-file
+:: https://answers.microsoft.com/en-us/windows/forum/all/anyone-know-a-batchscriptprogramexe-that-can-put/741c42d6-41a4-47b2-9c64-fddbf1605637
+cd c:\
+shutdown /h
\ No newline at end of file
From 2b2d9d271aa9104bd2e8235e9b783b38e1ac533e Mon Sep 17 00:00:00 2001
From: deletefromuser <45934893+deletefromuser@users.noreply.github.com>
Date: Tue, 1 Aug 2023 09:17:19 +0800
Subject: [PATCH 06/10] u
---
bat/win10Hibernate.bat | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/bat/win10Hibernate.bat b/bat/win10Hibernate.bat
index 2bb2330..b60df93 100644
--- a/bat/win10Hibernate.bat
+++ b/bat/win10Hibernate.bat
@@ -1,4 +1,9 @@
:: https://stackoverflow.com/questions/7977743/how-do-i-make-a-hibernation-batch-file
:: https://answers.microsoft.com/en-us/windows/forum/all/anyone-know-a-batchscriptprogramexe-that-can-put/741c42d6-41a4-47b2-9c64-fddbf1605637
+:: https://superuser.com/questions/42039/change-windows-sound-volume-via-the-command-line
+C:\Software\nircmd-x64\nircmd.exe changesysvolume -50000
+C:\Software\nircmd-x64\nircmd.exe mutesysvolume 1
+C:\Software\nircmd-x64\nircmd.exe setbrightness 30
+
cd c:\
shutdown /h
\ No newline at end of file
From 8827e8360f8d630942cb753fcc604f88ce41b0c2 Mon Sep 17 00:00:00 2001
From: deletefromuser <45934893+deletefromuser@users.noreply.github.com>
Date: Wed, 2 Aug 2023 23:32:21 +0800
Subject: [PATCH 07/10] u
---
bat/win10offwork.bat | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 bat/win10offwork.bat
diff --git a/bat/win10offwork.bat b/bat/win10offwork.bat
new file mode 100644
index 0000000..d0f0ae6
--- /dev/null
+++ b/bat/win10offwork.bat
@@ -0,0 +1,3 @@
+C:\Software\nircmd-x64\nircmd.exe mutesysvolume 0
+C:\Software\nircmd-x64\nircmd.exe changesysvolume 15000
+C:\Software\nircmd-x64\nircmd.exe setbrightness 100
From 05be94a72c6f45d54b574f9925faf058cdecdc2c Mon Sep 17 00:00:00 2001
From: deletefromuser <45934893+deletefromuser@users.noreply.github.com>
Date: Sun, 5 Nov 2023 17:29:05 +0800
Subject: [PATCH 08/10] update
---
shell/subrename/mergesub.sh | 60 +++++++++++++++++++++++++++++++++
shell/subrename/presubrename.sh | 8 ++---
shell/subrename/subrename.sh | 8 ++---
3 files changed, 68 insertions(+), 8 deletions(-)
create mode 100644 shell/subrename/mergesub.sh
diff --git a/shell/subrename/mergesub.sh b/shell/subrename/mergesub.sh
new file mode 100644
index 0000000..acf3307
--- /dev/null
+++ b/shell/subrename/mergesub.sh
@@ -0,0 +1,60 @@
+if [ $# -ne 2 ]; then
+ echo "--- need argument ---";
+ exit 1;
+fi
+if [[ $1 == *"\\"* ]]; then
+ echo "--- path cannot contains \\ ---";
+ exit 1;
+fi
+if [[ $2 == *"\\"* ]]; then
+ echo "--- path cannot contains \\ ---";
+ exit 1;
+fi
+
+if [[ ! -d $1 || ! -d $2 ]]; then
+ echo "--- path does not exist\\ ---";
+ exit 1;
+fi
+
+IFS=$'\n'
+
+root=`realpath ${0%/*}`
+log=$root/`date '+%Y_%m_%d_%H_%M_%S'`.log
+
+cd $1;
+
+origin=(`ls`);
+
+echo ${origin[*]}>`expr $log`
+echo "---">>`expr $log`
+echo "origin files:"
+for i in ${origin[*]};do
+ echo " "$i
+done
+echo
+
+echo "origin length is "${#origin[*]}
+
+cd ..
+cd $2;
+sub=(`ls`);
+echo ${sub[*]}>>`expr $log`
+echo "sub files:"
+for i in ${sub[*]}; do
+ echo " "$i;
+done
+echo "sub length is "${#sub[*]};
+echo
+
+if [ ${#origin[*]} != ${#sub[*]} ]; then
+ echo "---- file num do not equal ---";
+ exit 1;
+fi
+
+for((i=0;i<`expr ${#sub[*]}`;i++));do
+ echo ${sub[`expr $i`]};
+ echo ${origin[`expr $i`]%.*}
+ cat $1/"${origin[`expr $i`]}" >> "${sub[`expr $i`]}"
+ #mv ${sub[`expr $i`]} ${origin[`expr $i`]%.*}.srt
+done
+echo result $?;
\ No newline at end of file
diff --git a/shell/subrename/presubrename.sh b/shell/subrename/presubrename.sh
index 27b8921..530bdc2 100644
--- a/shell/subrename/presubrename.sh
+++ b/shell/subrename/presubrename.sh
@@ -23,7 +23,7 @@ log=$root/`date '+%Y_%m_%d_%H_%M_%S'`.log
cd $1;
-origin=(*);
+origin=(`ls`);
echo ${origin[*]}>`expr $log`
echo "---">>`expr $log`
@@ -33,17 +33,17 @@ for i in ${origin[*]};do
done
echo
-echo "origin length is "${#origin[*]}
+echo "origin length is `ls | wc -l`"
cd ..
cd $2;
-sub=(*);
+sub=(`ls`);
echo ${sub[*]}>>`expr $log`
echo "sub files:"
for i in ${sub[*]}; do
echo " "$i;
done
-echo "sub length is "${#sub[*]};
+echo "sub length is `ls | wc -l`"
echo
if [ ${#origin[*]} != ${#sub[*]} ]; then
diff --git a/shell/subrename/subrename.sh b/shell/subrename/subrename.sh
index ddaf066..023794a 100644
--- a/shell/subrename/subrename.sh
+++ b/shell/subrename/subrename.sh
@@ -23,7 +23,7 @@ log=$root/`date '+%Y_%m_%d_%H_%M_%S'`.log
cd $1;
-origin=(*);
+origin=(`ls`);
echo ${origin[*]}>`expr $log`
echo "---">>`expr $log`
@@ -33,17 +33,17 @@ for i in ${origin[*]};do
done
echo
-echo "origin length is "${#origin[*]}
+echo "origin length is `ls | wc -l`"
cd ..
cd $2;
-sub=(*);
+sub=(`ls`);
echo ${sub[*]}>>`expr $log`
echo "sub files:"
for i in ${sub[*]}; do
echo " "$i;
done
-echo "sub length is "${#sub[*]};
+echo "sub length is `ls | wc -l`"
echo
if [ ${#origin[*]} != ${#sub[*]} ]; then
From 778b4df3eb21942c3963a745e1fb2eafd37a22fd Mon Sep 17 00:00:00 2001
From: deletefromuser <45934893+deletefromuser@users.noreply.github.com>
Date: Mon, 3 Mar 2025 21:08:07 +0800
Subject: [PATCH 09/10] =?UTF-8?q?=E4=BD=BF=E7=94=A8ffmpeg=E5=B0=86?=
=?UTF-8?q?=E9=9F=B3=E4=B9=90=E6=96=87=E4=BB=B6=E8=BD=AC=E6=8D=A2=E4=B8=BA?=
=?UTF-8?q?flac=E6=A0=BC=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
bat/convertMusic2Flac.bat | 8 ++++++++
bat/win10offwork.bat | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 bat/convertMusic2Flac.bat
diff --git a/bat/convertMusic2Flac.bat b/bat/convertMusic2Flac.bat
new file mode 100644
index 0000000..5975dc1
--- /dev/null
+++ b/bat/convertMusic2Flac.bat
@@ -0,0 +1,8 @@
+:: ʹffmpegļתΪflacʽ
+:: ^((.*)\\(.*)\.ape)$
+:: C:\Software\jellyfin_10.8.10\ffmpeg -i "$1" -c:a flac "$2\\$3.flac"
+:: set file to ansi encoding
+
+C:\Software\jellyfin_10.8.10\ffmpeg -i "D:\Music\han\Beyond - .ape" -c:a flac "D:\Music\han\Beyond - .flac"
+C:\Software\jellyfin_10.8.10\ffmpeg -i "D:\Music\Instrumental\Bandari - Childhoood Memory.ape" -c:a flac "D:\Music\Instrumental\Bandari - Childhoood Memory.flac"
+
diff --git a/bat/win10offwork.bat b/bat/win10offwork.bat
index d0f0ae6..242b3cd 100644
--- a/bat/win10offwork.bat
+++ b/bat/win10offwork.bat
@@ -1,3 +1,3 @@
C:\Software\nircmd-x64\nircmd.exe mutesysvolume 0
-C:\Software\nircmd-x64\nircmd.exe changesysvolume 15000
+C:\Software\nircmd-x64\nircmd.exe setsysvolume 15000
C:\Software\nircmd-x64\nircmd.exe setbrightness 100
From 902444611debf5ba730583c00a603c9b0cc3184c Mon Sep 17 00:00:00 2001
From: deletefromuser <45934893+deletefromuser@users.noreply.github.com>
Date: Mon, 2 Feb 2026 23:18:31 +0800
Subject: [PATCH 10/10] merge pdf file and page
---
pdf621/pdf-nup-merger.html | 544 +++++++++++++++++++++++++++++++++++++
1 file changed, 544 insertions(+)
create mode 100644 pdf621/pdf-nup-merger.html
diff --git a/pdf621/pdf-nup-merger.html b/pdf621/pdf-nup-merger.html
new file mode 100644
index 0000000..c1fe202
--- /dev/null
+++ b/pdf621/pdf-nup-merger.html
@@ -0,0 +1,544 @@
+
+
+
+
+
+ PDF N-Up Merger
+
+
+
+
+
+
PDF N-Up Merger
+
Merge PDF files with N-up tiling
+
+
+
📄
+
+ Click to upload or drag & drop PDF files
+
+
+
+
+
+
+
+ Pages per sheet (N-up):
+
+
+
+
Process PDFs
+
+
+
+
+
+
+ How it works: Upload multiple PDF files, specify how many pages (x)
+ should be combined onto a single sheet, and the app will create a merged PDF with N-up layout.
+ Default is 6 pages per sheet (2x3 grid).
+
+
+
+
+
+