Jun 23
pabloProgramming programming, ruby on rails
So I decided to do a few tests on the Server Protectors’ website and noticed a few annoyances with the register form, I decided to delve in and fix it, just a couple of extra validations, not too much.
Half an hour later I was pretty much ready to do some open heart surgery on authlogic, man is the configuration of act_as_authentic confusing! And of course, RTFMing doesn’t work, there is not a single example of how changing the default act_as_authentic configuration works!
Searching around I found a few persons with the same problem and no solutions, so I thought I should share how I did it, or rather, what I did.
This is the resulting code:
acts_as_authentic do |c|
c.validates_uniqueness_of_email_field_options = {:if => "false"}
c.validates_length_of_login_field_options = {:if => "false", :minimum => 4}
c.validates_format_of_login_field_options = {:if => "false", :with => Authlogic::Regex.login}
c.validates_length_of_email_field_options = {:if => "false", :minimum => 4}
c.validates_confirmation_of_password_field_options = {:if => "false"}
c.validates_length_of_password_confirmation_field_options = {:if => "false", :minimum => 4 }
end
So as you can see a couple of options are a bit lame, like having a minimum when the if is being set to false, well, if you remove the minumum validates_length_of will complain (it makes sense from validates_length_of point of view, after all, if you are never going to be using the validation why call the function at all?)
I hope this helps and saves some time.
May 11
pabloUncategorized
I’ve been having issues with XBMC playing files served through samba, I don’t recall when this started, but for sometime I couldn’t even browse the collection of files in my own server. Nothing changed, well, I did upgrade Ubuntu to 10.04 on my server, but I think this was happening before that.
Anyway, I browse the internet and didn’t find anything related to this error or how to fix it.
After looking around in the configuration I’ve found something which caught my attention and I got it working.
The error I was getting was:
23:09:42 T:3077850992 M:1831804928 ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://'
unix_err:'2' error : 'No such file or directory'
23:09:42 T:3077850992 M:1831804928 ERROR: GetDirectory - Error getting smb://
And what I had to do is remove the XML path in $HOME/.xbmc/userdata/guisettings.xml that started with the tag <smb>. Removed that, restart XBMC and things started to work again.
Apr 20
pabloUncategorized programming
I was working today on a website and looking for a way to use my dual head setup to speed things up I decided to write a quick script to reload a webpage every few seconds. I ended up having a neat HTML and Javascript code that I uploaded to http://www.littleq.net/reload.html. I know, there are Firefox extensions that do that, but I didn’t want to reload my Firefox to install that (yes, I know there’s a Firefox extension that allows you to install addons without reloading, but I didn’t have that installed).
Mar 06
pabloUncategorized d510, fedora, home, linux, media, xbmc
I recently wrote a post about my new media center, running off my laptop, well, while that setup was sweet and all, there was some sort of hole in it, that is, my laptop went belly up…
That was quite unfortunate, but it gave me the possibility to play with some new stuff, namely ITX setups.
More
Feb 25
pabloUncategorized listening, value
I have recently come across this eye opening post. I mean, it probably was eye opening back when it was written in 1995, heck, I bet most Newsweek readers back then yield something like “I knew it, that Internet thing is bullcrap!”.
This article, astonishingly titled Why the internet will fail, runs down through the many reasons why Internet would be something we would all get over soon really quickly, like we did with Tamagotchis (thankfully).
Now, this is not your run of the mill ignorant news reporter who talks about things s/he doesn’t understand, this was written by Clifford Stoll, an astronomer and technology writer, working out of the Lawrence Berkeley National Laboratory. Yet, he can be quoted saying
Yet Nicholas Negroponte, director of the MIT Media Lab, predicts that we’ll soon buy books and newspapers straight over the Intenet. Uh, sure.
This author was an authority, someone that we could think that knows much more than we do, so if we disagree with his view we might want to review our opinion.
And this is something that I have seen over and over again, the number of specialists, analysts, etcists, that express an opinion on their field and its completely wrong, completely off base. Of course, we are all humans, we tend to make mistakes, so don’t take this as being judgmental, I’m just saying, we should listen, but we should selectively listen and always make up our own mind and not act on other’s opinions but our own.
Feb 24
pabloUncategorized

June 3rd, 2009 — Pablo in Yosemite
Looking at this picture makes me remember the endless horizon, the way things can be put in perspective, how unimportant and trivial things can be, how everything is in balance, since there is no out of balance in real life. Sight unseen, makes me yawn in the presence of rush.
This picture surrounds me.
Feb 23
pabloUncategorized random thoughts, value
I have recently read a quote attributed to Einstein, it reads something along the lines of “the best ideas I have I have them while I shave”. This got me thinking, how much idle time do I have on any given month? More
Feb 21
pabloUncategorized home, media, xbmc
We have recently bought a couch for my place and so we decided to spin off our multi purpose monitor to a new media set, we don’t watch much television, but we do enjoy movies and series, so I bought a new LCD screen and had a small piece of furniture custom made to serve as a TV stand.
I used my old laptop, a Toshiba 15″ Dual Core 2Ghz 2.5 G to serve the media, I have to say, I installed the latest available Ubuntu (9.10) and tested a few media centers. After much playing around I sticked to XBMC, its a great media center, originally designed for X-box, that allows you to manage all of your music, videos, pictures, etc. You can even check the weather and watch youtube right from your media center!
Recommended addons: A remote control (a physical one, you can pick those up for a few bucks at ebay), a remote control for your iPhone, there’s a $3 app “XBMC Remote” that’s great, you can see the synopsis of movies right in your iphone
Feb 20
pabloentrepreneurship entrepreneurship, friendship
I have recently had the opportunity to help out a friend who is launching her own company. This is the first time I have informally gave advice to a fellow entrepreneur and I have found it to be a very rich experience, where a lot of value is easily created, strengthening the “core friendship” in the process.
From a purely selfish point of view I have been enjoying myself, opening up to a new industry I haven’t gave too much thought ever before, and sharing ideas on the go. I have seen this before, but being the reminded of the richness of bouncing ideas off someones head and seeing what comes back at you is always a good and enjoyable thing.
Needless to say, I wish her the best of lucks in her new endeavor! Best of lucks, Lucila!
Feb 20
pabloUncategorized
Hi! First post here, interestingly enough this is the first post and most likely the least read one, so I won’t put too much thought into it.