Archive for the 'tech' Category

subsonic media streamer

got a server at home? want to stream media over your home network or inter­net? linux (although other plat­forms are sup­por­ted)? yes? read on then.

sub­sonic should take care of all your media stream­ing desires. grab it from here. i’ll be using the debian version on my head­er­less server.

first off install the java runtime envir­on­ment (shame, that)…as root issue the following

apt-get install openjdk-6-jre

once that’s com­plete you’ll need to install the binary you down­loaded earlier. again, as root…

dpkg -i subsonic-x.x.deb

and that should be it up and running. login to the new install­a­tion using your domain or IP at port 4040 (i’m testing from home so for me that’s http://box:4040) and you should be greeted with some­thing like this

user­name and pass­word are admin (change the pass­word straight after you login for the first time). most import­ant step? add the path to your media…

a dir­ect­ory for your playl­ists isn’t created during the install pro­ced­ure so add one now…as root…

mkdir /var/playlists

now to forward the rel­ev­ant ports on your router so that stream­ing will work remotely…the default is, as men­tioned before, 4040 but you can change that if you like

if you want to stream from afar you’ll need a domain name if you don’t want to use your IP (which will change if you have a dynamic con­nec­tion). i use dyn.com but it seems their free service doesn’t exist anymore…i could be wrong. you could try no-ip.com.

that’s about it…you can now browse your media, load and save playlists…and play your tunes.

EDIT — i like it. a lot. have donated and i recom­mend you do too if you find it useful. it’ll give you a con­stant url for your dynamic IP address…android app that works after the 30 days trial…and help the developer to con­tinue to improve this crack­ing bit of code.

Post to Twitter

firefox nightly in a portable format

want to use firefox nightly in a port­able apps format on windows?
grab the latest version of firefox port­able from here and install to the loc­a­tion of your choice (usb key etc).
get the latest version of the nightly build here (scroll to the bottom and down­load the appro­pri­ate zip…not the exe) and extract it to a temp dir­ect­ory some­where (not on the usb key). once you’ve extrac­ted it go into the firefox dir­ect­ory (it may be in sub-directory depend­ing on how you extrac­ted the archive) hit ctrl-a to select all the files. do a ctrl-c to copy them and then head over to where you installed firefox port­able. now for the firefox dir­ect­ory, which should be in firefoxportable\app\. click into it. delete all the files that are in there then do a ctrl-v to paste all the nightly files, in.
that should be it. start firefox port­able in the usual way (FirefoxPortable\FirefoxPortable.exe) and you should be running the new version you chose.
be warned that some of your exten­sions will no doubt be broken.

and please note that in my defence i have to use windows at work, rather than linux, so i run firefox port­able within a truecrypt con­tainer through a vpn tunnel. so there.

Post to Twitter

sshmote for android

want to control the mul­ti­me­dia files that are stored on your linux based com­puter using your android phone? from the comfort of your couch? yes? well sshmote does the job rather well. you can get it from the android market or grab the latest .apk from the developer’s website. you’ll need the openssh server installed which, on a debian based system, is easily taken care of by issuing apt-get install ssh as root in a ter­minal. you’ll also need an audio/video player installed…here i’m using vlc which can be added via apt-get install vlc

fire up the app on your phone and pick a profile. you’ll need to enter your host­name or IP address. the first time i tried to connect it failed…i had to long-press the data­base entry and choose ‘edit (advanced)’ to add the user­name and pass­word. in there you can also choose the default dir­ect­ory that will be dis­played and choose the inter­face theme. works well…though i’ve found that no GUI is dis­played on my laptop and i couldn’t get vlc to exit from inside the phone app. haven’t fiddled with it too much though. found it a lot easier to use and setup than gmote. some screen­shots can be seen below…

Post to Twitter

set php max_execution time in .htaccess

don’t have access to your site’s php.ini file? i don’t on one blog i control and i want to extend the time php takes to stop running a script.
nor­mally you’d add max_execution_time = 0 to php.ini to enable this. it allows an unlim­ited running time for a script (note that this could cause other prob­lems so a more con­ser­vat­ive value might suit your setup).
if you can’t edit your php.ini file then .htac­cess is where you should be heading. create an empty version if you don’t have one already in your root dir­ect­ory and add

php_value max_execution_time 0

to it.
you can also tweak other para­met­ers while you’re in there like how much memory is alloc­ated. for example if you’d like to give your site 64MB add the line

php_value memory_limit 64M
another feature is to increase the maximum size of indi­vidual files that can be uploaded. add the line like

php_value upload_max_filesize 20M

this will set the file size limit to 20MB

Post to Twitter


Bear