Linux installation notes (tested under Ubuntu 14.04LTS/12.04LTS), assuming VirtualBox is already installed on host.
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
export DISPLAY=:0 | |
firefox http://tv.youtube.com & | |
sleep 5 | |
xdotool key F11 |
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
#!/bin/bash | |
#asuming you hace a ~/playlists directory dedicated for this purpose | |
cd ~/ | |
rm -rf ~/playlists/* && find ~/ -name '*.mp3' | while read line ; do fn=$(echo ${line%/*}|md5sum | cut -d ' ' -f 1); [ ! -f "playlists/$fn.m3u" ] && echo "#EXTM3U" >>"playlists/$fn.m3u";echo $line>>"playlists/$fn.m3u"; done |
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
#!/bin/bash | |
websocketd /usr/bin/mplayer -volume 99 http://imagine.1stepstream.com:8000/aac -ao alsa:device=hw& | |
echo $!> /tmp/pidofmplayerserver |
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
#track all (write sys call) output but clear from system call functions(only the text in quotes) | |
strace -p$(pgrep mplayer |head -n1 ) -s9999 -e write 2>&1 |grep -Po '".*?"' | |
#track volume changes | |
strace -p$(pgrep mplayer |head -n1 ) -s9999 -e write 2>&1 |grep -Po 'KVolume.*? %' | |
#track information and volume changes | |
strace -p$(pgrep mplayer |head -n1 ) -s9999 -e write 2>&1 |grep -Po 'KVolume.*? %|Title:.*?\\n|Album:.*?\\n|Year:.*?\\n|Track:.*?\\n' | |
#or | |
strace -p$(pgrep mplayer |head -n1 ) -s9999 -e write 2>&1 |grep -Po 'KVolume.*?\\n|Title:.*?\\n|Album:.*?\\n|Year:.*?\\n|Track:.*?\\n' | |
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
websocketd strace -p$(pgrep mplayer |head -n1 ) -s9999 -e write 2>&1 |grep -Po 'KVolume.*?\\n|Title:.*?\\n|Album:.*?\\n|Year:.*?\\n|Track:.*?\\n' |
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
sudo mplayer -ao alsa:device=hw -af equalizer=0:0:0:0:0:0:0:0:0:0 -volume 60 http://imagine.1stepstream.com:8000/aac| while IFS= read -r line; do echo $line |grep -Po 'KVolume.*?%|Title:.*?\\n|Album:.*?\\n|Year:.*?\\n|Track:.*?\\n' | myamqclient; done | |
amq client -emits updates: | |
#!/usr/bin/env python | |
import pika | |
import sys | |
message= sys.stdin.read().rstrip() | |
connection = pika.BlockingConnection(pika.ConnectionParameters( | |
host='localhost')) |
knobjs sound controls in circular view in order to be used as mplayer's input in pi-web-agent ---------------------Inspired by A Sass version of Ana's work consisting on putting items on circle with CSS: http://stackoverflow.com/questions/12813573/position-icons-into-circle. Made a mixin to make everything easy to use. Just set the size of the circle and the number of items to place.
Forked from Hugo Giraudel's Pen Items on circle.
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
<?php | |
/** | |
* stream - Handle raw input stream | |
* | |
* LICENSE: This source file is subject to version 3.01 of the GPL license | |
* that is available through the world-wide-web at the following URI: | |
* http://www.gnu.org/licenses/gpl.html. If you did not receive a copy of | |
* the GPL License and are unable to obtain it through the web, please | |
* |
#Make a c api which will be getting websocketd messages to its stdin :
-
parsing JSON from stdin: https://bitbucket.org/zserge/jsmn/overview
-
write to the fifo form the c api: http://stackoverflow.com/questions/2870549/fifos-implementation
OlderNewer