Skip to content

Instantly share code, notes, and snippets.

View emisjerry's full-sized avatar

emisjerry emisjerry

View GitHub Profile
@emisjerry
emisjerry / mail.bat
Created August 14, 2022 09:21
Using blat mail .epub to Kindle mail address
@echo off
rem blat -install SMTP-Server [email protected] 5 -u userid -pw password
if "%1"=="" goto USAGE
rem copy "%1" book1.epub /y
blat - -to [email protected] -s "%1" -body "%1" -log blat.log -force8bit -charset utf-8 -unicode -attach "%1"
type blat.log
goto END
:USAGE
echo mail.bat book.epub
:END
@emisjerry
emisjerry / cnv.bat
Created August 14, 2022 09:17
Using pandoc to convert Markdown text file into .epub
@echo off
set _FN=%1
set _FN=%_FN:.txt=%
set _FN=%_FN:.md=%
set _AUTHOR=未知
if not "%2"=="" (
set _AUTHOR=%2
)
pandoc %1 -f markdown --toc --metadata title="%_FN%" --metadata author="%_AUTHOR%" --metadata lang="zh-Hant" --css style.css -o %_FN%.epub
@emisjerry
emisjerry / !Homepage.md
Last active June 20, 2022 10:32
Obsidian Dashboard++ CSS Homepage sample
@emisjerry
emisjerry / chk-is-running.ahk
Created June 5, 2022 06:33
Checking the state of a Windows service.
;; chk-is-running 服務名稱 系統目錄 啟動批次檔名
;; chk-is-running gitea z:\test\gitea start_service.bat
#SingleInstance Force
ServiceName = %1% ;; "gitea"
ServiceDir = %2% ;;"z:\test\gitea" ;; 系統目錄
StartBat = %3% ;;"start_service.bat" ;; 啟動服務的批次檔
ServiceChk = sc query "%ServiceName%" > %ServiceDir%\chk-is-running.txt
runwait, %COMSPEC% /C %ServiceChk%, ,Hide
@emisjerry
emisjerry / Markdown Tutorial.md
Created May 2, 2022 11:45
Markdown Tutorial. (Obsidian)

aliases: Markdown Tutorial, Obs 82 obsidianUIMode: source tags: 專案筆記, obsidian, markdown AutoNoteMover: disable disabled rules: [] created: "2022-04-04 14:53:25" modified: "2022-05-02 19:43:33" cssClasses: table-lines, row-alt blog: http://jdev.tw/blog/7066/

@emisjerry
emisjerry / !dict.md
Last active April 2, 2022 15:16
Dictionary for Obsidian Various completements plugin
@emisjerry
emisjerry / default.yml
Created March 31, 2022 15:09
espanso default test YAML
# espanso configuration file
# This is the default configuration file, change it as you like it
# You can refer to the official documentation:
# https://espanso.org/docs/
# Matches are the substitution rules, when you type the "trigger" string
# it gets replaced by the "replace" string.
toggle_key: OFF
matches:
@emisjerry
emisjerry / From-Template-Table.md
Created February 26, 2022 02:00
Obsidian From Template: Table

aliases: tags: obsidianUIMode: source template-should-create: "none" template-should-replace: "always" template-replacement: "{{templateResult}}" created: "2022-02-17 22:23:21" modified: "2022-02-25 14:01:46" disabled rules: [ all ]

@emisjerry
emisjerry / From-Template-Book.md
Created February 26, 2022 01:59
Obsidian From Temmplate: Book

aliases: category: "{{總類:choice:文學:流行:文化:生活:經管:科技}}" tags: "{{文學分類:choice:小說:隨筆:日本文學:散文:詩歌:名著:港台}} {{流行分類:choice:漫畫:推理:繪本:青春:科幻:言情:奇幻:武俠}}" AutoNoteMover: disable disabled rules: [ all ] template-output: 030-Inbox template-input: title,body template-replacement: "[[{{title}}]]" template-should-replace: "sometimes"

@emisjerry
emisjerry / from-template-02.md
Last active May 23, 2022 09:00
From Template sample

aliases: obsidianUIMode: source tags: "{{type:choice:專案筆記:彙總筆記:文獻筆記:永久筆記}}, {{tags:multi:blog:yt-videos:obsidian:autohotkey:windows:dev}}" template-output: 040-Highlights template-replacement: "[[{{title}}]] ![[{{title}}#^overview]]" template-should-replace: "sometimes" template-should-create: "open-pane" created: "{{建檔日期:currentDate:yyyy-MM-dd HH-mm-ss}}" modified: "2022-02-19 13:12:42"