Skip to content

Instantly share code, notes, and snippets.

@paskozdilar
paskozdilar / detect-mp3-bitrate.sh
Last active August 21, 2024 14:14
Detect true mp3 bitrate
#!/usr/bin/env bash
set -euo pipefail
function main() {
# Check for argument
if [ $# -ne 1 ]
then
echo "usage: $0 INFILE"
exit 1
@kosamari
kosamari / _ServiceWorker_for_github_pages.md
Last active March 19, 2025 18:02
ServiceWorker for github pages.

ServiceWorker for github pages

This is a ServiceWorker template to turn small github pages into offline ready app.

Why ?

Whenever I make small tools & toys, I create github repo and make a demo page using github pages (like this one).
Often these "apps" are just an index.html file with all the nessesary CSS and JavaScript in it (or maybe 2-3 html/css/js files). I wanted to cache these files so that I can access my tools offline as well.

Notes

Make sure your github pages have HTTPS enforced, you can check Settings > GitHub Pages > Enforce HTTPS of your repository.