Skip to content

Instantly share code, notes, and snippets.

@raisabel
raisabel / YAGPDB Discord Poll Announcement, Voter Ping, and Poll Thread Discussion Redirect.tmpl
Last active August 27, 2025 17:42
Discord YAGPDB custom code that sends a notice in the channel whenever someone creates a new poll. It also pings users with a certain role and directs discussion to a designated poll thread
{{$votersRole := <insert role id here>}}
{{$pollChannel := .Channel.ID}}
{{$pollThread := <insert thread id here>}}
{{if and (not .Message.Type) (not .Message.Attachments) (not .Message.Content) (not .Message.StickerItems) (not .Message.MessageSnapshots)}}
{{$annID := sendMessageRetID $pollChannel
(complexMessage
"allowed_mentions" (sdict
"parse" (cslice "roles")
"replied_user" false
@raisabel
raisabel / YAGPDB Discord Forward Notice and Credits
Last active August 4, 2025 23:27
Discord YAGPDB custom code that sends a notice in the origin channel whenever a message has been forwarded to a different channel within the server. Useful for smooth transition to a different channel when discussion gets off-topic. Then, in the destination channel, info on who made the original message is sent.
{{/*Check if a message has been forwarded*/}}
{{if .Message.MessageSnapshots}}
{{/*Gather original message and author info*/}}
{{$origMessageID := .Message.MessageReference.MessageID}}
{{$originChannelID := .Message.MessageReference.ChannelID}}
{{$destinationChannelID := .Message.ChannelID}}
{{$newMessageLink := .Message.Link}}
{{$origMessageObj := getMessage $originChannelID $origMessageID}}
@raisabel
raisabel / Obsidian hierarchical folder font sizes
Last active August 4, 2025 23:26
Top-level folder names in Obsidian’s File Explorer are set to bold with an 18px font size, while second-level folders are set to 16px
.nav-files-container > div > .tree-item.nav-folder > .nav-folder-title {
font-size: 18px;
font-weight: bold;
}
.nav-files-container > div > .tree-item.nav-folder > .tree-item-children > div > .nav-folder-title {
font-size: 16px;
}
@raisabel
raisabel / obsidianmd-cardview.css
Last active July 12, 2025 19:15
View Obsidian notes as cards. Add the cssclass rsbl_cardview to the note’s frontmatter to enable card view on source mode and live preview. Card body zooms in/out when font size increases/decreases. [Tested up to Obsidian 1.8.10]
.rsbl_cardview {
--card-width: 42em; /*adjust this size for narrower or wider cards*/
--card-height: 28em; /*adjust this size for longer or shorter cards*/
/*unit has to be in em so that the card body will also grow/shrink when user increases/decreases font size*/
}
/*Card Background*/
.mod-cm6.rsbl_cardview {
background-color: var(--background-secondary);