Mon Nov 30 16:57:10 EST 2009
The NSLU2 as a last.fm to twitter bridge.
This simple script came from the need of updating my twitter status with the songs that I am playing, the trick is that it will only update my profile if the song has been tagged as 'loved' on last.fm. It will also detect if it is Monday and will add the #mm hash.
As you can see I am using bit.ly to shorten the urls of the song, you will need a bit.ly API for this to work. I think what is left is to optimize the script storing the curl requests in a file sort of like a cache and add a routine to detect if it is longer than the 140 charaters allowed by twitte and shorten the text to be posted as the status.r
Tue Nov 3 11:37:17 EST 2009
Monitoring Script for resources
This is a small script to display the resources utilization of a NSLU2 running linux on a web page
in plain HTML, It is coded in BASH and some JavaScript in orther to display the information. Here is what the
output looks like:
Source Code of resources.sh:
You then direct the output of that script to a file in your RootDirectory, in my case I am using /resources.js and I execute resources.sh every 5 minutes from a cronjob.
Source Code of resources.js:
I use the following code to display the information: