Author Archive

Best of Craigslist: “What Happened to All the Nice Guys?”

Thursday, June 26th, 2008

Just wanted to share with you something that made me laugh so hard today I cried my eyes out. Here’s an excerpt:

So, if you’re looking for a nice guy, here’s what you do:

  1. Build a time machine.
  2. Go back a few years and pull your head out of your ass.
  3. Take a look at what’s right in front of you and grab ahold of it.

It’s funny how other people’s “misery”, when expressed like this, makes your day a bit better.

UPDATE: I also found this. Although not related, feels like a counter-retort, view from the opposite sex kinda thing. Pure awesomeness.

Mac OS X – Epic Fail

Thursday, June 19th, 2008

While getting up to speed with Slashdot, I found an interesting article about a security breach on Mac OS X that allows user escalation through AppleScript.

Trying it on the terminal works, but, as they say, the user needs to have physical access to the machine. So, Patrício suggested trying to access through SSH to see if it works, and it did.

Slashdot member gombah99 posted a tip on how to neutralize it non-destructively:

  1. cd /System/Library/CoreServices/RemoteManagement/
  2. sudo tar -czf ARDAgent.app.gz ARDAgent.app
  3. sudo chmod 600 ARDAgent.app.gz
  4. sudo rm -r ARDAgent.app

Here’s to you, Apple Un^H^HSecurity Team!

How to build your on-demand video site with PHP

Wednesday, June 4th, 2008

Browsing DZone today I found an interesting article from IBM’s developerWorks site, which supposedly teaches you how to build an on-demand video site with CakePHP.

My first thought was that, being Belacena built with the same technology, I could learn one thing or two and make it run 10x as fast (OK, maybe not, but you get the point). So, I signed in (AKA got a user and password from BugMeNot), and started reading part 2 (part 1 covers the basics about video optimization for the web, creating the database tables, and extracting CakePHP). Let’s just say I was disappointed, because I have big expectations on everything that comes from IBM.

So, in sum, their 3 part tutorial teaches how to scaffold in CakePHP, tweak the views a bit, and that’s pretty much it. You can see the resulting site here. If you feel that article is worth reading, you can start here.

If you have any suggestions on more advanced topics, let me know, and I’ll consider writing about it.

Digital 9/11… or so they say

Tuesday, May 27th, 2008

I just read the latest press release from the European Network and Information Security Agency alerting about a possible digital 9/11. All I can say is that I’m shocked on how these people are so narrow-minded.

Now, the biggest threats on this matter seem to be botnets, spam and computer viruses.

Guys, here’s a free tip: install Linux and switch to Google Apps. Works for me (TM) ;)

Rails, migrations and validations

Friday, May 9th, 2008

Well, it was a busy day for me in Ruby on Rails land. After picking up on a few new requirements for a project I’m working on (Agile Development rocks eh?), I’ve decided to refactor a lot of the existing codebase to make it a bit cleaner and, while I was at it, migrate the project to Rails 2. It wasn’t hard or very time consuming, thanks to Ben’s tips, since it took me about 20 minutes to go through the offending lines.

One of the things I was able to extract from that refactoring was validations. Some models have to validate data that can’t be validated by a simple regular expression, and since these validations are specific in Portugal, I thought I’d share them with the portuguese Ruby on Rails developers. You can grab them following the link in the end of the post. After dropping the file on your project’s lib folder, all you have to do is add the following line to your environment.rb file:

RAILS_ROOT/config/environment.rb
  1. require 'validations'

And you’ll be ready to go. Documentation is included in the file (in Portuguese). Feedback is appreciated.

Download ActiveRecord validators for Portugal