Append this to your ~/.zshrc file.
function preexec() {
timer=$(($(date +%s%0N)/1000000))| Squeezebox API | |
| -------------- | |
| This document outlines the JSON RPC interface with a squeezeserver to control and obtain information about squeezeboxes. | |
| JSON : JavaScript Object Notation | |
| RPC : Remote Procedure Call | |
| Uses POST requests sent to: | |
| http://<squeezeserver_address>:9000/jsonrpc.js |
| youtube-dl -x --continue --add-metadata --embed-thumbnail --audio-format mp3 --audio-quality 0 --metadata-from-title="%(artist)s - %(title)s" --prefer-ffmpeg -o "%(title)s.%(ext)s" $1 |
| # Extremely basic development setup to serve the current directory at http://localhost:9001 | |
| # Start nginx in this directory with `nginx -p . -c nginx.conf` | |
| # Stop nginx with `nginx -p . -s stop` | |
| events {} | |
| http { | |
| # Serve files with correct mimetypes on OSX | |
| # location may have to be adjusted depending on your OS and nginx install | |
| include /usr/local/etc/nginx/mime.types; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>A simple clock</title> | |
| </head> | |
| <body translate="no" > |