You may have read my last post
[http://www.senab.co.uk/2011/12/28/image-caching/] on my techniques in
Friendcaster for caching Bitmaps. In that post I argued against using LruCache
and instead advocated the use of a thin cache based on SoftReferences. The main
reason I argued against LruCache was because of this:
> There is a nice callback in the cache called entryRemoved which gives you the
item after it’s removed, and you would think here is the perfect time to call
Bitmap.recycle(), but do nNow that I’ve got my Pi working a bit more efficiently it’s time to actually
start putting it to use: a media server. This post will detail the initial steps
in getting your Raspberry Pi serving media files from an external drive via
DLNA.
Mount External Hard Drive
The first thing we need to do is get the external hard drive mounted and
read-able. When you plug in your hard drive Debian will not do anything with it,
so you have two options: mount it manually each time or setup Debian to
automaThe Raspberry Pi is pretty easy to overclock due to an inbuilt config file. This
morning I decided to see how far I could push my little Pi.
You can see the full list of options for the config file here
[http://elinux.org/RPi_config.txt]. Just to make clear, overclocking shouldn’t
cause any damage to your Pi (meaning your warranty is fine), overvolting on the
other hand probably will damage it over time. If you use the overvolting options
then a one-time-programmable bit is set, and your warraAfter receiving my Raspberry Pi this weekend, I’ve finally had some time to have
a play with it. My end goal for the little device is to convert it into a NAS
serving media files across my home. For now though I’m just trying to optimise
the Debian image Raspberry Pi distribute.
Enable SSH
First off, I enabled SSH Server so I could connect to it wirelessly.
sudo /boot/boot_enable_ssh.rc
Optimise fstab
There is a swap partition by default in the image, but it’s not used. This is
good as SD CaFollowing on from yesterday’s post
[http://www.senab.co.uk/2012/05/23/pull-to-refresh-indicator-concept/] about
making Pull-to-Refresh more discoverable, today I’ve made it a bit more
customisable. As you can see above, instead of the standard Android
indeterminate spinner we have Andy spinning instead. This drawable is completely
customisable by you.
That’s not all as I’ve removed the rotating arrows, and added an effect so that
the drawable (in this case Andy) is rotated based on how far you’Lots of evangelist Android developers dislike the Pull-to-Refresh pattern on
Android. For instance Cyril Mottier wrote a whole blog post
[http://android.cyrilmottier.com/?p=598] detailing his views and it’s well worth
a read. The trouble with his arguments (in my opinion) is that he’s far too
‘pure’ in his views on using patterns from other platforms. For me, getting
something which works well and people can use is more important than keeping to
Google’s Pure Android
[http://developer.android.co