Skip to content

Instantly share code, notes, and snippets.

View ldenoue's full-sized avatar
🏔️

Laurent Denoue ldenoue

🏔️
View GitHub Profile
enter recovery mode on your Mac: restart and hold Cmd R
open Utilities -> Terminal
in the terminal, type: `csrutil disable`
restart your Mac
open a Terminal window and type: `systemextensionsctl list`
It will show something like:
```
1 extension(s)
--- com.apple.system_extension.cmio
@ldenoue
ldenoue / ContentView.swift
Created July 6, 2024 09:10
How to detect which mouse button is pressed over a SwiftUI button
struct ContentView: View {
@State private var localMonitor: Any?
@State var hovering = false
@State var mouseButton = -1
var body: some View {
Text("Mouse button")
Button(mouseButton > 1 ? "Button\(mouseButton)" : "Configure") {
}
.foregroundColor(.blue)
.frame(width: 96)
@ldenoue
ldenoue / getYouTubeStreams.js
Created December 28, 2024 16:58
Getting playable YouTube streams from the browser
/* get playable urls from any YouTube video in the browser (no CORS issues) */
const videoId='tEzs3VHyBDM';
const payload = {
videoId,
context: {
client: {
hl: "en",
clientName: "iOS",
clientVersion: "19.45.4"
@ldenoue
ldenoue / gist:e0440834cb3c894874f8f3a89c33066a
Created June 18, 2025 15:52
livekit/turn-detector test
import os
import onnxruntime as ort
import numpy as np
from transformers import AutoTokenizer
from huggingface_hub import hf_hub_download, errors
# Constants
HG_MODEL = "livekit/turn-detector"
ONNX_FILENAME = "model_q8.onnx"
MODEL_REVISION = "v1.2.0"
@ldenoue
ldenoue / CookieConsent.vue
Last active August 2, 2025 17:47
CookieConsent using Shadcn-vue
<script setup lang="ts">
import { ref, onMounted, watch, computed } from 'vue'
import { Button } from '@/components/ui/button'
// Default prop values
const props = defineProps({
variant: { default: 'default' },
demo: { default: false },
description: {
default:
'We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.',
@ldenoue
ldenoue / print-gemini-storybook.js
Created August 8, 2025 10:24
Printable Gemini Storybook
const title = document.querySelector('.cover-title').textContent
const w = window.open('','_blank')
const doc = w.document
doc.open()
doc.title = title
const body = doc.createElement('body')
doc.appendChild(body)
const divStyle = 'padding: 16pt; box-sizing: border-box; font: 22pt serif'
const div = doc.createElement('div')
div.style = divStyle
@ldenoue
ldenoue / scribe-ai-chapters-youtube-transcripts.md
Last active November 2, 2025 00:33
Bringing AI Chapters to the Browser: How Scribe Segments YouTube Transcripts with Local Models

Bringing AI Chapters to the Browser: How Scribe Segments YouTube Transcripts with Local Models

One of the newest features in Scribe, my instant YouTube transcript web app, is AI-generated chapters and what makes it special is that the entire process runs locally, inside your browser.
No API calls, no server inference, just pure on-device intelligence powered by Transformers.js from Xenova and Hugging Face.

Why local AI?

Running locally offers three big wins:

  1. Privacy: your transcript text never leaves your computer.
  2. Speed: chapters are generated instantly, without waiting on a server round trip.
  3. Scalability: there’s no backend load — everything happens on the client side.