Sunday 20 April 2008, 20:05
By Geoffrey - Ego
- Permalink
GOING OUT
From Paris (Beauvais) (BVA) to Stockholm (Skavsta) (NYO)
Sun, 25May08 Flight FR9502 Depart BVA at 09:50 and arrive NYO at 12:00
COMING BACK
From Stockholm (Skavsta) (NYO) to Paris (Beauvais) (BVA)
Sat, 07Jun08 Flight FR9501 Depart NYO at 06:50 and arrive BVA at 09:05
Allez hop ! Deux semaines en suède avec mon tcheum caribou, ça pourra pas faire de mal tabarnak (oui je m'entraine a parler québecois un peu).
Monday 31 March 2008, 17:08
By Geoffrey - Coding
- Permalink
A little late sorry, but ZF 1.5.1's package is now ready.
Monday 31 March 2008, 13:57
By Geoffrey - General
- Permalink
N'oubliez pas que demain, c'est le 1er avril. Ne croyez pas tout ce qu'on vous dit. Oui je hais cette date.
Don't forget it's April's fool tomorrow ! Don't believe everything you're told of. Yeah I hate that date.
Thursday 27 March 2008, 23:04
By Geoffrey - Coding
- Permalink
A small bit of ruby to get a constant from an URL:
require 'uri'
def url_to_constant(url)
return URI.parse(url).host.gsub(/^www\./, '').capitalize.gsub(/[^a-z][a-z]/i) { |m| m.gsub(/[^a-z]/, '').upcase }.constantize
end
Nothing exceptionnal here, just a pretext to post something.
Saturday 22 March 2008, 18:19
By Geoffrey - Coding
- Permalink
The long awaited 1.5 version of the Zend Framework has landed for some days already, and here comes its pear package. Please note the api version changed to 1.5 in this package.
Friday 21 March 2008, 14:34
By Geoffrey - Ego
- Permalink
Ah ! J'avais pas chopé la vidéo à l'époque, mais maintenant que je l'ai, hop: mes débuts en chute libre, c'était l'année dernière en aout, mes premiers sauts du coté de Poitiers avec mon compère jérome (le deuxième a sauter). Pour ceux qui s'y connaissent un peu, j'ai un peu foiré mon saut :p
Vivement les prochains ;)
Friday 21 March 2008, 13:03
By Geoffrey - Ego
- Permalink
Just a quick note to say I successfuly passed my Zend PHP 5 Certification this morning.
Monday 10 March 2008, 21:48
By Geoffrey - Coding
- Permalink
Après de longs mois d'attente, le related by tags nouveau arrive enfin ! Au menu des réjouissances, une interface de configuration, ainsi qu'un widget font leur apparition. Vous disposez donc désormais de deux manières d'afficher les billets liés, directement en modifiant le template comme avant:
{{tpl:include src="_related_by_tags.html"}}
ou tout simplement en activant le widget correspondant, que vous pouvez configurer comme vous l'entendez. Bien sur, ce widget ne s'affichera que lors de la visualisation d'un billet.
Au chapitre des fonctionnalités / bugfix manquant(e)s, on notera le bug lié à l'utilisation de postgresql, ainsi que la traduction française, qui sera pour plus tard.
Encore une fois, n'hésitez pas à poster tous vos commentaires ici même.
2 attachments
Sunday 2 March 2008, 17:10
By Geoffrey - General
- Permalink
Bon voilà, j'ai décidé de prendre en main mon alimentation, et vu qu'il parait que le petit déjeuner est le repas le plus important de la journée, je commence par lui. Dans cette optique, j'ai acheté des pancakes de chez Pasquier. Je ne suis pas un expert en pancakes (mes deux seuls points de comparaisons sont des pancakes qu'on m'a fait quand j'étais au lycée et ceux de breakfast in america), mais franchement, ces pancakes sont une vaste plaisanterie. Ils sont vendus par dix, conditionnés dans des sachets fraicheur de deux pancakes chacun. La consistance de la chose est pour le moins décevante puisqu'au moindre mouvement un peu brusque, le pancake se disloque... Bon. Passé ce désappointement, on sort le sirop d'érable, et là, le drame se poursuit. Plus proche de l'éponge que du pancake, ce truc ne se rattrape même pas par son gout, qui, s'il n'est pas forcément mauvais, n'a rien a voir avec un pancake. Bref, à l'avenir, je cuisinerai mes pancakes moi même.
Wednesday 27 February 2008, 11:17
By Geoffrey - Coding
- Permalink
The package for the last 1.0.x release, 1.0.4, is now available on the phpmafia pear channel. Please report any issue in the comment of this post. The Zend_Locale's xml bug should now be fixed (they are now considered as php and thus put at the right place, which is not the best way to fix the bug I guess but at least it should work for now).
Monday 28 January 2008, 10:44
By Geoffrey - Ego
- Permalink
You have unsubscribed from "The Caribbean Weblog."
C'est con mais ça me rend un peu triste.
Monday 21 January 2008, 11:06
By Geoffrey - Geekeries
- Permalink
Les utilisateurs du framework symfony ont désormais leur cafet' dédiée pour aller prendre un ptit café ! Pour résumer, symfonians se propose de réunir la petite communauté symfony autour de fonctionnalités aussi conviviales qu'utiles, telles que la création d'un profile développeur symfony, des offres d'emploi, ce genre de choses quoi. Le projet est chapoté par NiKo, ce qui au moins est un gage de bonne qualité.
Wednesday 2 January 2008, 23:50
By Geoffrey - Geekeries
- Permalink
Just to say I packaged the 1.0.3 version of the zend framework on the phpmafia pear channel. It's a bit late I know, but at least it's here. Please note that I already have been notified of a problem regarding the Zend Locale's xml datafiles and that I hope to have worked out a solution for the next release (1.5 if all goes well).
Monday 24 December 2007, 02:00
By Geoffrey - Ego
- Permalink
Hier matin je suis allé petit-déjeuner à Breakfast in america pas loin de saint paul. Je ne sais pas si c'est vraiment représentatif de ce qu'on peut trouver aux états unis, mais en tout cas c'était vraiment pas mal du tout. L'ambiance conviviale très bien servie par le mobilier qui fait très american movie, les serveuses completely bilinguals, la bouffe bien grasse à souhait avec les pommes de terre sautées, le bacon calciné, l'omelette connecticut, et surtout les pancakes gigantesques fourrés blueberry, tout était réuni pour se faire péter la panse dans la joie et la bonne humeur.
Monday 24 December 2007, 01:45
By Geoffrey - Ego
- Permalink
Je voulais geeker un peu ce week end, et notamment travailler sur mon plugin "related by tags", mais malheureusement j'ai réactivé mon compte WoW. Autant dire que ma productivité globale est proche du zéro absolu. Mais je ne perds pas espoir, et je vais de ce pas inscrire quelques reminders bien sentis sur mon tableau blanc, et j'espère redresser la barre d'ici au jour de l'an.
Sunday 2 December 2007, 16:41
By Geoffrey - Coding
- Permalink
I used to use this yaml_to_ar lib from christophe to load categories tree into my database, using acts_as_tree in the model that was perfect. Arrived the time when I felt the need to use acts_as_nested_set instead, for which I had to fill the lft and rgt columns. So I just rewrote the yaml_to_ar piece of code (put this in lib/yaml_to_ar.rb):
require 'yaml'
class YAML_to_AR
def initialize(file, model)
@data = File.open(file) { |yf| YAML::load( yf ) }
@model = model
end
def process(data = @data, parent = nil)
if data.is_a? Array
data.each do |val|
process(val, parent)
end
elsif data.is_a? Hash
data.each do |key,val|
parent = @model.create(:title => key)
process(val, parent)
end
elsif data.is_a? String
parent.add_child(@model.create(:title => data))
end
end
end
This should handle both acts_as_tree and acts_as_nested. To ease things a bit further, I also wrote a rake task (to drop in lib/tasks/db_load_categories.rake for example):
namespace :db do
desc "Loads categories defaults data"
task :load_categories => :environment do
require 'lib/yaml_to_ar'
Category.delete_all
categories = YAML_to_AR.new('db/categories.yml', Category)
categories.process
end
end
Now I just rake db:load_categories, and voila !
Wednesday 28 November 2007, 13:00
By Geoffrey - Coding
- Permalink
It's a simple plugin (2 lines of code beside class and modules declarations) which allows routes created via the map.resources mechanism to be customized. Say you have the following map:
map.resources :members
It will generate routes like:
/members
/members/:id
/members/new
No say you want to i18n your app, in french for example, what do you do ? You just can't out of the box. This is where my plugin enters into action, just add a :route_name parameter to the map.resources call and you're set:
map.resources :members, :route_name => 'utilisateurs'
will generate routes like:
/utilisateurs
/utilisateurs/:id
/utilisateurs/new
It shall also work for nested resources, although I did not test that.
The code is actually pretty simple:
module ActionController
module Resources
class Resource
def path
route_name = @options.include?(:route_name) ? @options[:route_name] : @plural
@path ||= "#{path_prefix}/#{route_name}"
end
end
end
end
To install just use script/plugin:
script/plugin install http://tools.assembla.com/svn/riskle/rails/plugins/named_resources
or to install as an svn:external resource:
script/plugin install -x http://tools.assembla.com/svn/riskle/rails/plugins/named_resources
Wednesday 21 November 2007, 12:03
By Geoffrey - Coding
- Permalink
For some reason, $HTTP_RAW_POST_DATA does not seem to be set inside an action controller. You'll have to use the php://input stream wrapper to access raw http post data:
$raw_post_data = file_get_contents('php://input');
Wednesday 7 November 2007, 13:48
By Geoffrey - Ego
- Permalink
Bon voilà j'ai craqué la semaine dernière, j'ai acheté une xbox 360. Donc si ça vous tente, et que vous en avez une également bien entendu, mon gamertag est ubermuda, n'hésitez pas à venir m'humilier sur skate, burnout revenge ou autre gears of war :-) J'en profite pour dire aussi que bioshock est vraiment un des meilleurs jeux auquel j'ai jamais joué.
Monday 5 November 2007, 14:37
By Geoffrey - Coding
- Permalink
Today I ran into an issue while extending Zend_Controller_Router_Route. I wanted to add a little path pre/post processing in the match() and assemble() methods, so I just extended the Route class to add my tiny bits of code into the methods. Except it did not work at all. After a few debuging, it turned out that the Router uses Zend_Controller_Router_Route::getInstance() to retrieve a route object, which uses a new self(); statement to instantiate the route object. Problem is that self always refers to the current class definition we're in, if the method is called from a child class, without being overloaded, self will refer to the wrong class.
Example:
class Foo {
public static function getInstance() {
return new self;
}
}
class Bar extends Foo {}
var_dump(Bar::getClass());
echoes something like:
object(Foo)#1 (0) {
}
Which is fscking wrong IMHO. A quick workaround is to overload the getInstance method, which is what I call pretty annoying as it does not follow the DRY principle.