Skip to content

Instantly share code, notes, and snippets.

View twinsant's full-sized avatar
💭
Coding

Atman An twinsant

💭
Coding
View GitHub Profile
@twinsant
twinsant / wechat_chatroom_prompt_template.md
Created February 19, 2025 05:07
微信群消息总结提示词模板

您是一位专业的中文群聊总结助手,专门负责分析和总结微信群聊记录。您的主要任务是从繁杂的群聊中提取关键信息,生成一份全面、简洁且易读的群聊报告。这份报告旨在帮助群成员快速了解当天的主要讨论内容,不错过重要信息。

请仔细阅读提供的微信群聊记录,并按照以下详细指南创建一份高质量的今日群聊总结报告:

  1. 报告标题: "群聊精华总结"

  2. 重要提醒(如果有):

  • 在报告最上方,使用"❗️重要提醒"标注任何置顶或 @所有人 这种需要所有成员注意的信息
  • 简明扼要地陈述提醒内容,确保醒目
@gauravpan
gauravpan / extension-mongodb.ts
Created July 8, 2023 10:22
Mongodb database extension for hocuspocus server
import { Database, DatabaseConfiguration } from '@hocuspocus/extension-database'
import { Binary, Db, MongoClient } from 'mongodb';
const url = 'mongodb://localhost:27017';
const database = 'hocuspocus';
export interface MongoConfiguration extends DatabaseConfiguration {
database: string,
url: string,
}
@BAProductions
BAProductions / SwiftUIWebView.swift
Last active April 4, 2023 12:41
SwiftUI Wrapper WKWebView works, But still think it can be better optmize if anyone wants optmize better feel free to do so.
//
// webview.swift
// BR
//
// Created by BAproductions on 8/12/22.
//
import SwiftUI
import WebKit
import Combine
@AKosmachyov
AKosmachyov / Player-MVVM-SwiftUI.md
Last active February 10, 2024 18:21
SwiftUI + Combine. Sync Slider & AVPlayer states. MVVM
@twinsant
twinsant / ts.py
Created November 2, 2021 03:22
Alfred Workflows: Timestamp
import sys
import time
from datetime import datetime
query = "{query}"
ts = float(query)
if ts > time.time():
ts = ts/1000
dt = datetime.fromtimestamp(ts)
// Authorize the usage
CMHeadphoneMotionManager.authorizationStatus()
//Initialize the manager and set the delegate
let motionManager = CMHeadphoneMotionManager()
motionManager.delegate = self
//Start tracking (simplified)
//Implement the device motion handler callback to receive motion data
if !motionManager.isDeviceMotionActive {
@jz709u
jz709u / Calendar.swift
Last active March 2, 2023 03:41 — forked from mecid/Calendar.swift
SwiftUI Calendar view using LazyVGrid
import SwiftUI
fileprivate extension DateFormatter {
static var month: DateFormatter {
let formatter = DateFormatter()
formatter.dateFormat = "MMMM"
return formatter
}
static var monthAndYear: DateFormatter {
@jpcaparas
jpcaparas / script.js
Last active December 16, 2024 23:54
Tampermonkey: Load an external script and CSS
// ==UserScript==
// @name HackerNews
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://news.ycombinator.com/
// @require https://bennettfeely.com/ztext/js/ztext.min.js
// @resource REMOTE_CSS http://127.0.0.1:8080/style.css
// @grant GM_xmlhttpRequest
@jmurphyau
jmurphyau / download.sh
Created February 9, 2020 22:47
Download HLS Stream with FFmpeg
#this
ffmpeg -loglevel debug -f hls -referer 'https://10play.com.au/live' -user_agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/82.0.4050.0 Safari/537.36' -f hls -i "https://manifest.prod.boltdns.net/manifest/v1/hls/v4/aes128/2199827728001/6bd7fe89-1f2f-42d0-b7a5-c676791a0d83/10s/master.m3u8?fastly_token=NWUzZDliOGZfNTJhZjJhN2IxMzQ5OTdjNGVkYmEzODkwNjYwZTYyMWY2ZmY1YjNmNGJkNWM3NjdiNDFiZmViNjczNzMwMmJlYQ%3D%3D" -c copy project5.mp4
# or this
ffmpeg -loglevel debug -f hls -referer 'https://10play.com.au/live' -user_agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/82.0.4050.0 Safari/537.36' -f hls -i "https://manifest.prod.boltdns.net/manifest/v1/hls/v4/aes128/2199827728001/6bd7fe89-1f2f-42d0-b7a5-c676791a0d83/10s/master.m3u8?fastly_token=NWUzZDliOGZfNTJhZjJhN2IxMzQ5OTdjNGVkYmEzODkwNjYwZTYyMWY2ZmY1YjNmNGJkNWM3NjdiNDFiZmViNjczNzMwMmJlYQ%3D%3D" -c copy -bsf:a aac_adtstoasc project3.mp4
ssh [email protected] -L <ANY_AVAILABLE_PORT_YOU_FANCY>:127.0.0.1:39017 -N