Skip to content

Instantly share code, notes, and snippets.

View dsebastien's full-sized avatar

Sebastien Dubois dsebastien

View GitHub Profile
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
// Configuration
const OUTPUT_DIR = '...'; // Relative path to the folder where landmark notes should be created
const FILE_PREFIX = 'Foo'; // Prefix for the landmark notes filenames
/**
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with BasicAirData GPS Logger for Android - ver. 3.2.3 -->
<!-- Track 2 = 5097 TrackPoints + 4 Placemarks -->
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>GPS Logger 20251104-164542</name>
<description><![CDATA[5097 Trackpoints + 4 Placemarks]]></description>
<Style id="TrackStyle">
<LineStyle>
<color>ff0000ff</color>
use crate::audio_feedback::{play_feedback_sound, SoundType};
use crate::managers::audio::AudioRecordingManager;
use crate::managers::transcription::TranscriptionManager;
use crate::overlay::{show_recording_overlay, show_transcribing_overlay};
use crate::settings::get_settings;
use crate::time_utils::format_timestamp;
use crate::tray::{change_tray_icon, TrayIconState};
use crate::utils;
use crate::ManagedToggleState;
use log::debug;
@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