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
| function extractMeetingUrl(location: string): string { | |
| // Check if it's a goo.gl redirect URL with embedded meet.google.com link | |
| if (location.includes("goo.gl") && location.includes("meet.google.com")) { | |
| // Extract the actual meet.google.com URL from the redirect | |
| const meetMatch = location.match(/meet\.google\.com\/[a-z]+-[a-z]+-[a-z]+/i); | |
| if (meetMatch) { | |
| return `https://${meetMatch[0]}`; | |
| } | |
| } | |
| return location; |
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
| { | |
| "$schema": "https://biomejs.dev/schemas/2.3.2/schema.json", | |
| "vcs": { | |
| "enabled": false, | |
| "clientKind": "git", | |
| "useIgnoreFile": false | |
| }, | |
| "files": { | |
| "ignoreUnknown": true | |
| }, |
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
| const version = await $`git describe --tags --always`.text(); | |
| const buildTime = new Date().toISOString(); | |
| const gitCommit = await $`git rev-parse HEAD`.text(); |
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
| function formatDuration(seconds: number): string { | |
| let m = Math. floor (seconds / 60); | |
| let s = seconds % 60; | |
| return `${m}:${s.toString().padStart(2, "0")}`; | |
| } |
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
| <script lang="ts"> | |
| import { scale } from 'svelte/transition'; | |
| let hoveredIndex = $state(null as number | null); | |
| let selected = $state(null as number | null); | |
| // Create an array of years from 1993 to 2024 | |
| let YEARS = Array.from({ length: 2024 - 1993 + 1 }, (_, i) => 2024 - i); | |
| let handleMouseEnter = (index: number) => { |
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 Options = { | |
| /** The time before the copied status is reset. */ | |
| delay: number; | |
| /** Whether to reset the copied status after a delay. */ | |
| reset: boolean; | |
| }; | |
| /** Use this hook to copy text to the clipboard and show a copied state. | |
| * | |
| * ## Usage |
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 { FFmpeg } from '@ffmpeg/ffmpeg'; | |
| import { toBlobURL } from '@ffmpeg/util'; | |
| let ffmpeg: FFmpeg | null = null; | |
| export const initFFmpeg = async (): Promise<FFmpeg> => { | |
| if (ffmpeg) return ffmpeg; | |
| ffmpeg = new FFmpeg(); | |
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
| export async function getStars(): Promise<string> { | |
| try { | |
| const res = await fetch( | |
| "https://api.github.com/repos/milksense/milksense", | |
| { | |
| next: { revalidate: 3600 }, | |
| } | |
| ); | |
| if (!res.ok) { |
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
| <script lang="ts"> | |
| import { dev } from "$app/environment"; | |
| </script> | |
| {#if dev} | |
| <div | |
| data-tailwind-indicator="" | |
| class="fixed bottom-1 left-1 z-50 flex h-6 w-6 items-center justify-center rounded-full bg-gray-800 p-3 font-mono text-xs text-white" | |
| > | |
| <div class="block sm:hidden">xs</div> |
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 TODO = any |
NewerOlder