Skip to content

Instantly share code, notes, and snippets.

@bigodel
bigodel / literate-ledger.org
Last active May 20, 2024 14:11
Literate Ledger Programming(?) with Org-mode

Literate Ledger Programming(?) with Org-mode

Recently, given the economic hardships presented by the current pandemic, coupled with the fact that I have started making my own money, I have started to keep track of my finances. I have always known that I would use Ledger, the command line account tool, to manage my money. Ledger was created by an Emacs maintainer, which hints to a very good Emacs integration, and indeed =ledger-mode= offers a great environment for editing, reporting and modifying Ledger files. But even though it is a pretty complete major mode, I missed being

@daeh
daeh / asset-helper.py
Last active September 25, 2023 19:04
Obsidian Templater Helper to Insert Clipboard Contents into MD Notes
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Obsidian Templater Helper to Insert Clipboard Contents into MD Notes
Use Templater to control how Obsidian processes images pasted into notes.
N.B. Its functionality would be better as a plugin. This solution is fairly hacky.
Only tested on MacOS with Python 3.8.
Image in clipboard is saved to:
@foeken
foeken / tana.css
Last active November 9, 2023 08:45
/* ==UserStyle==
@name app.tana.inc - 10/21/2022, 9:02:58 PM
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A new userstyle
@author Me
==/UserStyle== */
@-moz-document domain("app.tana.inc") {
:root {
--bulletDiameterInner: 6px;
@hnOsmium0001
hnOsmium0001 / README.md
Created December 8, 2023 06:40
Doom Emacs org-mode CJK separate font

这份配置其实并不怎样。它工作原理是这样的:调用 (buffer-face-mode) 以替换当前buffer的默认face,而org-mode所用的各种face都会从默认face继承font-family。我也不太记得为什么要新建一个fontset而不是直接写 (font-spec :family "Blah") 以得到制定好中文字体的face了,大概和不用fontset没法正确设置ASCII范围字符有关吧。

说实话如果不管你用不用Doom Emacs,都应该直接用 (custom-theme-set-faces) 来直接操作 org-default 这个face,总会比这个方案靠谱一些……