Sick of getting your wordpress hacked? (contest below)

Posted by Jorge Bernal November 10, 2009

Crashed again

I sure am. After a proper installation/configuration, the most important factor is to always stay updated to the last version. I’m managing at this time 8 or more blogs/websites running different versions of WordPress and it’s hard to keep them up to date.

Automatic upgrades help, although they still terrify me after the 2.8 crash.

The problem is, some of these blogs are set up for friends or old projects, and I forgot to frequently check if they are using the latest version. Most of the times, they become crammed with spam, and eventually trigger google’s malware detectors. Most of the times I notice the hack because of firefox malware warning.

So I started a side project to help me keep track of all those blogs and their versions, and it’s seems is close to see the light. This is how it looks right now:

beta screenshot

I will need testing, so if you want to participate in the beta, fill the signup form, and I’ll send some invitations.

Also, I’m looking for a nice name for the thing. If you have a good idea, put it in the ‘Proposed name’ field on the signup form. The winner(*) will get the first beta invitation and free full access to the product for 1 year after it launches. Make sure a .com domain is available for the name you propose or it won’t have many chances.

(*) There will be only 1 winner: the first person to propose the chosen product name. Simple rules, but… without rules we are nothing but savages.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Discovr: a flickr experiment gone wrong

Posted by Jorge Bernal November 08, 2009

I need help with this. I had a dream… Well, not so much as a dream, maybe a “It’d be cool to…”

I thought it’d be nice to discover new photos on flickr using your favorite photos and the people who also favorited those photos, and the favorite photos of those who also favorited my pictures. Still with me?

It’s actually a quite simple code (about 500 lines, check it on github: discovr), but it’s terribly slow. Some possible reasons:

  • Way too much data. I’ve found people with around more than 18000 favorites, and there are photos with more than 2k fans. After limiting to 50 last favorites, the numbers are still creepy. Following from my personal favorites (366), I discovered 1268 users and 52632 photos
  • Too complicated for an API. This is the kind of feature that wouldn’t be so hard to implement if you have access to the flickr database directly, but having to do so many requests adds a lot of time to the process.
  • Inefficient library. I had to do some modifications to the flickr ruby library just to make it work, but it’s still quite inefficient in some cases. Want to know the url of a picture (knowing the picture id)? 4 (completely unnecessary) API calls
  • My code is bad. OK, I know it’s ugly to start blaming everyone else. I know my code is not very good, as it’s a quick prototype. Still, I’m not sure if making my code/libraries better would be enough improvement given the network/api bottleneck

The simplified algorithm goes like this.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  # method from class User
  def similar_pictures
    similar = {}
 
    favorites.each do |favorite|
      favorite.favorited_by.each do |user|
        user.favorites.each do |v|
          similar[k] ||= {:weight => 0, :picture => v[:picture]}
          similar[k][:weight] += 1
        end
      end
    end
 
    similar.values.sort {|a,b| b[:weight] <=> a[:weight]}.select {|v| v[:weight] > 1}
  end

So I’ve created a github repository and uploaded the code: discovr at github. Feel free to clone, test and improve

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

42foo: all the virtual hosts you need for your web development

Posted by Jorge Bernal July 17, 2009

I’ve done a fair amount of web “design” (mostly implementing designs of others) and development in the past, I usually set up a lot of virtual hosts in my local apache. I’ve done that in three different ways.

The quick&dirty hosts file

Point any of your development domains to 127.0.0.1 in the /etc/hosts file. It’s the easiest way, but you need to add them one by one. At some point, mine could look like this:

127.0.0.1 warp.dev
127.0.0.1 ebox-platform.dev
127.0.0.1 ebox-technologies.dev
127.0.0.1 jorgebernal.dev
127.0.0.1 projectA.dev
# ... and so on

Getting smart with dnsmasq

This is a more automated method. You install dnsmasq and configure 127.0.0.1 as your DNS server. Then add this to your conf:

address=/.dev/127.0.0.1

This worked well, and acted as a dns cache. But I had some trouble with dynamic dns entries at our old office: projects.warp.es would point to a local address inside the office and our remote IP from outside, so I found myself clearing the cache too often.

42foo: the zero-code web service

So I made it external. I bought 42foo.com and set up a bind zone with this:

@                       A       127.0.0.1
*                       A       127.0.0.1

So warp.42foo.com, ebox-platform.42foo.com or whateveryourprojectis.42foo.com always point to 127.0.0.1

You still have to set up the virtual host, but there is one step less for web development. Feel free to use it, and let me know if you set up something similar with a shorter domain name :)

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Don’t upgrade to wordpress 2.8

Posted by Jorge Bernal June 12, 2009

At least not using automatic upgrade. This morning I did that and not only I lost our website, but also the trac, subersion and the forum. And it seems it’s not just me.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Testing the Cluster with ANSTE

Posted by Jorge Bernal April 23, 2009

We did it!

Here is the presentation (PDF):

And some interesting links:

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Speaking at the MySQL conference

Posted by Jorge Bernal March 23, 2009


MySQL Conference & Expo 2009

Finally we got our proposal approved for the the MySQL conference and Victor and I will be speaking on April 22 about Testing the cluster with ANSTE.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Introducing WarpTalks

Posted by Jorge Bernal January 30, 2009

This week we had our first WarpTalks session. Once a month we’ll gather in our meeting room and someone will deliver a talk, workshop or debate about topics considered interesting.

We opened this Monday with two talks. They are in Spanish but you can get the idea.

Introduction to Subversion by Victor Jimenez

Subversion is the RCS we currently use, and the developers know it well enough to do their everyday job, but the not-so technical people at the company have been expecting some training for a while.


Introduccion a Subversion from Jorge Bernal on Vimeo.

10 things you might not know about MySQL by Jorge Bernal (me)

MySQL is the obvious choice when we need a database for our projects, so many of the developers use it daily. I tried to show some aspects of MySQL which could be useful to them but not the first things you learn about a database.


10 cosas que quiza no sepas sobre MySQL from Jorge Bernal on Vimeo.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

MySQL Conference 2009, I need an idea

Posted by Jorge Bernal September 07, 2008

I had a sad time this year when I missed the MySQL conference, since I had much fun last year in Santa Clara. I can’t miss it next year.

As a MySQL partner, and after almost 2 years doing MySQL training, I sure have interesting things to tell in the conference, but I’m not sure about what.

I will be thinking about this in the next weeks, but I’d appreciate some help. What topics are you interested in?

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 1.00 out of 5)
Loading ... Loading ...

Is Ubuntu the new Linux?

Posted by Jorge Bernal August 15, 2008

I’ve found this today at the shoes website, and I think it’s not the first time I see someone using the Ubuntu logo or name to refer to a Linux system.

If rms already had a bad time trying to convince people to use GNU/Linux instead of Linux, it seems he is getting more work to do :)

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)
Loading ... Loading ...

Store countries with ISO-3166 codes in rails

Posted by Jorge Bernal August 15, 2008

I’ve been trying to give rebirth to an old internal project at my company, abandoned circa 2006, and this is one of the code pieces I think it could be useful to others.

I wanted to store country information as an ISO code, so here is the plugin to make it work

It’s translated using the translation from the iso-codes package, so I guess it’s as good as it can get by now. If you want to contribute, please do it to the iso-codes package and let me know, so I can update it too.

iso_countries – Store countries using ISO 3166 codes

This rails plugin enables you to store country info only with the country’s ISO-3166 code

Example

  class Company < ActiveRecord::Base
    iso_country :country
  end

  c = Company.new :country => "es"
  c.country                 # => "es"
  c.country_name            # => "Spain"
  c.country_name = "France"
  c.country                 # => "fr"
  ISO::Countries.set_language "es"
  c.country_name            # => "Francia"

Download

You can get it from http://github.com/koke/iso_countries/tree/master

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

« Older blog posts