This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
window.fileDate = app.plugins.getPlugin('nldates-obsidian').parseDate(tp.file.title).moment; | |
window.fileDate = window.fileDate.isValid() ? window.fileDate : moment(); | |
if(fileDate.day()==0) { %> | |
Sunday | |
<%* } else if(fileDate.day()==1) { %>- <%'['%> ] | |
Monday | |
<%* } else if(fileDate.day()==2) { %>- <%'['%> ] | |
Tuesday | |
<%* } else if(fileDate.day()==3) { %>- <%'['%> ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
window.fileDate = app.plugins.getPlugin('nldates-obsidian').parseDate(tp.file.title).moment; | |
window.fileDate = window.fileDate.isValid() ? window.fileDate : moment(); | |
if ( [1,2,3,4,5].includes(fileDate.day()) ) { %> | |
Weekday | |
<%* } else if( [0,6].includes(fileDate.day())) { %> | |
Weekend | |
<%* } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Widget for iOS using the Scriptable app | |
// Uses Readwise API for pulling back random highlights. | |
// This duplicates the Readwise widget, so there is no additional value | |
// I did this as a learning exercize. | |
let accessToken = args.widgetParameter ? args.widgetParameter : "Your token here if you are testing, otherwise add it in the widget" | |
let headers = { "Authorization": "Token " + accessToken }; | |
function getRandomInt(max) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
fastStart = async (filename, delayInSecond) => { | |
if (tp.file.exists(filename)) { | |
const f = tp.file.find_tfile(filename); | |
let plugins = (await app.vault.read(f)).split(/\r?\n/); | |
setTimeout(async () => { | |
plugins.forEach(async (p) => await app.plugins.enablePlugin(p)) | |
}, delayInSecond * 1000) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% Object.values(app.plugins.manifests).map(p=>p.id).sort((a,b)=>a.localeCompare(b)).join('\n') %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
/* | |
Templater script to add commands to the command palette to quickly launch web resources | |
Brought to you by TfT Hacker (https://twitter.com/TfTHacker) | |
Last update: 2022-04-17 | |
Instructions: | |
To add a site: | |
Add a new line with the title of the site and the url to the web page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
// | |
// Script adds a ribbon button and command in the Command palette to open the current document in VS CODE | |
// | |
// Install: | |
// 1. Add this text to a markdown file in your Templater "templates" folder | |
// 2. In templater settings, add the file you created in step 1 to the Startup section of Templater Settings | |
// 4. Restart Obisidan. Now the command should be available in the command palette | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
// | |
// updated: 2022-09-26 | |
// | |
// Script adds a Command Palette command to open a file | |
// | |
// Install: | |
// 1. Add this text to a markdown file in your Templater "templates" folder | |
// 2. In templater settings, add the file you created in step 1 to the Startup section of Templater Settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* See Tweet thread for info on the use of this file: https://twitter.com/TfTHacker/status/1588781787865808897?s=20&t=iDq6L-u4SHnJ5UfN0r7yzQ */ | |
/* I am not a CSS dude, so no promises this is well written CSS */ | |
.nav-folder-title { | |
font-weight: 600 !important; | |
color:steelblue; | |
} | |
[data-path="Teaching"] > .nav-folder-title-content::before { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type Side = 'top' | 'right' | 'bottom' | 'left'; | |
export interface CanvasData { | |
nodes: (CanvasFileData | CanvasTextData | CanvasLinkData)[]; | |
edges: CanvasEdgeData[]; | |
} | |
export interface CanvasNodeData { | |
id: string; | |
x: number; |
OlderNewer