Stereonaut!

Feed moved
~ Feb 4, 2010

no comments

I have always been against FeedBurner. I don't like it at all. I've never liked it, as a matter of fact, I have no actual idea why I've been using it on my blog. I do know why I used it on the country feeds on Planeta Linux, and that is because it was very easy to mask all of our URL changes with some level of stability on the subscribers (in times where me being technically competent was a bad joke for myself). Plus, we could plug AdSense into it (that later on I removed because I like to earn actual dollars, not pennies, you cheap clickers!). Or maybe I'm just so against it because of pure jealousy: A few RSS feed geeks, like myself, sold a sub-parproduct to Google in a hundred million dollars. At the very end, I've never had a good reason to use FeedBurner or to stick with it, so hereby I'm dropping it entirely from my own personal blog.

It's obvious that some people who subscribed to my feed using that FeedBurner URL aren't reading this very blog post. It's alright, I've lost reigns before, I will get over it and conquer their hearts again. But you, dear blog reader, planet subscriber, or eventual visitor, have the power to change things, to help workaround the evils of FeedBurner and make me be myself again. Please, help me myself again! And that is, from now on, use this feed URL and only this feed URL, I promise I will support as long as nice good looking HTTP servers (such as nginx or Cherokee) exist:

http://stereonaut.net/feed/

That said, I will get you a beer next time we meet each other and you, dear reader, mention this blog post and mention that you changed to this new feed URL of mine. I'm not kidding. Just go ahead and tell me :-)

Thank you.

Written by David Moreno

February 4th, 2010 at 7:31 pm

Categorized in: planeta linux, web

Tagged with , , , , ,


Large PHP scripts truncated on nginx
~ Feb 3, 2010

no comments

I spent a couple of hours yesterday trying to debug an issue that made me hit my head against the wall while it lasted.

I run multiple instances of WordPress, and with it, comes a nice little editor bundled called TinyMCE. But on my main WordPress installation (this very blog, dear reader, where you are reading this from), TinyMCE wouldn't come up, it wouldn't render properly on the browser, it didn't matter if it was my main browser, Chrome, or Firefox, Safari, cached, uncached, it was just broken. Since I hadn't have the time to go through this issue before, I was using a different editor installed as a plugin. LAME. And coward.

Anyway, I found out that one of the scripts wp-tinymce.php was being returned truncated. Because of that, Firebug would report that some TinyMCE bullshit wasn't defined (JavaScript, oh I'm not very fond of you). Oh, well. I tested calling that script under curl separately and in fact, it was only returning a fraction of the script, 44K out of the actual 200+K. I also found out that even though my nginx installation had gzip compression enabled and the PHP had zlib as well, the script wouldn't process the tinymce.js.gz but it was returning directly tinymce.js. It's alright, I just wanted it to work, no matter if it wouldn't go through gzip, that'd be a matter of some other day.

After a lot of googling I ended up reading this blog post (in Portuguese), suggesting to make sure the file permissions for both the client_body_temp and fastcgi_temp directories allowed the user running nginx (www-data in my case) to write in them. Apparently large scripts would start writing to disk on them temporarily while processing the shit. Of course, you wouldn't have this issue if you are running an nginx from your operating system package manager (like Debian's), but this might very well happen when you are running a custom nginx with separate modules and all sorts of crap on top of it:

chown www-data:www-data -R /usr/local/nginx/fastcgi_temp/;
chmod -R 777 /usr/local/nginx/fastcgi_temp/;
chown www-data:www-data -R /usr/local/nginx/client_body_temp/;
chmod -R 777 /usr/local/nginx/client_body_temp/;

Obrigado, republicavirtual.com.br :-)

Written by David Moreno

February 3rd, 2010 at 11:35 am

Categorized in: nginx, php, planeta linux

Tagged with , , , , ,


Eben Moglen – 'Freedom in the Cloud' 2/5 @ NYU
~ Feb 2, 2010

with 4 comments

 Biella passed this flyer around on the Debian-NYC mailing list. If you are in New York City this Friday, you won't want to miss this Eben Moglen's talk.

If you can't see the embedded object, go here or to this post's permalink.

Written by David Moreno

February 2nd, 2010 at 12:19 pm


Why the Kindle is a piece of shit next to the iPad
~ Jan 28, 2010

no comments

The fact that the Amazon Kindle per se exists, has attracted a copious amount of comparisons to the now unveiled Apple iPad. The Kindle of course, is a (reportedly, I don't own one) great e-book reader and Sudoku console. One should be comparing apples to apples, since comparing these two devices is like comparing a Nokia 5110, with an iPhone (ok bigots, or with a NexusOne), simply different times, different action scenarios.

 

I read here or there a tweet from someone saying that given that the iPad is 2x as much as the Kindle, they would be getting a Kindle instead. Of course, this is a big pile of stupidity. First off, let's make clear that the iPad, besides from all of the hype created around it, is much more than just an electronic paper display. Let's compare both devices when I can watch the entire second season of True Blood on the Kindle, seriously. Or let's compare it when you can browse your music library and listen to it while you're replying to your job's email conversations on why Bill, your co-worker on the next cubicle, should throw away his rotten food from the fridge. Or let's just compare the lack of free browsing and/or Wi-Fi connectivity from one of both. Come on.

In spite of the fact that Apple could have made the world go insane by reducing the iPad price by a hundred bucks more, comparing sale prices for the Kindle and the iPad is purely wrong, let's be clear here. But then again, it's just because of the fact that Amazon made a good and popular e-book reader first and started making it successful, why there's such wrong feelings and thoughts about the usefulness of a single feature on Jobs' second coming of Jesus Christ.

But if you still try to compare both, the Kindle will fail miserably. And Amazon could profit from that actually, they can assume their own niche of market and reduce the price to something that would make sense for people to carry such a device instead of the good old book/newspaper commute carrying. Otherwise, it'll leave it as a shitty alternative to the stunning unaffordable Ferrari next door.

 

Written by David Moreno

January 28th, 2010 at 11:58 am

Categorized in: books, mac, planeta linux

Tagged with , , , ,


Setting uid on God processes
~ Jan 20, 2010

no comments

I spent some minutes today at work figuring out why a script we use for files and assets propagation wasn't working when fired up under God, but it actually was working when run as its normal user.

The script is a Sinatra application that, upon pings/requests, connects through SSH to different servers on our clusters and execute commands. Details on the implementation are irrelevant here. Since this is automatized, we use key files for the SSH authentication.

When the script was running as the regular user, everything was working fine, but it wasn't under root. So I figured, Net::SSH was trying to use root's private keys file. After reading God's examples I found out that you can also set uid and gid on the watched processes, so that's what I configured:

 w.uid = "myuser"
 w.gid = "myuser"

However, this was still not working. So I made the script print some verification:

puts "My uid is: #{Process.uid} and euid: #{Process.euid} and user: #{ENV['USER']}"

So Process.uid and Process.euid was correctly printing the UID for "myuser", but ENV['USER'] was still "root". I figured that ENV["HOME"] would be the home directory based on the user, "/root", so maybe Net::SSH was still trying to read /root/.ssh/id_rsa, and it was, quoting Net::SSH's :keys option:

:keys This specifies the list of private key files to use instead of the defaults ($HOME/.ssh/id_dsa$HOME/.ssh2/id_dsa$HOME/.ssh/id_rsa, and $HOME/.ssh2/id_rsa). The value of this option should be an array of strings.

God correctly runs the process with the given uid/gid but it will not change your environment variables. And there's nothing wrong with it, all generated processes on Unix systems will inherit its parent's set of variables. God shouldn't necessarily have to be different, but in case you mess around with a given user's environment variables on a process watched by God, remember this post :-)

Written by David Moreno

January 20th, 2010 at 3:36 pm


Plack
~ Jan 19, 2010

no comments

Yes, Perl Web Server is PSGI/Plack. That's it.

 

Written by David Moreno

January 19th, 2010 at 10:21 am

Categorized in: perl, planeta linux

Tagged with , , , ,


Coding since…
~ Jan 16, 2010

with one comment

I recently read a blog's about page where the autor mentioned to have 11 years of programming experience, parenthesizing that he started really young. Although I certainly don't think any serious professional experience should include the kind of coding you do as a kid, it made me remember how I started programming myself when I was a a child.

I didn't have my own computer before 1996, when I started secundaria (junior high school). Previously, my only computers' experience had been playing around with Flow on my elementary school's very recent computer lab. Those Commodores were cool but didn't really caught completely my attention. I was slightly surprised when, on late 95 or early 96 I went to my friend's place and saw he had a computer that displayed really neat colors and you could draw freely without a command line interface but with a mouse, a toolbar and all. As I learned later, that must have been Paint on either Windows 3.1 or 95. I was much more interested on that kind of computer action since I was more into paper drawing than the actual computer at the time. But it didn't caught completely my attention either (I was a very lame uninterested kid, I guess). During that time, I started playing with my cousin's machine in Mexico City, running Windows 3.1, but I was very afraid to use it or ask to use it, since I had no clue what to do with it. When my dad bought me my first computer, my cousin Bruno was my first-hand information resource. I remember I asked him if he knew how I could get rid of the "Acer" blue screen that appeared immediately every time I booted the machine. He said "that, I don't know".

I remember I had no Internet connection for like an entire year (come on, it was already late 1996!) and I used the computer primarily as a typewriter. I could do my homework papers in it and pretend I was a graphic designer (I was still into drawing) using Paint. I didn't have (or didn't know it existed) Microsoft Office, but I had this thing installed called Microsoft Works where I used to do it all. In early 1997 I started surfing the Web using Telmex's "Internet Directo Personal", the pre-Prodigy (Mexico's most popular ISP these days) service. At school, I started learning QuickBASIC and since I was some kind of nerd as a child, I also bought some literature around the topic on magazine stands and that way I became very, very interested on the topic of programming. Around 1998, when I was 13 or 14, I used to do a lot of little programs in it, that was really my first experience with code. But I never got too deep into anything, I wonder why now. My family owned and operated a seafood restaurant, and I came up with an entire program (written in QBasic) for the waiters to order on the computer and print their orders in the kitchen where the cooks would pick it up and dispatch it. But I only knew QBasic, all of the food menu was a never-ending list of variables, I had no clue what a database was (I didn't have Access or didn't even know what it was), etc. The entire code was a single file, with a lot of if-then's and goto calls. I wish I still had that code.

What I rescue telling this is that coding as a child was a experience full of fun. I remember I loved to spend hours and hours thinking on how to come up with a better "interface" on the program, if you could call it like that. Sometimes I hope I could still retain that kid momentum when programming or that I could have kept it when I first went to college. The worst part of programming is that one sometimes forgets that it is lots of fun.

Written by David Moreno

January 16th, 2010 at 11:05 pm

Categorized in: life

Tagged with , , , , , , ,


Cherokee Summit 2010
~ Jan 12, 2010

no comments

The Cherokee web server project is hosting the Cherokee Summit 2010 in Madrid, Spain on May 7th and 8th. The summit will be focused on high-performance and scalable Web technologies. I truly believe this is a major opportunity for hackers, developers and administrators looking for the new alternatives on the Web to bond and share experiences to benefit each other's projects and enterprises, and keep up to date on this field.

If you are interested on attending, proceed to the registration site (it's free of charge but seat-limited) and see you there in May!

Written by David Moreno

January 12th, 2010 at 2:02 pm


2010
~ Jan 2, 2010

no comments

 My blog has served me throughout the years as a getaway medium. I've found comfort writing its pages, and more recently, writing a little bit more of my technical life and whereabouts. The personal side of it, in spite of being very well handled in the past, has been left behind in recent times. And I believe Twitter has taken that part of my postings. However, I believe that a lot of the thing I'm currently doing in my life are based on the measurable fact of the impact or weight that those actions would have on my Twitter (and Facebook for that matter) stream and contacts. This has also prevented me from developing further interests and getting deep into more interesting or worthwhile affairs. All the time spent reading and watching what others are doing, what I'm not doing and show what I do or pretend I'm doing has affected social relationships of mine and, as said, damaged, my growing or professional aspiring persona, that it even hurts deep down.

2010 marks the beginning of a lot of stuff and new plans, as usual. But it also marks the end of that ill poison I'm usually infected with. I want to grow up and move on to more interesting matters, retake the life I'm supposed to live and spend with the people I deserve.

Here, then, is for 2010.

Written by David Moreno

January 2nd, 2010 at 12:03 am

Categorized in: life, planeta linux

Tagged with , , ,


Caching and optimization for WordPress talk
~ Dec 21, 2009

with one comment

Continuing with my WordCamp NYC talks review, I'd like to point out the notes I took attending the talk Caching and Optimization for WordPress, by Jeremy Clarke.

I believe this was a great topic to be covered for people who actively maintain WordPress installations and have to deal with upgrades, stability and reliability. However, I also think Jeremy took a much more basic approach for this topic the way it shouldn't have to be. He would describe all the tools that he was showcasing from the most basic parts of it, like what's a terminal or why you should use it, to an audience attending the advanced development track.

Anyway, here are my notes:

After the talk I prompted him to whether he would consider also moving away from Apache and trying much faster alternatives like FastCGI PHP on nginx or Cherokee. He mentioned that he had considered it, but he preferred to stick with the most conventional and commonly used software for his installations. That's his opinion, of course. On mine, based on my own experience, dropping Apache is usually one of the best ways to workaround most of the issues around a slow WordPress.

Now thanks to WordPress.tv, we have a video of the talk that Jeremy delivered on a previos event:

And his slides:

Written by David Moreno

December 21st, 2009 at 2:18 pm

Categorized in: planeta linux, wordpress

Tagged with , , ,


Get Adobe Flash playerPlugin by wpburn.com wordpress themes