Skip to content

Instantly share code, notes, and snippets.

View htlin222's full-sized avatar
🦎

Hsieh-Ting Lin (林協霆) htlin222

🦎
View GitHub Profile
@htlin222
htlin222 / clip_to_simplenote.py
Created May 5, 2023 16:10
Raycast Command, save clipboard content to the simplenote, generate title by ChatGPT api
# title: clip_to_simplenote
# date: "2023-03-11"
# @raycast.title Clipboard to Simplenote with Anki tag
# @raycast.author HTLin the 🦎
# @raycast.authorURL https://github.com/htlin222
# @raycast.description Take the clipboard to simplenote
# @raycast.icon 📋
# @raycast.mode silent
# @raycast.packageName System
@htlin222
htlin222 / simplenote_to_anki.py
Created May 5, 2023 16:19
Batch export simplenote note tagged "Anki" to Anki, and change the tag to "added_to_anki"
# title: simplenote_to_anki
# date: "2023-03-03"
# @raycast.title Simplenote to Anki
# @raycast.author HTLin the 🦎
# @raycast.authorURL https://github.com/htlin222
# @raycast.description Sync to Anki
# @raycast.icon 🔃
# @raycast.mode fullOutput
# @raycast.packageName System
@htlin222
htlin222 / md_to_anki.py
Last active April 5, 2024 05:07
search new markdown recently added, with text ANKI in it. Add to Anki Deck, as a raycast command
# -*- coding: utf-8 -*-
# title: md_to_anki
# date: "2023-05-28"
# @raycast.title Markdown files 🪴 to ANKI
# @raycast.author HTLin the 🦎
# @raycast.description search new markdown recently added, with text ANKI in it. Add to Anki Deck
# @raycast.authorURL https://github.com/htlin222
# @raycast.icon 📚
@htlin222
htlin222 / convert_to_pdf.sh
Created June 12, 2023 15:45
這段程式碼是用來將指定資料夾中的pptx, ppt, doc, docx,將其轉換為 PDF 格式並移動到新資料夾中。
#!/bin/bash
# title: watch_and_convert
# date created: "2023-06-12"
#
# prerequisite: install the LibreOffice first to use the bin soffice
# https://www.libreoffice.org/download/download-libreoffice/
# remember to chmod a+x *.sh
# chose the folder you want
@htlin222
htlin222 / test.md
Created July 26, 2023 16:38
[title] try to create a md file one lepton to gist

123

456

Treatment by Cancer Type and Filename

  • Acute Lymphoblastic Leukemia
    • all
  • Acute Myeloid Leukemia
    • aml
  • Ampullary Adenocarcinoma
    • ampullary
  • Anal Carcinoma
  • anal
@htlin222
htlin222 / python_show_osascript_notification.py
Last active August 25, 2023 20:06
This code displays a notification with the message "Hello, world!" using the OS X notification system.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# title: pytest
# date: "2023-08-26"
# author: Hsieh-Ting Lin, the Lizard 🦎
title = "Hellow"
body = "🦎"
@htlin222
htlin222 / nccn.sh
Last active May 13, 2025 13:48
A shell script to "batch download" the NCCN guideline by Cookie in just one command
#!/bin/bash
# title: download NCCN guideline
# date created: "2023-08-09"
green_color="\033[32m"
reset_color="\033[0m"
today_date=$(date +"%Y-%m-%d")
input_file="nccnlist.txt"
# Check if the input file exists
@htlin222
htlin222 / clipboard_image_to_imgur.py
Created August 28, 2023 16:43
upload clipboard image to imgur and get the return as markdown image syntax
import logging
import os
import subprocess
from pathlib import Path
import pyimgur
import pyperclip
# pip install Pillow
from PIL import ImageGrab
@htlin222
htlin222 / zotero_csv_to_marp_slide.py
Created September 2, 2023 13:29
In zotero, export the collection with note into a CSV file, then run script, which will use Pubmed API to get the abstract, and use chatGPT to convert to bullet points, finally convert to a marp md slide
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# title: getab
# date: "2023-09-02"
# author: Hsieh-Ting Lin, the Lizard 🦎
import re
import subprocess
import sys
import openai