As everyone already knows, Google Chrome now supports websockets. In essence, this allows you to keep a connection open with a webserver indefinitely (analogous to typical sockets) and send data bi-directionally. Unfortunately Chrome is the only browser currently supporting this, but I’m pretty sure this will change. So I decided to give this a try [...]
According to a post on their forums, there are currently 0 (zero) developers working on the OSX version of the popular video player VLC. If you know someone with Cocoa skills that wants a good challenge, pass the message on. Please do, I don’t want to lose my favorite video player of all times
I recently took another look at all the different texts I wrote in the past and came to the conclusion that I really need a central place to handle all of that. Due to the fact that I don’t feel like maintaining the Java desktop application I created for that effect, I decided to put [...]
So, yeah, I resumed playing around with android, this time version 2.0. I’m really tempted to buy the new Motorola Milestone that should come out in Europe sometime between… now… and early next year, so I wanna be ready to create all the crazy stuff I have in mind for it One of the things [...]
Wow, these have been a couple of crazy days: First Samsung announced a new operating system for mobile devices called Bada – that will compete directly with Google’s Android – and the next day Google announces the creation of a new programming language, supposedly a cross between Python and C++, called Go. It looks like [...]
If you ever saw the GE eco website on the smartgrid, then you have experienced a bit of augmented reality using only your computer’s webcam and a piece of paper. This type of technology has now and opensource version. It’s called Gamaray, and it allows you to play around with this on your Android powered [...]
At least a couple of options, the first using BeautifulSoup: import urllib import BeautifulSoup soup = BeautifulSoup.BeautifulSoup(urllib.urlopen(“https://www.google.com”)) print soup.title.string And the second one using lxml: import lxml.html t = lxml.html.parse(url) print t.find(“.//title”).text
I recently came across a piece of software called “Fabric”. It has been made in python and its purpose is to help simplifying the process of deploying software to remote machines. The really cool thing I like about it is that it’s much faster than, say, an ant script because it actually reuses the SSH [...]
I recently ran into the following problem: I needed to be able to display a list of users in a table that had a maximum of X columns. Since I could not find the solution on the Internet I decided to give it a try and here is my resulting template filter to do it: [...]
I’ve always been a fan of PostgreSQL, even though I’ve been forced to use MySQL at work for ages (you know, IT policies). Anyways, after reading this article I’m definitely switching all my pet projects to PostgreSQL. The documentation is amazing, the database itself is blazing fast and super scalable. And it’s open source. What [...]
Here’s how to, from a view, redirect to another URL passing parameters to it. For instance, to redirect the user to a certain page after login: return HttpResponseRedirect(reverse(‘dz_details’, kwargs={‘dz_id’:dz.id})) This will lookup the ‘dz_details’ name in your urls.py file, which could be defined like so: url(r’^details/(\d+)/$’, views.dz_details, name=’dz_details’), There is a simpler way to do [...]
Here’s how to redirect to the login page in django, making it go to a certain view (by name) after a successful login: login_url = ‘%s?next=%s’ % (reverse(‘acct_login’), reverse(‘jumplog_index’)) return HttpResponseRedirect(login_url) Notes: acct_login is django’s view name for the login page (double check this, as it might change in future django versions); jumplog_index is the [...]
I’ve been recently writing a python script to upload videos to vimeo, as I usually do when I have to upload a new episode of Two Guys and a Beer. Today I believe they rolled out a new advanced upload API, though the old one should still work until November 13th. But the problem is [...]
I always wanted to build my own proxy. I’m kidding. I do have better things to do with my time. Nevertheless, a problem presented itself and here’s my solution for it: An HTTP proxy Spring controller. Currently: Handles GET and POST methods; Guaranties the type of the response to be the one the target server [...]
I recently took interest in knowing how one of the projects I worked previously had evolved in JIRA over time. So I decided to write a python script to do it for me. Turns out it’s pretty easy, using the xmlrpclib that comes with python, if your JIRA installation has this remote entry point enabled. [...]
If you ever dug into the wordpress plugin world you know that you can create some hooks on the wordpress flow to allow execution of your functions when something interesting happens. One of those hooks is the ‘publish_post’, which will be triggered when the post is published and – surprise – also everytime the post [...]
I know that a lot of people covered this in the past but, since I also use this blog as a vault for tips that I might forget in the future, here’s how to make ssh not require you to enter a password when connecting to another machine: Step 1: Generate your public and private [...]
Yes, once again. I know, I have no life I’m curious to see how long WordPress will last, before I get bored and try to implement everything by hand again. But, the night is over and tomorrow there is a lot of jumping to do, in Evora – Portugal. Hopefully I can get someone to jump [...]
As you might know, a while back, I started a video podcast on life, technology, and everything, with my dear friend Luis Soares (http://twitter.com/luizsoarez). You can watch the episodes here: http://vimeo.com/channels/tgab. Recently it came to our attention that we do not have a graphical identify yet (like we didn’t notice ) so work has began [...]