This file contains 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 fish | |
set lat "53.350140" | |
set lon "-6.266155" | |
set url "https://api.met.no/weatherapi/locationforecast/2.0/classic?lat=$lat;lon=$lon" | |
set point_per_mm 10 | |
function parse | |
jq -r \ | |
--argjson start (date -d (date -u +"%Y-%m-%dT%H:00:00Z") +%s) \ |
This file contains 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 fish | |
if ! test (count $argv) -eq 2 | |
echo 'usage: find /path/to/music -type f \( -name \'*.mp3\' -o -name \'*.flac\' \) | ./last-fm-to-gonic USER API_KEY >/gonic/playlists/<user>/lastfm.m3u' >&2 | |
exit 1 | |
end | |
set user $argv[1] | |
set api_key $argv[2] | |
set per_page 100 |
This file contains 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 bash | |
URL="https:\/\/notes-extensions.$DOMAIN" | |
ORG='joe' | |
EXT_DIR='exts_data' | |
curl -s "https://api.github.com/orgs/sn-extensions/repos?page=1&per_page=100" \ | |
| jq -r '.[].git_url' \ | |
| grep -E '\/[a-z]+\-[^\/]*.git$' \ | |
| xargs -L 1 git -C "$EXT_DIR" submodule add --depth 1 |
This file contains 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 python3 | |
import sys | |
if not sys.argv[1:] or len(sys.argv[1]) < 5: | |
print('please provide a 5+ letter word', file=sys.stderr) | |
sys.exit(1) | |
word = sys.argv[1].upper() |