Skip to content

Instantly share code, notes, and snippets.

View dsebastien's full-sized avatar

Sebastien Dubois dsebastien

View GitHub Profile
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;

<%* const dv = app.plugins.plugins["dataview"].api;

const statsFilePath = "50 Resources/56 Obsidian Publish/Stats";

// Constants for calculations const WORDS_PER_MINUTE = 250; // Average reading speed const WORDS_PER_BOOK = 90000; // Average book length

// Important tags to track

# Configuration
$ignoredPaths = @(
".git",
".stversions",
".obsidian\plugins\obsidian-icon-folder\icons"
)
# Get current timestamp for zip name
$timestamp = Get-Date -Format "yyyy_MM_dd-HH_mm_ss"
$zipName = "Seb-Backup-$timestamp.zip"
energy_level_morning energy_level_evening walked tags
5
true
daily_notes
daily_notes_2025

2025-01-21 - Tuesday

@dsebastien
dsebastien / stats.html
Created January 20, 2025 08:26
Knowledge Base Stats
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Knowledge Base Stats</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
</head>
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ws.<YOUR_DOMAIN>;
server_tokens off;
# FORGE SSL (DO NOT REMOVE!)
ssl_certificate /etc/nginx/ssl/<YOUR_DOMAIN>/<certificate id>/server.crt;
ssl_certificate_key /etc/nginx/ssl/<YOUR_DOMAIN>/<certificate id>/server.key;