Skip to content

Instantly share code, notes, and snippets.

View TfTHacker's full-sized avatar

TfTHacker

View GitHub Profile
@TakuanPickle
TakuanPickle / Vocab Note Workflow.md
Last active October 14, 2023 21:53
A sample workflow for creating links to vocabulary notes in a transcription with prompts for fields.

Vocab Note Workflow

I created a quick way to make flashcards and vocab notes for my Japanese learning. I had been struggling with how slow making Anki cards can be and found myself more likely to actually review cards if they were all in Obisidian, which I always have open, rather than opening Anki.

Required Plugins

  1. Templater
  2. QuickAdd
  3. Spaced Repetition
  4. Dataview
  5. Supercharged Links (Optional)
@GitMurf
GitMurf / obsidian.live-preview.css.block-ref-inline.css
Last active July 14, 2024 16:47
CSS for inline block references that works for both NEW CM6 Live Preview and also Preview Mode for both CM5 (Legacy) and CM6 (New)
:root {
/* #7159de (similar to Obsidian purple) */
--block-ref-line-color: grey;
--block-ref-line-type: solid;
--block-ref-line-size: 2px;
/* Set to "inherit" for no bg color */
--block-ref-hover-bg-color: #d4d0d026;
}
/*
@GitMurf
GitMurf / obsidian.templater.nlp-date-input.js
Created April 22, 2021 19:04
Requires @argenos Natural Language Dates Plugin. Pop up input box asks for date and then parses it as a date and turns it into a [[Daily Notes Page]] page ref.
<%*
//v1.0
let dueDateStr = await tp.system.prompt("Due Date");
let parseResult;
let parseResultLink;
if(dueDateStr) {
let nlDatesPlugin = this.app.plugins.getPlugin('nldates-obsidian');
parseResult = nlDatesPlugin.parseDate(dueDateStr);
if(parseResult){parseResultLink = '[' + '[' + parseResult.formattedString + ']]';}
@GitMurf
GitMurf / obsidian.templater.quick-capture.js
Last active September 12, 2024 10:28
Obsidian Quick Capture using templater. Activate from anywhere in your vault to record quick ideas, notes, time logging, etc. The Quick Capture file does NOT need to be open.
<%*
//v1.4: Adding option for including a header for each DNP day to fold
//'first' will add to top of file. 'last' will add to bottom of file
let firstOrLastLine = 'first';
//Name of the Quick Capture file. Do NOT include extension '.md'
let qcFileName = 'Quick Capture';
//Leave this blank if you want to use the default file path location (set to '/' to use root of vault)
@azlen
azlen / bulletpaths.js
Last active August 16, 2024 03:55
All Paths Lead to Roam
/*
* credit to Dhrumil Shah (@wandcrafting) and Robert Haisfield (@RobertHaisfield)
* for the original concept which was part of their RoamGames submission
* and can be found at: https://www.figma.com/file/5shwLdUCHxSaPNEO7pazbe/
*
*/
/* ======= OPTIONS ======== */
/* note: if you change these, reload the page to see the effect */
@GitMurf
GitMurf / attr-table-filters.js
Last active June 13, 2023 03:16
Filtering attribute tables
/*
****************************************************************************************
****************************************************************************************
****************************************************************************************
NOW HOSTING CODE VIA MY MAIN GITHUB REPOSITORY FOR ROAM SO THAT USERS CAN LINK DIRECTLY TO THE CODE AND AUTO UPDATE
GO HERE FOR INSTALLATION INSTRUCTIONS: https://github.com/GitMurf/roam-javascript#installation
****************************************************************************************
@jlongtine
jlongtine / README.md
Last active November 28, 2020 08:18
youtube-timestamp.ts

You can add this to Roam using {{[[roam/js]]}}

Grab the code in youtube-timestamps.js and drop it in a javascript code block:

  ```javascript```

You can have timestamps at the beginning of any nested block. H:MM:SS

You can use the ctrl+shift+y hotkey (currently assumes you have Roam42 installed, let me know if you'd prefer I drop that requirement) to grab the current timestamp of the video you're cursor is nested under and add it to the beginning of your block.

@dkapila
dkapila / roam_back_forward_navigation.js
Last active September 29, 2020 00:02
Adds back forward buttons in Roam - useful when using it as an app
;(function () {
// Don't show navigation controls on mobile
if(/Android|iPhone/i.test(navigator.userAgent)){
return;
}
// Only show navigation controls when using Roam in app mode
if ((window.navigator.standalone == true) || (window.matchMedia('(display-mode: standalone)').matches)) {
const navigation_controls = document.createElement("div");
navigation_controls.id = 'roam-navigation-controls';
@thesved
thesved / roam-open-page-in-sidebar.js
Last active February 20, 2023 21:24
Open a page in Roam's sidebar POC
/*
* Open a page in Roam's sidebar POC, h/t @dvargas92495
* version: 0.4 Mutation Observer, returns Promise
* author: @ViktorTabori
* use: await openPageSidebar("Page Title")
*/
openPageSidebar = (function(){
var observer,
doLog = true, // console.log
running = false, // status;