Skip to content

Instantly share code, notes, and snippets.

View kkdai's full-sized avatar

Evan Lin kkdai

View GitHub Profile
{
"nodes": [
{
"parameters": {
"content": "## 📡 RSS 來源區\n\n四個 RSS Feed 來源,每小時檢查一次",
"height": 648,
"width": 300,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
@kkdai
kkdai / N8N_DailyLINE_Sender.json
Last active December 26, 2025 03:59
N8N 發送 Google Sheet 的資訊
{
"nodes": [
{
"parameters": {
"content": "## ⏰ 定時觸發\n\n每天早上 6:00 執行",
"height": 264,
"width": 220,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
// Refer https://github.com/kkdai/linebot-video-gcp for more detail.
// Must use "apiv1p1beta1" version to enable support on Chinese and MP3
speech "cloud.google.com/go/speech/apiv1p1beta1" //v1p1beta1
speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1" //v1p1beta1
func (c *ClientUploader) SpeachToText() (error, string) {
ctx := context.Background()
@kkdai
kkdai / git-commit-styleguide.md
Created January 2, 2025 07:29 — forked from rishavpandey43/git-commit-styleguide.md
This gist consist of the rules and best practice of good conventional git commit message

Git Commit Messages Style-Guides

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Reference issues and pull requests liberally after the first line
  • When only changing documentation, include [ci skip] in the commit title
  • Consider starting the commit message with an applicable emoji

Types

ffmpeg -i source.mp4 -vf "subtitles=tw2.srt:force_style='FontName=Arial'" -c:a copy output.mp4
import openai
import argparse
import os
openai.api_key = os.getenv("OPENAI_API_KEY")
def translate_text(text, source_language="ja", target_language="zh"):
response = openai.ChatCompletion.create(
model="gpt-4o-mini",
@kkdai
kkdai / youtubeloader.ipynb
Created October 5, 2024 14:40
YouTubeLoader
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""xml2json.py Convert XML to JSON
Relies on ElementTree for the XML parsing. This is based on
pesterfish.py but uses a different XML->JSON mapping.
The XML->JSON mapping is described at
http://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html
@kkdai
kkdai / gemini-cf.go
Created April 12, 2024 13:16
LINE Bot Cloud Function - demo code in Go
package helloworld
import (
"context"
"fmt"
"net/http"
"io"
"log"
"os"
# package>=version
line-bot-sdk
requests
git+https://github.com/ozgur/python-firebase
google.generativeai