Skip to content

Instantly share code, notes, and snippets.

View Benature's full-sized avatar
🎯
Focusing

Benature Wong Benature

🎯
Focusing
View GitHub Profile
# Get Word Count from Tagged Pages
## Search Tag
tagToSearchFor:: anotherTag
^ This inline metadata field is used as the tag that dataview searches the vault for. Write the name of the tag without the hash in front or `null` for all pages in your vault. You can use MetaEdit to change search term in preview mode. Search by other fields soon to come!
---
@jrjhealey
jrjhealey / PythonColours.py
Last active April 4, 2024 01:03
Basics of python string colouring with ANSI codes
#Copy to a script and run in a terminal to see the codes and their results (this is not an exhaustive list)
print("\033[0;37;40m Normal text\n")
print("\033[2;37;40m Underlined text\033[0;37;40m \n")
print("\033[1;37;40m Bright Colour\033[0;37;40m \n")
print("\033[3;37;40m Negative Colour\033[0;37;40m \n")
print("\033[5;37;40m Negative Colour\033[0;37;40m\n")
print("\033[1;37;40m \033[2;37:40m TextColour BlackBackground TextColour GreyBackground WhiteText ColouredBackground\033[0;37;40m\n")
print("\033[1;30;40m Dark Gray \033[0m 1;30;40m \033[0;30;47m Black \033[0m 0;30;47m \033[0;37;41m Black \033[0m 0;37;41m")
print("\033[1;31;40m Bright Red \033[0m 1;31;40m \033[0;31;47m Red \033[0m 0;31;47m \033[0;37;42m Black \033[0m 0;37;42m")