Skip to content

Instantly share code, notes, and snippets.

@umputun
umputun / safari-summary.sh
Last active April 25, 2024 01:49
Raycast script for Safari's page summary
#!/bin/sh
# @raycast.schemaVersion 1
# @raycast.title Summarize Safari page
# @raycast.mode fullOutput
#
# Optional parameters:
# @raycast.icon ✨
#
# @raycast.packageName Things
@umputun
umputun / dk.sh
Created April 29, 2021 18:01
attach to scratch-based (running) container
#!/bin/sh
docker run -d --rm --name=bbox busybox:latest sleep 10 1>/dev/null 2>/dev/null
docker cp bbox:/bin/busybox .
docker cp ./busybox "$1":/busybox
rm -f ./busybox
docker exec -u 0 -it "$1" /busybox sh -c '
export PATH="/busybin:$PATH"
/busybox mkdir /busybin 2>/dev/null
@umputun
umputun / pi-radio-mpd.py
Last active October 7, 2018 21:28
pi-radio-mpd - my simple wrapper for mpd to serve rest/json kind of api. working just fine on my RPi.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import web, json, time, mpd, collections
STATIONS = {
"FoxNews" : "mmsh://209.107.209.181:80/D/138/13873/v0001/reflector:24137?MSWMExt=.asf",
"Classic" : "http://radio02-cn03.akadostream.ru:8100/classic128.mp3",
"Jazz": "http://streaming208.radionomy.com:80/A-JAZZ-FM-WEB"
}