This site is an effort to share some of the base knowledge I have gathered through all this years working with Linux, FreeBSD, OpenBSD, Python or Zope, among others. So, take a look around and I hope you will find the contents useful.
Wow, look at the date of my last post... 06/11/2011, that was like 548 days ago!
Well, I'm still alive, as you can see, but I've been way too busy to write stuff publicly here in the blog (I've been writing some tweets from time to time here though).
Too many things happened during the past few months to be able to write about them all here. One of the main reasons I did stop writing stuff here is that my workload increased a lot, and the other one is that I've a daughter now. Probably you can imagine how much life has changed for me.
I can't tell you how many times I've thought "wow, I should write something in my blog about this" during those 548 days. Really, that happened a lot.
So, here I am, taking 5 minutes to say hello. Let's hope I can be back to this healthy habit of writing about what happens to me everyday.
Yesterday was indeed a good day, and a long day too. I woke up at 08:00 (being my soul completely exhausted, as I got to bed around 3:00 the night before) and I met @r0sk, @MarcosBL, @mameyugo and @apvila30 at 08:45 to get on the road again on our way from Lugo to Ordes, where an ArduinoBarcamp was being prepared by our friends of the InestableLinux User Group.
The Barcamp started at 10:00, and we arrived a little bit later (around 10:20 or so), because we had some trouble finding the place.
The first thing that did struck me was the ammount of people attending the Barcamp, a lot more than expected. The guys from the Inestablelug said we were about 70 people in there, amazing (even more because they were expecting around 15 people or so).
You can get an idea on how much people we were just taking a look at these pictures:
After meeting some of the Inestable guys (like @nikageek) we attended the first two talks of the day. First one covering basic knowledge about electronics and the second one showing some aspects of the programming language you can use to communicate/interact with your Arduino board. Both talks were performed by Jose from the Inestablelug.
Then we had a coffee break (about 45 minutes or so). Perfect time to met some old friends like @toniousli or @javier_fazouro and talk about different ideas and projects using arduino boards.
The barcamp was talking place in "A casa da cultura", property of the Ordes city council, a nice place with plenty of room and some really nice paints outside:
Back inside the talks room, @TCRobotics led a workshop about setting up the development environment you need to play with arduino, that is, downloading and installing the software from http://arduino.cc and teaching us how to use the environment, where are the docs, etc.
In the picture on the left you can see @r0sk playing with his arduino board. It seems he was having some fun ;P
After a break for lunch two groups of people were formed. One of the groups was attending @TCRobotics' talk about Orugas, his personal project that consist on a rover-like robot that can be controlled using a Wiinunchuk (in a previous version) or a PlayStation2 (in its latest version). He also showed us a video of one of the first versions of the project, where the robot was able to move by itself, recognizing objects and obstacles.
It was really interesting to hear how this kind of projects are done, understanding the whole process, the problems you can find and how you can solve them with a bit of imagination and thinking.
The other group was attending a talk about arduino's XBee shield, a small board that adds wireless communication support to your arduino board. Oscar (one of the guys behind Bricogeek) gave this talk (sorry, I've no pictures of this talk). Another good talk.
The Barcamp finished near 21:00, or at least we left it at that time (I'm quite sure some people keep talking and sharing experiences and thoughts for some more time).
It was really a good experience. The only thing I'd missed was a real workshop, like the one I attended some months ago in Santiago, where there was a table, some arduino boards and material and both people willing to learn and people willing to teach, something more like a jam session. That would be really amazing, but I understand that being 70 people that would be almost imposible.
Don't misunderstand me, it was great and I enjoyed every single talk during the barcamp, I'm just giving an idea for the next-to-be arduino barcamp (as I'm quite sure there is going to be a next one soon).
We got back in the car and drove our way back to Lugo, arriving at 23:00 or so. We had dinner in one of the usual places (dotmas) and then I came back home BUT@r0sk, @MarcosBL and @mameyugo had other plans... They went to @MarcosBL's place and they kept themselves busy during the night, until they published this video in youtube:
[ no-comments ]
Oh!, I almost forgot, you can take a look at the pictures I took visiting this album.
What I'm going to explain in this post is not uwsgi-specific, you can follow this intructions to install patched versions of any package available in the FreeBSD ports collection.
In my case, I needed a patched version of the uwsgi package because I found a bug on my current version (0.9.8) that was already fixed in the -current/trunk version of uwsgi, but it hasn't been backported to any stable release yet (hopefully it will be in 0.9.8.4).
So, to fix the bug I needed the latest -current/trunk code or the latest stable release (0.9.8.3) + the needed patch.
Installing -current/trunk means compiling the sources and installing the binaries by myself, which will lead to some problems next time I had to upgrade the packages and ports in that server, so it seemed like a much better option to install the latest stable version using the ports tree. Anyway, I still would need to apply the patch to the 0.9.8.3 sources before installing... this is what I've done to add the patch cleanly.
I ran all the commands as root, if needed use sudo or some other tool to gain root privileges in order to use the ports tree.
First I got the sources of uwsgi using the ports tree:
# cd /usr/ports/www/uwsgi
# make fetch
That saved the source tarball into /usr/ports/distfiles:
That extracted the sources into /usr/ports/www/uwsgi/work/:
drwxr-xr-x 18 root wheel 3072 Aug 18 15:47 work/uwsgi-0.9.8.3/
At this point we have two options, we could download an already existing patch or we can generate the patch ourselves. In my case, I generated the patch manually because the already existing patch didn't work.
To generate the patch I renamed the file that was going to be patched:
"Each patch you wish to apply should be saved into a file named patch-* where * indicates the pathname of the file that is patched, such as patch-Imakefile or patch-src-config.h. These files should be stored in PATCHDIR (usually files/, from where they will be automatically applied. All patches must be relative to WRKSRC (generally the directory your port's tarball unpacks itself into, that being where the build is done)."
Once the patch was created, I cleaned up the work directory:
The bug was fixed and everything is running smoothly now.
Just some final considerations:
If you would like to know if your patch was applied properly, check the output of make install, you should see something like:
===> Patching for uwsgi-0.9.8.3_1
===> Applying FreeBSD patches for uwsgi-0.9.8.3_1
Any errors that could have happened while applying the patch would be logged there.
You can build the package before installing it too:
and then you can check the file that should be patched (in this example it was /usr/ports/www/uwsgi/work/uwsgi-0.9.8.3/plugins/python/wsgi_headers.c) to see if it has been patched properly before proceeding with make install.
Remember that before installing the new package, you will have to delete the old one, use pkg_delete or make deinstall to do it.
In this case, the patch will be imported into the next uwsgi release (0.9.8.4) and so it will be available by default in the next upgrade of the uwsgi port, but, if you think that the patch will not be available directly from the official sources of the project, you should contact the author of the FreeBSD port and tell him/her about the patch and how you could help importing it into the ports tree. You can read more about this in the FreeBSD porters handbook.
I'm sure I'm not the first one that cames up with this idea, but I think it is funny enough to share it with all of you.
Some days ago, while having a walk by the sea, I found some stuff written on the sand. I kept walking and suddendly I thought:
"Hey!, wouldn't it be a good idea if I just write my twitter ID on the sand, leaving it there for everyone to find it?"
I know... probably 90% of the people will have no idea what would be the meaning of that, but that 10% would be worth the effort.
Choose a place that is not visible for everyone. This way, the people that would find it will read the ID, thinking about what it would be (obviously, people with a twitter account will understand what it is)
Try to write the ID on wet sand, the ID will be more readable. Of course, wet sand means that the sea will cover the ID sooner or later, it would be a good idea to keep an eye on it and write it again later.
Take some pictures of the writing and the place where you'd written it and put them on your blog. Don't show clearly where it is, but take some shots and spread the word/idea.
Just a quick post, because I think it deserves it.
For the first time in years, I've made a change to the layout of this blog. As you can notice, now the SouthPark-style character is located on the left sidebar, instead the top-right corner of the page.
This has been a request I've received multiple times since I moved my old blog to COREBlog+the new layout, because the character was making some texts difficult to read.
This morning, my friend saad told me:
09:59:32 saad | I admit that while I still grab e-shell's RSS feeds
09:59:44 saad | I no longer go read your posts
10:01:55 saad | as I am annoyed by the South Park like character that follow my scrolling
10:01:55 saad | given that I like scrolling down and reading from the beginning
10:01:55 saad | only to find that the SP char is the bg of text and thus make it impossible to read
"WTF!" - I thought - "how could it be that a friend of mine is not reading my blog anymore because of that!"
So I've moved the SP character a bit. I hope all of you will like this little change.
As I've told you some weeks ago in my summary of the first three months of 2011 I've been quite busy since the beginning of the year. Things hadn't change too much the past three months and that's the reason for this low-posting period (again).
One of the projects I spent most of my time working on was the new Codigo23 website. For the past few years we had a coming soon page, buf finally we found the time to finish the new site contents. Once the contents were ready, we packed them in a not-so-complex website powered by Python, django and some Mako templates. The design was made by Sond3 , a design and web development company from Lugo.
The new site contains information about the different kind of services provided by the company, from software development to servers and networks management, security services or python-related training.
We are working in an open source section, that will contain source code, snippets and many more things, including full source code access to projects released by the company. A papers section is almost ready too, there we are going to publish manuals, articles and how-to documents to share our knowledge base with the community.
We are open!(TM)
Right now it is available only in spanish, but we are working on the english and galician versions (I hope they will be available soon).
Two days ago I went to Santiago to attend the Artropocode Meeting, an event for people from both the Open/Free Software and Art/Design/Multimedia worlds to meet, talk and share ideas, experiences and knowledge.
First reason for me to be there was the fact that a friend of mine was involved in the event organization, second reason was that the first day was focused mainly in the arduino project.
For those of you who don't know about it, Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments (extracted from their website, http://arduino.cc).
Basically, they were able to send a hand-made shuttle up to near 40Km from the ground. Within that shuttle there were some cameras that were recording the whole thing. Just go check their website and play some videos, you will get truly amazed.
Filipe told us about the idea behind their project, how they started working on it, how they did what they do and we watched some amazing videos.
When the talk was over, Filipe sets a workshop so we all could play with some arduino boards and learn a lot.