Skip to content

Instantly share code, notes, and snippets.

View Moyf's full-sized avatar

Moy Moyf

  • HangZhou
View GitHub Profile
@Moyf
Moyf / Dataview example.js
Created October 11, 2025 11:47
DV Button Examples
// put me inside ```dataviewjs``` code block
let content = ""
const baseFolder = "PeriodicNote/晨间日记/"
const dateFormat = "M月/M月d日"
const yesterday = baseFolder+dv.func.dateformat(dv.date('yesterday'), dateFormat)
const today = baseFolder+dv.func.dateformat(dv.date('today'), dateFormat)
content += `<a class="internal-link prev-daily elegant-btn ready" href="${yesterday}">🌙昨天</a>`;
@Moyf
Moyf / DaVinci Resolve Scripting Doc.txt
Created September 16, 2025 16:57 — forked from X-Raym/DaVinci Resolve Scripting Doc.txt
DaVinci Resolve Scripting API Doc v20.2
Last Updated: 18 Aug 2025
-------------------------
In this package, you will find a brief introduction to the Scripting API for DaVinci Resolve Studio. Apart from this README.txt file, this package contains folders containing the basic import
modules for scripting access (DaVinciResolve.py) and some representative examples.
From v16.2.0 onwards, the nodeIndex parameters accepted by SetLUT() and SetCDL() are 1-based instead of 0-based, i.e. 1 <= nodeIndex <= total number of nodes.
Overview
--------
As with Blackmagic Fusion scripts, user scripts written in Lua and Python programming languages are supported. By default, scripts can be invoked from the Console window in the Fusion page,
@Moyf
Moyf / Moy-bases-as-list-en.css
Last active August 27, 2025 17:21
Bases - View notes created and modified on the day
/* Bases list style and element hiding */
/* Original idea and most code from: https://discord.com/channels/686053708261228577/716028884885307432/1405933574149898402 */
/* Moy made some adjustments */
.workspace-split.mod-sidedock.mod-right-split .workspace-tabs:not(.mod-top) .bases-view,
.bases-ordered-list,
.bases-embed[alt~="ordered-list"] {
.query-toolbar-item:not(.mod-views) { display: none; }
@Moyf
Moyf / base-Projects-Template.base
Last active November 9, 2025 16:06
A Bases Template for Project Tracking or Task Management
filters:
and:
- "!status.isEmpty()"
formulas:
prog_percent: progress / 100
prog_text: if(formula.prog_percent > 0, (formula.prog_percent * 100).round(), "0") + "%"
prog_bar: if(formula.prog_percent * 10 > 0, "▰".repeat (number(formula.prog_percent * 10))) + if((formula.prog_percent * 10).floor() < 10, "▱▱▱▱▱▱▱▱▱▱".slice( 0, 10 - (formula.prog_percent * 10).floor()), "").toString()
lucide-icon: if(status=="In Progress", "arrow-right".icon(), if(status=="Focus", "flame".icon(), if(status=="On Hold", "pause".icon(), "")))
prog: formula.prog_bar
sortByStatus: |-
/* ! Moy-属性区调整.css */
/* created: 2025-07-31 */
/* v1.0 */
/* ! 加宽 &双栏 */
/* scope 确保只影响中间区域 */
@scope (.workspace-split.mod-root) {
/* 增加宽度 */
@Moyf
Moyf / ConsolideCommandsRunner.js
Last active July 28, 2025 09:15
CCR 多重命令执行者 - 用于整合和管理多个 Obsidian 插件的工具和模板
/**
* @file CCR 多重命令执行者 - 用于整合和管理多个 Obsidian 插件的工具和模板
* (All in One / Consolidate Commands Runner)
*
* @description
* 这个脚本用于集中管理和访问以下 Obsidian 插件的资源:
* - Components:基础组件和脚本
* - Form Flow:表单文件
* - Templater:模板文件
* - QuickAdd:快速添加模板
@Moyf
Moyf / TP-Insert Heading.js
Last active July 9, 2025 05:10
搜索并插入标题链接
<%*
// 这是个用于 Templater 插件的脚本模板吗,请保存到自己的库里,将后缀名修改为 md
const headings = [];
const headingDict = {};
const files = app.vault.getMarkdownFiles();
files.forEach(file => {
let headingsInNote = app.metadataCache.getFileCache(file).headings;
if (headingsInNote) {
@Moyf
Moyf / Moy-Vertical Tabs.css
Last active April 21, 2025 02:48
Obsidian CSS: Vertical Tabs
/* Moy Vertical Tabs.css */
/* 2025-04-14 */
/* Extracted from MicroMike theme: https://github.com/ThisTheThe/MicroMike */
/* More snippets available: https://github.com/ThisTheThe/MicroMike/tree/main/Snippets */
/* Modified by @PandaNoSleep with thanks! */
/* Better experience when used with: */
/* Floating Sidebar: https://forum-zh.obsidian.md/t/topic/32602 */

<%* // 获取编辑器实例 const editor = app.workspace.activeEditor.editor;

// 获取当前行 const cursor = editor.getCursor(); const line = editor.getLine(cursor.line);

// 1. 将普通文本或普通列表转换成未完成的任务 if (!/^[\s]*- [[ x-]]/.test(line)) {

@Moyf
Moyf / Beautified separator style.css
Last active April 24, 2025 16:30
Beautified separator style for Obsidian
/* Moy OB 基础样式调节 */
/* Created: 2025-04-03 */
/* 注释文本变小 */
.cm-comment {
font-size: 0.8em;
opacity: 0.8;
}