Skip to content

Instantly share code, notes, and snippets.

@falcon0125
falcon0125 / gist:e91e27076c9c0d086e13d2a9df2b63ac
Created June 16, 2025 14:11
Google AI studio : Subtitle prompt
產生如底下範例的vtt檔 ,每句不要超過20個字,
中文的字幕 當沒有在講話的時候,簡單描述影片的內容
分別產生繁體中文,英文,日文的字幕檔
```
WEBVTT
00:00:00.270 --> 00:00:02.270
歡迎來到出一支嘴
00:00:02.820 --> 00:05.620
@falcon0125
falcon0125 / booklet
Last active October 15, 2022 02:47
顯示放射線專科醫師教育積分
javascript:(
document.querySelectorAll(".event").forEach(x => {
var a = x.querySelector("a");
var url = a.href;
fetch(url)
.then(function (response) {
return response.text();
})
.then(function (html) {
var parser = new DOMParser();
@falcon0125
falcon0125 / SNZB01.yaml
Last active September 30, 2022 16:26
zigbee2mqtt - Sonoff Wireless Remote Switch (1 Button) SNZB-01
blueprint:
name: zigbee2mqtt - Sonoff Wireless Remote Switch (1 Button) SNZB-01
description: 'Supported actions: single, double and long press.'
source_url: 'https://gist.github.com/falcon0125/1b3b300d75b05150da73758d6ca0d461'
domain: automation
input:
remote:
name: Remote
description: SNZB-01 via zigbee2mqtt
selector:
@falcon0125
falcon0125 / zigbee2mqtt-WXKG07LM.yaml
Last active September 18, 2022 13:58
Aqara D1 Wireless Remote Switch (WXKG07LM), home assistant, zigbee2mqtt
blueprint:
name: zigbee2mqtt - Aqara D1 Wireless Remote Switch (2 Button)
description: 'Supported actions: single, double and long press.'
source_url: https://gist.github.com/falcon0125/fba88a5aef9f7fff2567fb593d614ca9
domain: automation
input:
remote:
name: Remote
description: Aqara D1 remote to use, zigbee2mqtt use XXX_action as name of the entity
selector:
@falcon0125
falcon0125 / statdx.js
Last active July 20, 2021 06:14
StatDx better print
javascript:document.querySelectorAll("#imageGroups > div > img").forEach(function(e){e.src = e.src.replace(/thumbnail\//,'').replace(/\?.*/,''); e.style['width']='512px'});
document.querySelectorAll(".print").forEach(e=> e.style['width']='auto');
a = document.querySelectorAll("#imageGroups > div");
a.forEach(e=> e.style['width']='512px');
a.forEach(e=> e.style['margin']='20px');
document.querySelectorAll("*").forEach(e=> e.style.setProperty('color','#AAA','important'));
document.querySelectorAll("*").forEach(e=> e.style.setProperty('background','#222','important'));
document.querySelectorAll("*").forEach(e=> e.style.setProperty('font-size','18pt'));
document.querySelectorAll("*").forEach(e=> e.style.setProperty('line-height','125%','important'));
document.querySelectorAll("*").forEach(e=> e.style.setProperty('font-family','cambria','important'));