Skip to content

Instantly share code, notes, and snippets.

View dsebastien's full-sized avatar

Sebastien Dubois dsebastien

View GitHub Profile
@dsebastien
dsebastien / Dots.md
Last active September 10, 2025 10:19
OSK v3 Dots System (WIP)

New "Dot" Note Type

I've been a long fan of having everything centralized in my knowledge base. And now my vision of this is getting crystal clear:

Literature notes are for inputs: inspiration, with different stages:

  • You curate information (mindfully choose what to consume, then you prioritize & consume based on goals/projects/tasks/curiosity) (curated note type)
  • You capture highlights (highlights note type)
  • You take notes (literature note note type)

Permanent notes are for outputs: your own ideas, creations, outputs, creations, with different stages:

  • You capture ideas, thoughts, insights, (atomic) notes, ...
@dsebastien
dsebastien / tree.md
Last active August 27, 2025 14:36
OSK v3 Folder Structure
│ │ obsidian-starter-kit/                                                                                            │ │
│ │ ├── 10 Meta                                                                                                      │ │
│ │ │   ├── 11 Personal                                                                                              │ │
│ │ │   ├── 12 Routines                                                                                              │ │
│ │ │   ├── 13 Processes                                                                                             │ │
│ │ │   └── 14 Maintenance                                                                                           │ │
│ │ ├── 20 Actions                                                                                                   │ │
│ │ │   ├── 21 Goals                                                                                                 │ │
│ │ │   ├── 22 Plans                                
@dsebastien
dsebastien / ObsidianBaseFormulaAgeCalculation
Last active August 13, 2025 09:39
Obsidian Base Formula that calculate people's age (current, at death, died x years ago, ...)
if(date_of_birth && !date_of_birth.isEmpty(), if(date_of_death && !date_of_death.isEmpty(),"Died at "+ (if(/\d{4}-\d{2}-\d{2}/.matches(date_of_death.toString()), date(date_of_death),date(date_of_death.toString() + "-01-01")) - if(/\d{4}-\d{2}-\d{2}/.matches(date_of_birth.toString()), date(date_of_birth), date(date_of_birth.toString() + "-01-01"))).years.round() + " (" + (date(now()) - if(/\d{4}-\d{2}-\d{2}/.matches(date_of_death.toString()), date(date_of_death), date(date_of_death.toString() + "-01-01"))).years.round() + " years ago)", (date(now()) - if(/\d{4}-\d{2}-\d{2}/.matches(date_of_birth.toString()), date(date_of_birth), date(date_of_birth.toString() + "-01-01"))).years.round()), "")
@dsebastien
dsebastien / dumpCanvases.js
Created August 12, 2025 13:13
Oneliner that you can paste in the browser's console to find and dump/download all currently loaded Canvas elements
document.querySelectorAll('canvas').forEach((c,i)=>{try{const d=c.toDataURL();console.log(`Canvas ${i+1}: ${c.id||'no-id'} (${c.width}x${c.height})`,d);const a=document.createElement('a');a.download=`canvas_${i+1}_${c.id||'unnamed'}.png`;a.href=d;a.click();}catch(e){console.log(`Canvas ${i+1} error:`,e.message);}});

<%"---"%> energy_level_morning: energy_level_evening: walked: false weight: push_ups: abs: tags:

  • daily_notes
  • daily_notes_<% moment(tp.file.title, "YYYY-MM-DD").format("YYYY") %>
const fs = require('fs');
const path = require('path');
// Input and output file paths
const inputFilePath = process.argv[2]; // First command-line argument
const baseName = path.basename(inputFilePath, path.extname(inputFilePath));
const outputFilePath = path.join(path.dirname(inputFilePath), `${baseName} - YouTube.txt`);
// Check if input file path is provided
if (!inputFilePath) {
# Convert Adobe Premiere Pro chapter markers (CSV) to YouTube timestamps
c2yt() {
# Check if input file is provided
if [ -z "$1" ]; then
echo "Error: Please provide the path to the CSV file"
echo "Usage: process_premiere_markers <path-to-csv>"
return 1
fi
# Check if input file exists
#!/bin/bash
# Requires code2prompt to be installed: https://github.com/mufeedvh/code2prompt
# Requires the fd or fdfind command to be installed. Under Ubuntu: sudo apt install fd-find
## ---------------------------------------------------------------------------------
## INITIALIZATION
## ---------------------------------------------------------------------------------
echo "Updating prompts"
@dsebastien
dsebastien / update_prompts.sh
Created February 14, 2025 14:00
Simple script that uses code2prompt to convert specific folders in my Obsidian vault to a LLM prompts (saved in specific files) that I can then upload to NotebookLM and similar tools
#!/bin/bash
# Requires code2prompt to be installed: https://github.com/mufeedvh/code2prompt
echo "Updating prompts"
echo "Create output directory if it doesn't exist"
mkdir -p "./50 Resources/57 Prompts/"
echo "Generate mega prompt from literature notes"
code2prompt "./30 Areas/32 Literature notes" --include "*.md" --tokens --output="./50 Resources/57 Prompts/Literature notes.md"
// Import required Node.js modules
const fs = require("fs");
const path = require("path");
// Function to format bytes
function formatBytes(bytes, decimals = 2) {
if (!bytes) return '0 Bytes';
const k = 1024;
const dm = decimals < 0 ? 0 : decimals;