This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S python3 | |
| from pathlib import Path | |
| import subprocess | |
| import json | |
| import sys | |
| import tempfile | |
| import argparse | |
| import logging | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # dependencies = ["srt", "httpx"] | |
| # /// | |
| import argparse | |
| from concurrent.futures import ThreadPoolExecutor | |
| import json | |
| import logging | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # dependencies = ["httpx", "srt"] | |
| # /// | |
| """ | |
| # Whisper Subtitles | |
| This script generates SRT subtitles for audio or video files using the OpenAI Whisper API. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Cet ci pi ti</title> | |
| <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> | |
| <style> | |
| :root { | |
| /* Light theme variables */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Cocoa | |
| import WebKit | |
| struct Options { | |
| var html: String = "" | |
| var url: URL? = nil | |
| var title: String = "HTML Viewer" | |
| var width: CGFloat = 800 | |
| var height: CGFloat = 600 | |
| var env: String = "{}" // Default empty JSON object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Cocoa | |
| import CoreGraphics | |
| @_silgen_name("CGSMainConnectionID") | |
| func CGSMainConnectionID() -> CGSConnection | |
| @_silgen_name("CGSCopyManagedDisplaySpaces") | |
| func CGSCopyManagedDisplaySpaces(_ connection: CGSConnection) -> CFArray | |
| typealias CGSConnection = UInt32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net" | |
| "net/http" | |
| "os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import http.server | |
| import socketserver | |
| import threading | |
| import urllib.parse | |
| def wait_for_oauth_callback(port: int = 9090) -> str: | |
| code: str | None = None | |
| class CallbackHandler(http.server.SimpleHTTPRequestHandler): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Subscriber struct { | |
| send chan string | |
| } | |
| type Hub struct { | |
| clients map[*Subscriber]bool | |
| broadcast chan string | |
| register chan *Subscriber | |
| unregister chan *Subscriber | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.IdentityModel.Tokens.Jwt; | |
| using System.Threading.Tasks; | |
| using Microsoft.Extensions.Caching.Memory; | |
| namespace JwtUtils | |
| { | |
| public interface IJwtCache | |
| { | |
| void Set(string key, JwtSecurityToken token); |
NewerOlder