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 | |
# This script requires: | |
# - that the directory $HOME/.mpv exist | |
# - that the program socat be installed | |
# - that you start mpv with the unix socket feature pointing at that directory | |
# I recommend an alias in your .bashrc or equivalent file: | |
# alias mpv="mpv --input-unix-socket=$HOME/.mpv/socket" | |
socket="$HOME/.mpv/socket" |
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
import java.io.BufferedOutputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.File; | |
import java.io.Reader; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.StreamTokenizer; |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000