16 5 / 2012
Moody - Set your current Spotify song as Skype mood
After a while of searching how to automaticly update your skype mood to your spotify song, I found this little tool called Moody.
A simple application which uses Spotifys and Skypes applescript API to simply update the Skype mood all x seconds.
I’ve adopted that logic and ported Moody to Objective C - presenting Moody v1.0! A very simple background application which does exactly what the applescript brother does - just in the background and with ObjC.

Download it here - https://github.com/downloads/dabido/Moody/Moody.zip
or fork it here - https://github.com/dabido/Moody
Hope this helps someone.
26 4 / 2012
ProxMate node live counter
Nerdy time!
I’ve recently implemented a live counter on ProxMates startpage:

Time to unveil the the logic behind it.
To accomplish that, i’ve added a very tiny node server to work as proxy between the webserver and the user. Every time a page gets unblocked, ProxMate pings a certain url, giving some information about the page which got unblocked (Usually time, browser and page).
Nginx forwards all requests arriving at that url to a intern node server. Something like that:
tcp_nodelay on; proxy_pass http://127.0.0.1:8080/; proxy_redirect off;
The node server itself counts all page unblocks and forwards them to the servers backend. Before forwarding them, all connected sockets receive an update that a new video has been unblocked.
The whole server is basicly this:
var app = server.createServer(function(request, response) {
if (!isUndefined(request.url))
{
// Parse request
var url_parts = url.parse(request.url, true);
var browser = url_parts.query["b"];
var uri = url_parts.query["u"];
if (!isUndefined(browser) && !isUndefined(uri))
{
// Ping the backend
var config = {
host: 'www.server.com',
port: 80,
path: '/url/to/backend/?u=' + encodeURIComponent(uri) + '&b='+browser
}
var req = server.request(config, function(res) {
res.on('data', function(data) {
// Count all unblocks
unblocks = unblocks + 1;
// Update all sockets
io.sockets.emit("e_update", { "unblocks": unblocks });
});
});
req.end();
}
}
response.end();
});
For sockets i am using socket.io.
That’s how the magic happens :)
23 4 / 2012
Reactivating the @SpaceSphere
It’s been a while since Twitter banned my bot @SpaceSphere (http://aqua3.bplaced.net/2011/06/the-spacesphere/) for flooding.
Today i’m bringing a new (updated) version back to life - presenting @SpaceSphere2.
- Less Spamming
- Replies to tweets
- Newest Twython version
The source is available on github - https://gist.github.com/1257372. Feel free to use it for whatever you want.
http://www.youtube.com/watch?v=BVn1oQL9sWg
