A script to sync activities *.FIT from my Garmin smartwatch.
deno run https://gist.githubusercontent.com/lpenaud/4bc8dce6c69d80a3a65bf4c59b4c4e5a/raw/activity.ts INDIR OUTDIR| #!/bin/bash | |
| if [ $# -ne 3 ]; then | |
| printf "Usage: %s LIST INFILE OUTDIR\n" "${0}" | |
| exit 1 | |
| fi | |
| function add_seconds () { | |
| echo $(( $1 + $2 )) | |
| } |
| #!/bin/bash | |
| if [ $# -eq 0 ]; then | |
| printf "Usage: %s INDIR [...INDIRS]\n" "${0}" >&2 | |
| exit 1 | |
| fi | |
| # track | |
| function get_mimetype () { | |
| local line |
| import { CsvParseStream } from "https://deno.land/[email protected]/csv/mod.ts"; | |
| export interface RadioSearchOptions { | |
| hidebroken?: boolean; | |
| order?: "clickcount"; | |
| reverse?: boolean; | |
| language?: string; | |
| tagList?: string; | |
| codec?: string; | |
| limit?: number; |
| #!/usr/bin/env -S deno run --allow-read --allow-write | |
| import { | |
| walk, | |
| type WalkEntry, | |
| type WalkOptions, | |
| } from "https://deno.land/[email protected]/fs/walk.ts"; | |
| import * as path from "https://deno.land/[email protected]/path/mod.ts"; | |
| async function* multiWalk(roots: string[], options?: WalkOptions) { | |
| for (const root of roots) { |
| #!/usr/bin/env -S deno run --allow-read --allow-write | |
| import { walk } from "https://deno.land/[email protected]/fs/walk.ts"; | |
| import * as cli from "https://deno.land/[email protected]/cli/mod.ts"; | |
| import * as path from "https://deno.land/[email protected]/path/mod.ts"; | |
| interface UnixFilesystemOptions { | |
| uid: number | null; | |
| gid: number | null; | |
| filemod: number; | |
| dirmod: number; |
| <script type="module"> | |
| import mermaid from 'https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.esm.min.mjs'; | |
| mermaid.initialize({ startOnLoad: false }); | |
| await mermaid.run({ | |
| nodes: document.querySelectorAll('pre.mermaid > code:first-child'), | |
| }); | |
| function findMermaidSvg(child) { | |
| if (child.tagName === "A" || child.tagName === "BUTTON") { | |
| return null; |