Un message expliquant « Pas bien, tu n'as pas le droit d'utiliser une feuille de style qui n'existe pas ! » suivi d'un lien vers un script de retour à l'affichage par défaut ne me semble pas superflu.
Oui, ça devait être le cas mais la règle de validation était trop large : elle acceptait des entrées qui n'étaient que le début du nom de la feuille de style. C'est corrigé.
C'était bien un bug. Le type utilisé par défaut avec MySQL pour stocker du texte ne permet d'aller que jusqu'à 65535 caractères. J'ai donc changé de type pour aller plus loin.
Je n'aime pas rajouter des options et des directives (je trouve qu'il y en a déjà trop) et la règle actuelle a l'air de bien fonctionner. Je ne dois pas être le seul à penser ça vu que l'entrée a maintenant un score négatif. Du coup, je ferme.
Comme je lis régulièrement ces journaux bookmarks avec plaisir, je vais en profiter pour aussi donner quelques infos sur slide'em up.
Historiquement, j'ai commencé par utiliser showoff pour faire mes slides, mais j'avais quelques problèmes avec : des images qui ne se chargeaient pas dans le bon ordre, difficile de modifier la CSS par défaut, etc. Du coup, j'ai voulu contribuer. J'ai donc été voir le code et j'ai découvert que c'est un empilement de gros hacks les uns par dessus les autres et que j'allais avoir bien du mal à comprendre précisément comment ça marche. Je ne jette pas la pierre à schacon, il a écrit ça en vitesse pour ses propres besoins, puis ça a commencé à avoir du succès et il a intégré des patchs pas toujours très propres mais qui ajoutaient des fonctionnalités, et il n'a jamais trop pris le temps de nettoyer le code.
De mon coté, j'étais en train de préparer une conf sur Goliath et pour mieux appréhender la bête, j'en ai profité pour recoder un mini showoff-like avec Goliath. Puis, comme ça marchait pas mal, j'ai ajouté des fonctionnalités et des themes. Et depuis, je ne me sers plus de showoff mais uniquement de slide'em up pour faire mes présentations (enfin, sauf celles que je fais à plusieurs où j'utilise ce que l'autre personne veut utiliser, je ne suis pas très difficile pour ça tant que ça permet d'avoir un fichier dans un format ouvert à la fin).
À propos de Sinatra et Goliath, ils ne sont pas tout à fait équivalent. Pour comprendre la différence, je vais commencer par introduire un troisième larron : Rack. C'est un petit bout de code qui fait l'interface entre les serveurs applicatifs et les frameworks dans le monde Ruby. En gros, le serveur applicatif va recevoir du texte venant du réseau, l'interpréter comme du HTTP et ainsi construire un tableau des headers HTTP et éventuellement un body. Il va passer les deux au framework sous une forme convenue (celle décrite par l'interface Rack) qui lui va regarder le chemin et en déduire du code à appeler. Ce code va construire une réponse que le framework retournera au serveur applicatif, à nouveau sous une forme convenue par Rack (un triplet code de retour, headers et body). Le serveur applicatif peut alors envoyer ses informations sur le réseau.
Sinatra est un framework tel que décrit ci-dessus. Par contre, la position de Goliath est plus floue : il fait à la fois serveur applicatif, rack et framework. Rack permet de décrire des échanges de type une requête -> une réponse. Mais c'est un modèle qui ne convient plus quand on veut faire des WebSockets ou streaming HTTP. Il existe des modifications de Rack pour faire ça sous diverses formes. Goliath implémente une de ses modifications et elle a l'inconvénient de lier très fortement la partie serveur applicatif de la partie framework. Du coup, jusqu'il y a peu, utiliser Goliath voulait dire que l'on utilisait rien d'autre. Ça a changé un peu récemment : il y a des gens qui utilisent Goliath comme serveur applicatif avec un autre framework (Grape), mais ça se limite aux échanges classiques 1 requête -> 1 réponse (pas de WebSockets ou de streaming HTTP dans ce cas).
Bref, tout ça pour dire que Goliath n'a pas forcément un intérêt monstrueux pour slide'em up, c'est juste qu'il passait par là quand j'ai codé slide'em up et qu'il m'a permis d'éviter le bug des images qui se chargent dans le mauvais ordre.
Les avatars seront maintenant mis à jour régulièrement (toutes les 10 minutes environ) en passant par le daemon img. Par contre, il faudra saisir à nouveau l'URL dans les préférences, les anciennes URL ont été perdues.
On peut maintenant utiliser des SVG pour son avatar. Ils sont servis sur le sous-domaine img.linuxfr.org pour éviter les attaques avec du JavaScript embarqué.
[^] # Re: Fait
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Afficher la même icône de disucssion à côté des dépêches en rédaction que celles en modération. Évalué à 3 (+0/-0).
Oui, cf https://github.com/nono/linuxfr.org/commit/356504d53f633f1d163e489e3fd5d711978fe850
[^] # Re: It's not a bug, it's a feature.
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Le textes des journaux ayant une note négative ne s’affiche plus. Évalué à 3 (+0/-0).
Je confirme, c'est voulu.
# Fait
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Affichage des commentaires dans la boite utilisateur. Évalué à 3 (+0/-0).
On affiche maintenant une petite icône pour indiquer qu'il y a des nouvelles réponses aux commentaires que l'on a posté.
Cf https://github.com/nono/linuxfr.org/commit/df0e0961e3227cd2a1722e7a065af3e8a16348ab
# Corrigé
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi CSS au hasard ? Erreur 500.. Évalué à 3 (+0/-0).
Oui, ça devait être le cas mais la règle de validation était trop large : elle acceptait des entrées qui n'étaient que le début du nom de la feuille de style. C'est corrigé.
Cf https://github.com/nono/linuxfr.org/commit/7b6d17609cd8250ae1bfdf751a500234cb7c1c81
[^] # Re: chezmoiçamarchepas.com
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Souci d'affichage d'une image HTTPS avec img ?. Évalué à 3 (+0/-0). Dernière modification le 20 juillet 2012 à 10:20.
Pourquoi ça ne plairait pas au navigateur ?
Est-ce que tu as ajouté le certificat racine de CACert ?
Si tu essayes d'afficher l'image dans un nouvel onglet de ton navigateur, il se passe quoi ?
[^] # Re: Extension firefox/chrome ?
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Visualisation des différents types d’espaces insécables. Évalué à 3 (+0/-0).
Du coup, je reste sur ma position et ferme cette entrée de suivi.
[^] # Re: Patch
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Garder une trace des bornes du karma. Évalué à 4 (+0/-0).
Oui, c'était quasiment ça. Cf https://github.com/nono/linuxfr.org/commit/da7bb74dc7cb2dc96db08e6ed6c6f622cc494306
[^] # Re: Icône
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Modifier l'icône de la catégorie "distribution linux". Évalué à 3 (+0/-0).
Fait. Cf https://github.com/nono/linuxfr.org/commit/9d781d1b15116eaa731cca00a740b0748a64f724
# Retiré
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Attribut pubdate déprécié. Évalué à 3 (+0/-0).
Cf https://github.com/nono/linuxfr.org/commit/e2c1337301a74aff3ace3acc78187a675345d141
# Fait
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Version compilée des css communes. Évalué à 3 (+0/-0).
Ces feuilles de styles sont maintenant disponibles sur http://linuxfr.org/assets/. Par exemple, la CSS avec les drapeaux pour les langues est là : http://linuxfr.org/assets/common/langs.css.
Cf https://github.com/nono/linuxfr.org/commit/298085902657f7e6c7190047d2f8026f0cded49e et https://github.com/nono/linuxfr.org/commit/a6f6da047bf06f5de65af5d8ff5bc2e11976dd13.
# Fait
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Afficher la même icône de disucssion à côté des dépêches en rédaction que celles en modération. Évalué à 3 (+0/-0).
Cf https://github.com/nono/linuxfr.org/commit/6c8e5bb3aae76f7a93bb2ee0960f442bae5de3d4
# Corrigé
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi bug du sommaire automatique sur les citations. Évalué à 4 (+0/-0).
Cf https://github.com/nono/linuxfr.org/commit/116cc25a4345083aae7224f3b11818b2c67e6a6b
# Corrigé
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Page de Wiki tronquée. Évalué à 3 (+0/-0).
C'était bien un bug. Le type utilisé par défaut avec MySQL pour stocker du texte ne permet d'aller que jusqu'à 65535 caractères. J'ai donc changé de type pour aller plus loin.
Cf https://github.com/nono/linuxfr.org/commit/8afae12439804316f7bc85af8037e4f62686944e
# Bof
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Permettre d'inclure un sommaire à la discrétion des rédacteurs. Évalué à 3 (+0/-0).
Je n'aime pas rajouter des options et des directives (je trouve qu'il y en a déjà trop) et la règle actuelle a l'air de bien fonctionner. Je ne dois pas être le seul à penser ça vu que l'entrée a maintenant un score négatif. Du coup, je ferme.
# Corrigé ?
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Résultat de recherche incomplet.. Évalué à 3 (+0/-0).
La recherche pour Calligra renvoie maintenant la dépêche Calligra en deuxième position.
# Je ferme
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Il semble que des bots accèdent à Linuxfr et y déposent des commentaires (ou des entrées de forum).. Évalué à 3 (+0/-0).
Vu que ça fait un bout de temps que l'on n'a pas eu de problème de spam, je ferme l'entrée.
# Certificat
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Souci d'affichage d'une image HTTPS avec img ?. Évalué à 4 (+0/-0).
Effectivement, l'utilisation directe du
net/http
de Go vérifiait les certificats. J'ai désactivé ça et l'image s'affiche maintenant.Cf https://github.com/nono/img-LinuxFr.org/commit/0f20573f39f8013510cffa1b4f52e066bb39fcb6
[^] # Re: Quelques infos sur slide'em up
Posté par Bruno Michel (site web personnel) . En réponse au journal De tout, de rien, des bookmarks, du bla bla. Évalué à 3.
Oui, c'est le même.
Non, je préfère avoir la même chose sur mon écran que ce qui est affiché sur le vidéo-proj.
# Quelques infos sur slide'em up
Posté par Bruno Michel (site web personnel) . En réponse au journal De tout, de rien, des bookmarks, du bla bla. Évalué à 10.
Comme je lis régulièrement ces journaux bookmarks avec plaisir, je vais en profiter pour aussi donner quelques infos sur slide'em up.
Historiquement, j'ai commencé par utiliser showoff pour faire mes slides, mais j'avais quelques problèmes avec : des images qui ne se chargeaient pas dans le bon ordre, difficile de modifier la CSS par défaut, etc. Du coup, j'ai voulu contribuer. J'ai donc été voir le code et j'ai découvert que c'est un empilement de gros hacks les uns par dessus les autres et que j'allais avoir bien du mal à comprendre précisément comment ça marche. Je ne jette pas la pierre à schacon, il a écrit ça en vitesse pour ses propres besoins, puis ça a commencé à avoir du succès et il a intégré des patchs pas toujours très propres mais qui ajoutaient des fonctionnalités, et il n'a jamais trop pris le temps de nettoyer le code.
De mon coté, j'étais en train de préparer une conf sur Goliath et pour mieux appréhender la bête, j'en ai profité pour recoder un mini showoff-like avec Goliath. Puis, comme ça marchait pas mal, j'ai ajouté des fonctionnalités et des themes. Et depuis, je ne me sers plus de showoff mais uniquement de slide'em up pour faire mes présentations (enfin, sauf celles que je fais à plusieurs où j'utilise ce que l'autre personne veut utiliser, je ne suis pas très difficile pour ça tant que ça permet d'avoir un fichier dans un format ouvert à la fin).
À propos de Sinatra et Goliath, ils ne sont pas tout à fait équivalent. Pour comprendre la différence, je vais commencer par introduire un troisième larron : Rack. C'est un petit bout de code qui fait l'interface entre les serveurs applicatifs et les frameworks dans le monde Ruby. En gros, le serveur applicatif va recevoir du texte venant du réseau, l'interpréter comme du HTTP et ainsi construire un tableau des headers HTTP et éventuellement un body. Il va passer les deux au framework sous une forme convenue (celle décrite par l'interface Rack) qui lui va regarder le chemin et en déduire du code à appeler. Ce code va construire une réponse que le framework retournera au serveur applicatif, à nouveau sous une forme convenue par Rack (un triplet code de retour, headers et body). Le serveur applicatif peut alors envoyer ses informations sur le réseau.
Sinatra est un framework tel que décrit ci-dessus. Par contre, la position de Goliath est plus floue : il fait à la fois serveur applicatif, rack et framework. Rack permet de décrire des échanges de type une requête -> une réponse. Mais c'est un modèle qui ne convient plus quand on veut faire des WebSockets ou streaming HTTP. Il existe des modifications de Rack pour faire ça sous diverses formes. Goliath implémente une de ses modifications et elle a l'inconvénient de lier très fortement la partie serveur applicatif de la partie framework. Du coup, jusqu'il y a peu, utiliser Goliath voulait dire que l'on utilisait rien d'autre. Ça a changé un peu récemment : il y a des gens qui utilisent Goliath comme serveur applicatif avec un autre framework (Grape), mais ça se limite aux échanges classiques 1 requête -> 1 réponse (pas de WebSockets ou de streaming HTTP dans ce cas).
Bref, tout ça pour dire que Goliath n'a pas forcément un intérêt monstrueux pour slide'em up, c'est juste qu'il passait par là quand j'ai codé slide'em up et qu'il m'a permis d'éviter le bug des images qui se chargent dans le mauvais ordre.
# Fait
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Attribuer +50 de karma manuellement pour les admins. Évalué à 3 (+0/-0).
Cf https://github.com/nono/linuxfr.org/commit/9ff4b14b742f3413881bc0e5a97820d76e8f7405
# Fait
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Utiliser img pour les avatars. Évalué à 3 (+0/-0).
C'est en place. Cf https://github.com/nono/linuxfr.org/commit/832f5d93a2393d26efa337a805734a3f5f4f639e et https://github.com/nono/img-LinuxFr.org/commit/3cd4a68343a39ea3f5acedc7b9fbd2f781099042
# Corrigé
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Erreur lors du changement d'avatar. Évalué à 3 (+0/-0).
J'ai refait la partie avatars (on passe maintenant par le daemon img qui sert aussi les images externes). Ça devrait régler ce problème.
# Réglé en partie
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Limiter la taille des avatars. Évalué à 3 (+0/-0).
C'est fait pour les avatars qui sont uploadés sur le site mais pas encore pour ceux provenant d'URL externes.
Cf https://github.com/nono/linuxfr.org/commit/3433215d1c34f813ab69cbab8aed601cee996ea1
# Corrigé
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Cache des avatars ?. Évalué à 3 (+0/-0).
Les avatars seront maintenant mis à jour régulièrement (toutes les 10 minutes environ) en passant par le daemon img. Par contre, il faudra saisir à nouveau l'URL dans les préférences, les anciennes URL ont été perdues.
Cf https://github.com/nono/linuxfr.org/commit/832f5d93a2393d26efa337a805734a3f5f4f639e
# Fait
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi avatar.svg n'est pas un type de fichier autorisé. Évalué à 3 (+0/-0).
On peut maintenant utiliser des SVG pour son avatar. Ils sont servis sur le sous-domaine img.linuxfr.org pour éviter les attaques avec du JavaScript embarqué.
Cf https://github.com/nono/linuxfr.org/commit/565af7c7d91612d90036ac4774f731f2126e9e9e