This is an example lil thingy wow look at me!
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 { BaseDirectory, exists } = window.__TAURI__.fs; | |
| async function doesFileExist(fileName) { | |
| let fileExists = await exists(fileName + ".pdf", { | |
| baseDir: BaseDirectory.Download, | |
| }); | |
| let fileCounter = 0; | |
| while (fileExists) { | |
| fileCounter++; |
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 clearInputs() { | |
| let inputs = document.getElementsByTagName("input"); | |
| for (const i of inputs) { | |
| i.value = ""; | |
| } | |
| } |
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
| --- | |
| let { text, posts } = Astro.props; | |
| --- | |
| <astro-link data-posts={posts}> | |
| <a>{text}</a> | |
| </astro-link> | |
| <script> | |
| class AstroLink extends HTMLElement { |
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
| { | |
| "main": | |
| [ | |
| "ESC", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "BACKSPACE", | |
| "PGUP", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", 127, | |
| "ALT", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "\n", | |
| "SHIFT", "z", "x", "c", "v", " ", "b", "n", "m", ",", ".", "PGDN" | |
| ], | |
| "main-shift": |
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
| # Place this file in the folder that you want to edit, and then run `python spaces-to-dashes.py` | |
| import os | |
| def rename_files_and_folders(root_directory): | |
| for dirpath, dirnames, filenames in os.walk(root_directory, topdown=False): | |
| # Rename files | |
| for filename in filenames: | |
| if ' ' in filename: | |
| old_file_path = os.path.join(dirpath, filename) |
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
| "use client"; | |
| import { useState, useEffect, useRef } from "react"; | |
| function SimpleRecordButton() { | |
| const [isRecording, setIsRecording] = useState(false); | |
| const [audioStream, setAudioStream] = useState(null); | |
| const [mediaRecorder, setMediaRecorder] = useState(null); | |
| const [audioBlob, setAudioBlob] = useState(null); | |
| const [recordingTime, setRecordingTime] = useState(0); | |
| const timerRef = useRef(null); |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- | |
| # Pretty Feed | |
| Styles an RSS/Atom feed, making it friendly for humans viewers, and adds a link | |
| to aboutfeeds.com for new user onboarding. See it in action: | |
| https://interconnected.org/home/feed |
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 generateLutFilter(hexColorsToExclude) { | |
| function hexToRgb(hex) { | |
| const bigint = parseInt(hex, 16); | |
| const r = (bigint >> 16) & 255; | |
| const g = (bigint >> 8) & 255; | |
| const b = bigint & 255; | |
| return { r, g, b }; | |
| } | |
| let lutFilter = "lutrgb="; |