Skip to content

Instantly share code, notes, and snippets.

View pejalo's full-sized avatar

pejalo

View GitHub Profile
@pejalo
pejalo / LoadingThreeDots.svelte
Created August 10, 2023 23:07
Simple loading component showing " ..", ". .", ".. ", repeated every second
<script>
// Note: This is a waste of JavaScipt resources, and will not update nicely
// if you are running heavy computations. Better to use an SVG or CSS.
import { onMount } from "svelte"
const fullString = "..."
let currentString = ""
onMount(() => {
@pejalo
pejalo / sync-report.js
Last active March 26, 2026 08:25
Check that a sync service has synced all files correctly
// check that a cloud sync service has synced all files correctly
// on macOS, run this command on both the source and destination machines:
// find . -type f -print0 | xargs -0 stat -f "%N %z" > FILE_NAME
// then run this script with node.
// helpful command to list all file paths that have non-ascii characters:
// LC_COLLATE=C find . -regex '.*[^ -~].*'
import fs from 'fs'