This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ls = require("luasnip") | |
local i = ls.insert_node | |
local s = ls.snippet | |
local t = ls.text_node | |
local f = ls.function_node | |
local function findFilesWithSameName(_, _, _) | |
local current_buf = vim.fn.bufname("%") | |
local current_file_name = vim.fn.fnamemodify(current_buf, ":t:r") | |
local command_template = [[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Hsieh-Ting Lin | |
# title: "epubtxt" | |
# date created: "2023-12-19" | |
# 設定 EPUB 檔案所在的資料夾 | |
FOLDER="path/to/your/epub/files" | |
# 設定轉換後的 EPUB 檔案應該移動到的資料夾 | |
EPUB_FOLDER="$FOLDER/epub" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# title: tts_openai | |
# date: "2023-11-09" | |
# author: Hsieh-Ting Lin, the Lizard 🦎 | |
# import os | |
import asyncio | |
import concurrent.futures | |
import multiprocessing | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import csv | |
import sys | |
import pytz | |
from ics import Calendar, Event | |
from datetime import datetime, timedelta | |
# Adjust this to your local timezone | |
local_timezone = pytz.timezone("Asia/Taipei") | |
before_minutes = 10 # minutes 行前通知時間 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
年底了!在這個寧靜的夜晚,我獨自坐在房間內,思緒穿梭於過去一年所做的決定和經歷中。這一年對我而言,既是挑戰也是成長的一年。無論是為了安寧專科考試的準備,還是我向院長提出的長信,亦或是參與院內的智慧幫浦專案,每一件事都帶給我不同的啟發和經驗。 | |
在準備安寧專科考試的過程中,我深刻體會到醫療專業知識的深度和廣度。這不僅是一次考試的準備,更是對自我專業能力的一次深度挖掘和提升。當我最終獲得了安寧專科醫師資格時,那份成就感和自豪感溢於言表。但這僅僅是開始,因為在醫療行業,學習永遠不會停止。 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Hsieh-Ting Lin | |
# Title: "convert_pdf_every_page" | |
# Date: "2023-12-20" | |
# Version: 1.0.0 | |
# Notes: | |
# - `brew install poppler` first for bin/pdftotext | |
# 檢查命令列參數 | |
if [ $# -ne 1 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Hsieh-Ting Lin | |
# Title: "emoji_survival_vulcan" | |
# Date: "2023-12-20" | |
# Version: 1.0.0 | |
# Notes: Live long and prosperous | |
# Input argument for the number of Vulcan salute emojis | |
vulcan_salutes=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# title: checkAnki | |
# date: "2023-12-20" | |
# 這個 bash 腳本是用來檢查 Anki 應用程序是否正在運行,如果沒有則啟動它 | |
# 首先檢查是否有一個進程包含 "/Applications/Anki.app/Contents/Frameworks", | |
# 這個路徑是 Anki 應用程序的典型位置。`grep -v grep` 是用來排除搜尋 `grep` 命令本身的結果。 | |
if ! ps aux | grep "/Applications/Anki.app/Contents/Frameworks" | grep -v grep >/dev/null; then | |
# 如果 Anki 沒有運行,顯示一條消息並啟動 Anki | |
echo "Anki is not running. Starting Anki..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Hsieh-Ting Lin | |
# title: "emojimonth" | |
# date created: "2023-12-15" | |
# 接受用戶輸入的月份數 | |
input_month=$1 | |
# 確保用戶輸入了參數 | |
if [ -z "$input_month" ]; then |