Skip to content

Instantly share code, notes, and snippets.

View emisjerry's full-sized avatar

emisjerry emisjerry

View GitHub Profile
@emisjerry
emisjerry / fleet.ahk
Created October 29, 2022 15:52
Patch to Obsidian fleet.md, using local REST API plugin
/* ;; Windows cmd.exe 多行分隔號用 ^
curl -X "POST" ^
"https://127.0.0.1:27124/vault/030-Inbox/fleet.md" ^
-H "accept: */*" ^
-H "Authorization: Bearer 4c1f7a807f92a153944269bfd610571970a887b3952a9b2161b9cb98e9f8708a" ^
-H "Content-Type: text/markdown" ^
-d "## This is my document something else here"
*/
#SingleInstance Force
@emisjerry
emisjerry / myobsidian-Sanctum.css
Created September 9, 2022 16:41
Obsidian Sanctum customized CSS Snippets
/* 標題上下太接近了,加些padding空間 */
.HyperMD-header.HyperMD-header-2.cm-line {
padding-top: 8px !important;
padding-bottom: 8px !important;
}
.HyperMD-header.HyperMD-header-3.cm-line {
padding-top: 8px !important;
padding-bottom: 8px !important;
@emisjerry
emisjerry / myobsidian-common.css
Created September 9, 2022 16:40
Common CSS Snippets for Obsidian
/* 所有主題的共用樣式 */
kbd {
border-radius: 3px;
padding: 1px 2px 0;
border: 1px solid gray;
margin-left: 2px;
margin-right: 2px;
}
@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 your-email@yourmail.com 5 -u userid -pw password
if "%1"=="" goto USAGE
rem copy "%1" book1.epub /y
blat - -to your-kindle@kindle.com -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: