Sanbor
Three elements for success
Consider this:
You have a place to go, that is the goal. You have a vehicle to go, that is the mean, and you will arrive/have done in X quantity of time.
So we have three variables in this problem. Vehicle, goal and time.
When you do a task, a work or a project, you always have this [...]
Happy new year!
I want to give my best wishes for this incoming year to everybody. Peace, hope and happiness.
And as gift (so exciting as that underwear from your grandma) I recompiled some great Google Chrome extensions that I founded.
AdThwart
Adblock alike, the most wanted extension for Chrome.
Chrome Flags
Really handy for web developers and curious users. Show the country flag of [...]
.htaccess redirect to a new domain
I post this little snippet because isn’t easy for me to found it. Here is.
[plain]RewriteEngine on
RewriteCond %{HTTP_HOST} ^([^.:]+\.)*oldwebsite\.com\.?(:[0-9]*)?$ [NC]
RewriteRule ^(.*)$ http://www.preferredwebsite.net/$1 [R=301,L][/plain]
Thanks Wikipedia!
Flash CS4 Crashes on Windows
UPDATE: I had the same problem in Windows XP, apparently it’s a problem in some updated library.
I installed the new Windows 7 and I found problems when publish to SWF (the Flash closes).
The solution, install the last update.
MySQL Date time Regex
This regex validates only MySQL Datetime format.
[js]^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))(T|\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9])$[/js]
Matches 2009-01-01 23:59:59; 2009-03-31 14:59:59; 0000-01-01 00:00:00
Don’t matches 2009/03/31 24:30:00; 2009-30-01 10:30:00AM; 0000-00-00 00:00:00
With time as optional
[js]([0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))(T|\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9]))|[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))[/js]
Matches 2009-01-01; 2009-03-31 14:59:59
Don’t matches 24:30:00
You can do a quick test in RegexPal.
Are you happy?
Like the vitamin D, you can synthesize the happiness
Writing in social way
In the old offline times, when you read a newspaper for example, you can’t say something to the other readers or tell to the author of the article your point of view.
However, in this social connected world, now We can do this in a variety of ways.
But we still writing in old school way sometimes. [...]
YUI CSS Footer at the bottom
I use YUI CSS grids to build templates. So this time I need to stick the footer at the botoom, and I tried some techniques, but I need to do an hybrid of these to find the solution.
Ajax logins: why?
I’m starting this new blog with this little suggestion: avoid ajax logins.
Ajax it’s really cool and handy, I know, but for a login page only can be useful in very particular cases. In the rest, only helps to save time to the hackers when do brute force on your site.
How works an ajax login?
The users fills [...]