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 cargo +nightly -Zscript --quiet | |
| --- | |
| [package] | |
| edition = "2024" | |
| [dependencies] | |
| oci-client = { version = "0.14.0" } | |
| tokio = { version = "1", features = ["rt", "net", "macros", "fs", "process"] } | |
| serde = { version = "1.0" } | |
| serde_json = { version = "1.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
| esphome: | |
| name: airgradient | |
| name_add_mac_suffix: true | |
| platform: ESP8266 | |
| board: d1_mini | |
| # Enable logging | |
| logger: | |
| wifi: |
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
| # adapted from https://stackoverflow.com/a/23741934/371128 | |
| tell application "System Events" to tell process "SystemUIServer" | |
| tell (menu bar item 1 of menu bar 1 whose description is "text input") | |
| # !! Sadly, we must *visibly* select (open) the text-input menu-bar extra in order to | |
| # !! populate its menu with the available input sources. | |
| click | |
| tell menu 1 | |
| # I only have two input methods, so selecting the first that isn't active toggles them | |
| click (first menu item whose value of attribute "AXMenuItemMarkChar" is not "✓") | |
| end tell |
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
| # without -c:{vas} copy, ffmpeg would remux the whole file, | |
| # but since we just want to change metadata, a simple copy is enough | |
| ffmpeg -i "$input" -metadata title="$new_name" -c:v copy -c:a copy -c:s copy "$output" |
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
| #!/bin/bash | |
| grep -o -P "<a[^<>]+href=\"[^\"]+\"[^<>]*>" | grep -o -P "http[^\"]+" |