Warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache' query: UPDATE cache SET data = 'a:402:{s:13:\"theme_default\";s:4:\"kewl\";s:13:\"filter_html_1\";s:1:\"1\";s:18:\"node_options_forum\";a:1:{i:0;s:6:\"status\";}s:18:\"drupal_private_key\";s:64:\"a5de3144cabd3a5a76889cdc7d52a5656ec758dd9c66b720824755fe28d5dc59\";s:10:\"menu_masks\";a:24:{i:0;i:127;i:1;i:63;i:2;i:62;i:3;i:61;i:4;i:59;i:5;i:58;i:6;i:57;i:7;i:56;i:8;i:31;i:9;i:30;i:10;i:29;i:11;i:28;i:12;i:24;i:13;i:21;i:14;i:15;i:15;i:14;i:16;i:12;i:17;i:11;i:18;i:7;i:19;i:6;i:20;i:5;i:21;i:3;i:22;i:2;i:23;i:1;}s:12:\"install_task\";s:4:\"done\";s:13:\"menu_expanded\";a:2:{i:0;s:15:\"menu-categories\";i:1;s:10:\"navigation\";}s:9:\"site_name\";s:7:\"jide.fr\";s:9:\"site_mail\";s:17:\"jide.fr@gmail.com\";s:21:\"date_defa in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:1791:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter'\nquery: UPDATE cache_filter SET data = '<p>I just released <a href=\\"http://jide.github.io/clamp/\\">Clamp</a>, a command line tool to make starting a full Apache, PHP, MySQL stack up and running a breeze. Go to your project folder, type \\"clamp\\" and you\\'re good to go !</p>\\n<p><strong>But... Why ?</strong&g in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:920:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter'\nquery: UPDATE cache_filter SET data = '<p>I just released my first game, Photomime.</p>\\n<p>The rules are simple : Someone mimes the picture on the screen while the rest of the team must find it.</p>\\n<p>You can play it online on <a href=\\"http://photomime.net/\\">http://photomime.net/</a> and download the free Android app on <a in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:1553:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter'\nquery: UPDATE cache_filter SET data = '<p>\\"Le Moteur De Recherche\\", a website to promote a documentary of the french television program canal plus called <a href=\\"http://www.canalplus.fr/c-infos-documentaires/pid6032-c-made-in-france.html\\">Made in France</a>, has just been released.</p>\\n<p>It is a fun search engine which allows you to en in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:591:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter'\nquery: UPDATE cache_filter SET data = '<p>A quick service script to show / hide hidden files in the Finder on Mac OS X.</p>\\n<p>Associate the service with a global hotkey and you\\'re on !</p>\\n<p><script src=\\"http://gist.github.com/8824465.js\\"></script></p>\\n', created = 1513168891, expire = 1513255 in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:1642:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter'\nquery: UPDATE cache_filter SET data = '<p>The other day, I stumbled upon this question on stackoverflow on how to cleanly customize Bootstrap :</p>\\n<p><a href=\\"http://stackoverflow.com/questions/8596794/customizing-bootstrap-css-template/21144524#21144524\\" title=\\"http://stackoverflow.com/questions/8596794/customizing-bootstrap-css-template/21144524#21144524\\" in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:897:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter'\nquery: UPDATE cache_filter SET data = '<p>On webkit browsers on mac, font smoothing is kind of too bold. The known hack for this is to use :</p>\\n<p><code>html {<br />\\n -webkit-font-smoothing: antialiased;<br />\\n}</code></p>\\n<p>But this won\\'t work on form elements such as inputs and also on elements having \\& in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:1986:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter'\nquery: UPDATE cache_filter SET data = '<p>I had to replace words in a text while keeping the capitalization in Javascript.</p>\\n<p>Given the text :<br />\\n\\"It is a good burger. Or an hamburger. Burger is good\\".</p>\\n<p>With the replacement word \\"sandwich\\", it should become :<br />\\n\\"It is a good s in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:1916:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter'\nquery: UPDATE cache_filter SET data = '<p>I\\'ve had hard times setting up a LAMP Vagrant box. There are tons of \\"tutorials\\", but none gave me the right direction to have a fully functional LAMP stack running as localhost.</p>\\n<p>So, hey, since I\\'m a nice guy, I\\'ll spare you some headaches and tell you how you can do it easily.</p>\\n< in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:1860:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter'\nquery: UPDATE cache_filter SET data = '<p>Edit: As Pol said in comments, you can use the openlayers_taxonomy module to do this. But it turns out I had to use content types as layers too, so this technique still was useful to me. Thank you Pol :)</p>\\n<p> I wanted to create layers depending on some taxonomy terms with Openlayers. But the only way to create layers with views is to add one display per layer. Wha in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:1077:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter'\nquery: UPDATE cache_filter SET data = '<p>I see that everytime, mostly in Wordpress / Drupal / Whatever templates :</p>\\n<p><code><ol class=\\"commentlist\\"><br />\\n...<br />\\n</ol><!-- .commentlist --></code></p>\\n<p>Don\\'t ! her in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:6490:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_views_data'\nquery: UPDATE cache_views_data SET data = 'a:3:{s:6:\\"result\\";a:74:{i:0;O:8:\\"stdClass\\":1:{s:3:\\"nid\\";s:1:\\"4\\";}i:1;O:8:\\"stdClass\\":1:{s:3:\\"nid\\";s:1:\\"2\\";}i:2;O:8:\\"stdClass\\":1:{s:3:\\"nid\\";s:2:\\"47\\";}i:3;O:8:\\"stdClass\\" in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:6303:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_views_data'\nquery: UPDATE cache_views_data SET data = 'a:4:{s:4:\\"head\\";s:0:\\"\\";s:3:\\"css\\";a:0:{}s:2:\\"js\\";a:0:{}s:6:\\"output\\";s:3576:\\"<div class=\\"view view-tagadelic view-id-tagadelic view-display-id-block_1 view-dom-id-1\\">\\n \\n \\n \\n <div class=\\"view-content\\"&gt in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:6228:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_block'\nquery: UPDATE cache_block SET data = 'a:2:{s:7:\\"content\\";s:3576:\\"<div class=\\"view view-tagadelic view-id-tagadelic view-display-id-block_1 view-dom-id-1\\">\\n \\n \\n \\n <div class=\\"view-content\\">\\n <div class=\\"tagadelic_views\\"><a href=\\"/english/android-0\\" class=\\& in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:409:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter'\nquery: UPDATE cache_filter SET data = '<p>Follow me : <a href=\\"http://twitter.com/jidefr\\">jidefr</a></p>\\n', created = 1513168891, expire = 1513255291, headers = '', serialized = 0 WHERE cid = '1:fb82f31c75d9dcc2908dc560fa3f9280'\";s:5:\"%file\";s:37:\"/home/jideretu/www/includes/cache.inc\";s:5:\"%li in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:1006:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_views_data'\nquery: UPDATE cache_views_data SET data = 'a:3:{s:6:\\"result\\";a:1:{i:0;O:8:\\"stdClass\\":3:{s:10:\\"twitter_id\\";s:18:\\"937070315510861824\\";s:12:\\"twitter_text\\";s:143:\\"RT @PhilippeCorbe: Si vous avez du mal à comprendre l\\'affaire russe, et l\\'importance de l\\'information du jour, le plaider coupable de l\\ in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:2326:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_views_data'\nquery: UPDATE cache_views_data SET data = 'a:4:{s:4:\\"head\\";s:0:\\"\\";s:3:\\"css\\";a:0:{}s:2:\\"js\\";a:3:{i:0;a:5:{i:0;s:38:\\"sites/default/modules/views/js/base.js\\";i:1;s:6:\\"module\\";i:2;s:6:\\"header\\";i:3;b:0;i:4;b:1;}i:1;a:5:{i:0;s:43:\\"sites/default/modules/views/js/ajax_view.js\\";i:1;s in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:676:\"UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_block'\nquery: UPDATE cache_block SET data = 'a:2:{s:7:\\"subject\\";s:15:\\"Recent Comments\\";s:7:\\"content\\";s:187:\\"<div id=\\"dsq-recentcomments\\" class=\\"dsq-widget\\"><script type=\\"text/javascript\\" src=\\"http://disqus.com/forums/jide/recent_comments_widget.js?num_items=1&hide_avatars=1\\& in /home/jideretu/www/includes/database.mysql.inc on line 135
Blog | jide.fr

Blog

  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter' query: UPDATE cache_filter SET data = '<p>I just released <a href=\"http://jide.github.io/clamp/\">Clamp</a>, a command line tool to make starting a full Apache, PHP, MySQL stack up and running a breeze. Go to your project folder, type \"clamp\" and you\'re good to go !</p>\n<p><strong>But... Why ?</strong></p>\n<p>For local development, you had these options, all of which have their downsides :</p>\n<ul>\n<li>MAMP\n<ul>\n<li>Installs another Apache and PHP on your system</li>\n<li>File structure is a bit messy</li>\n<li>You still have to manually create hosts</li>\n<li>It\'s difficult to have different configurations for each project</li>\n</ul>\n</li>\n<li>Vagrant\n<ul>\n<li>It\'s big</li>\n<li>Adds a layer of complexity</li>\n<li>Since it\'s a VM, it\'s slow</li>\n</ul>\n</li>\n<li>PHP internal server\n<ul>\n<li>Does not run MySQL</li>\n<li>No Apache here, so no extensions etc.</li>\n<li>And of course still no hosts</li>\n</ul>\n</li>\n</ul>\n<p>I\'ve tried all these options, but none gave me what I really needed, something as simple as running node.js or meteor : type something at the command line and get it running !</p>\n<p>I ranted about that on twitter :</p>\n', created = 1513168891, expire = 1513255291, headers = '', serialized = 0 WHERE cid = '1:93022b3fc8de8c882b26b3865b1aa940' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter' query: UPDATE cache_filter SET data = '<p>I just released my first game, Photomime.</p>\n<p>The rules are simple : Someone mimes the picture on the screen while the rest of the team must find it.</p>\n<p>You can play it online on <a href=\"http://photomime.net/\">http://photomime.net/</a> and download the free Android app on <a href=\"https://play.google.com/store/apps/details?id=fr.jide.photomime\">Google Play</a>.</p>\n<p>The game was made using HTML5 / JS and Apache Cordova, I\'ll come back on the technical details later in an in-depth post.</p>\n', created = 1513168891, expire = 1513255291, headers = '', serialized = 0 WHERE cid = '1:bb3787a669dc9a6801c64a16ddc7c531' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter' query: UPDATE cache_filter SET data = '<p>\"Le Moteur De Recherche\", a website to promote a documentary of the french television program canal plus called <a href=\"http://www.canalplus.fr/c-infos-documentaires/pid6032-c-made-in-france.html\">Made in France</a>, has just been released.</p>\n<p>It is a fun search engine which allows you to enter a query and get its french \"equivalent\". For example \"Quentin Tarantino\" gives \"Michel Audiard\" - with multimédia assets and a page of results.</p>\n<p>I was in charge of the development with <a href=\"https://twitter.com/Malharhak\">Anthony Pigeot</a>, and the project was driven by <a href=\"https://twitter.com/BggrThnFctn\">Bigger Than Fiction</a>. </p>\n<p>Technically, we used node js with express and mongo db on the server, bootstrap, less, jade, javascript on the client side, and made some scrapping to grab images and descriptions.</p>\n<p>Try it, it\'s fun ! <a href=\"http://www.canalplus.fr/moteurderecherche\" title=\"http://www.canalplus.fr/moteurderecherche\">http://www.canalplus.fr/moteurderecherche</a></p>\n', created = 1513168891, expire = 1513255291, headers = '', serialized = 0 WHERE cid = '1:325996f3bed0ad084f7a8e04383a7e9c' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter' query: UPDATE cache_filter SET data = '<p>A quick service script to show / hide hidden files in the Finder on Mac OS X.</p>\n<p>Associate the service with a global hotkey and you\'re on !</p>\n<p><script src=\"http://gist.github.com/8824465.js\"></script></p>\n', created = 1513168891, expire = 1513255291, headers = '', serialized = 0 WHERE cid = '1:8ef91a6e0ca2ab15b4626c0b1bfdbada' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter' query: UPDATE cache_filter SET data = '<p>The other day, I stumbled upon this question on stackoverflow on how to cleanly customize Bootstrap :</p>\n<p><a href=\"http://stackoverflow.com/questions/8596794/customizing-bootstrap-css-template/21144524#21144524\" title=\"http://stackoverflow.com/questions/8596794/customizing-bootstrap-css-template/21144524#21144524\">http://stackoverflow.com/questions/8596794/customizing-bootstrap-css-tem...</a></p>\n<p>That pushed me to put this workflow on github :</p>\n<p><a href=\"https://github.com/jide/bootstrap-boilerplate\" title=\"https://github.com/jide/bootstrap-boilerplate\">https://github.com/jide/bootstrap-boilerplate</a></p>\n<p>Clone the repository, and you\'re good to go and customize the variables, mixins and classes of bootstrap while keeping it intact in its own subdirectory. This will allow easy update and keep everything clean.</p>\n<p>Under the hood, I created a Grunt task that automatically copy the variables.less file from bootstrap into your less folder while modifying the font path to be correct. This will be done on your first launch of Grunt.</p>\n<p>But there is also a default variables.less file in case you don\'t want to use grunt.</p>\n', created = 1513168891, expire = 1513255291, headers = '', serialized = 0 WHERE cid = '1:5e7206c10b93a84e766511b9a59c1174' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter' query: UPDATE cache_filter SET data = '<p>On webkit browsers on mac, font smoothing is kind of too bold. The known hack for this is to use :</p>\n<p><code>html {<br />\n -webkit-font-smoothing: antialiased;<br />\n}</code></p>\n<p>But this won\'t work on form elements such as inputs and also on elements having \"-webkit-appearance\" set to a similar value. So :</p>\n<p><code>html, input, textarea, select, button {<br />\n -webkit-font-smoothing: antialiased;<br />\n}</code></p>\n<p>And voilà !</p>\n', created = 1513168891, expire = 1513255291, headers = '', serialized = 0 WHERE cid = '1:ed0d422ea9cc1b6048b861103ead783f' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter' query: UPDATE cache_filter SET data = '<p>I had to replace words in a text while keeping the capitalization in Javascript.</p>\n<p>Given the text :<br />\n\"It is a good burger. Or an hamburger. Burger is good\".</p>\n<p>With the replacement word \"sandwich\", it should become :<br />\n\"It is a good sandwich. Or an hamburger. Sandwich is good\".</p>\n<p>It has 2 challenges :</p>\n<ul>\n<li>Match only real words, e.g. match \"burger\", but not \"hamburger\"</li>\n<li>Keep the capitalization of the word, e.g. \"Burger\" should become \"Sandwich\"</li>\n</ul>\n<p>For the first one, we should use lookahead and lookbehind features of regular expressions, but unfortunately, in javascript there is no lookbehind, so we have to capture that part and return it with the result.</p>\n<p>So here we go :<br />\n<code>var replace = function(text, r, v) {<br />\n return text.replace(new RegExp(\'([^a-z])(\'+r+\')|(^\'+r+\')(?=[^a-z]?)\', \"gi\"), function(match, p1, p2, p3, offset, string) {<br />\n p1 = p1 || \'\';<br />\n p2 = p2 || p3;<br />\n if (p2[0].toUpperCase() == p2[0]) {<br />\n // Assume its all caps.<br />\n if (p2[1].toUpperCase() == p2[1]) {<br />\n v = v.toUpperCase();<br />\n }<br />\n // Assume its capitalized.<br />\n else {<br />\n v = v[0].toUpperCase() + v.slice(1);<br />\n }<br />\n }</code></p>\n', created = 1513168891, expire = 1513255291, headers = '', serialized = 0 WHERE cid = '1:d31c6b1f7c584b9d02e608ca0c8b80cb' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter' query: UPDATE cache_filter SET data = '<p>I\'ve had hard times setting up a LAMP Vagrant box. There are tons of \"tutorials\", but none gave me the right direction to have a fully functional LAMP stack running as localhost.</p>\n<p>So, hey, since I\'m a nice guy, I\'ll spare you some headaches and tell you how you can do it easily.</p>\n<p>We\'ll use this box : <a href=\"https://github.com/TomJaeger/vagrant-puppet-lamp\" title=\"https://github.com/TomJaeger/vagrant-puppet-lamp\">https://github.com/TomJaeger/vagrant-puppet-lamp</a>, which has Apache, PHP and MySQL.</p>\n<ol>\n<li>Obviously, you\'ll need <a href=\"http://www.vagrantup.com\">Vagrant</a> and <a href=\"http://www.virtualbox.org\">VirtualBox</a>. Go get them, and install both.</li>\n<li>Clone the repo : <code>git clone https://github.com/TomJaeger/vagrant-puppet-lamp.git</code></li>\n<li>Go to the box folder : <code>cd vagrant-puppet-lamp</code></li>\n<li>Run the VM: <code>vagrant up</code></li>\n<li>Connect to the VM via SSH: <code>vagrant ssh</code></li>\n<li>The tricky part: Run postinstall.sh as a sudoer: <code>sudo ./postinstall.sh</code></li>\n<li>It works ! Visit <a href=\"http://localhost:8080\">http://localhost:8080</a>. You can access MySQL at localhost:8889 with user \"root\" and password \"root\".</li>\n</ol>\n', created = 1513168891, expire = 1513255291, headers = '', serialized = 0 WHERE cid = '1:c3e2cf52082f5d58a4abc9ebf9d12853' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter' query: UPDATE cache_filter SET data = '<p>Edit: As Pol said in comments, you can use the openlayers_taxonomy module to do this. But it turns out I had to use content types as layers too, so this technique still was useful to me. Thank you Pol :)</p>\n<p> I wanted to create layers depending on some taxonomy terms with Openlayers. But the only way to create layers with views is to add one display per layer. What if you want as many layers as terms ? Some Views trickery to the rescue !</p>\n<ol>\n<li>Create your Openlayers view.</li>\n<li>Add a layer display for the first term.</li>\n<li>Create a filter for the term.</li>\n<li>Export the view through code.</li>\n</ol>\n<p>Then, edit the view code to create one layer per term :<br />\n<code>/**<br />\n * Implements hook_views_default_views().<br />\n */<br />\nfunction MYMODULE_views_default_views() {<br />\n $vocabulary = taxonomy_vocabulary_machine_name_load(\'VOCABULARY_NAME\');<br />\n $terms = taxonomy_get_tree($vocabulary-&gt;vid);<br />\n // Your view code for the master display...<br />\n foreach($terms as $term) {<br />\n $handler = $view-&gt;new_display(\'openlayers\', $term-&gt;name, \'layer_\' . $term-&gt;tid);<br />\n // The display code...<br />\n $handler-&gt;display-&gt;display_options[\'filters\'][\'tid\'][\'value\'] = array(</code></p>\n', created = 1513168891, expire = 1513255291, headers = '', serialized = 0 WHERE cid = '1:96b2e1305e4ea53571532d0df223da34' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter' query: UPDATE cache_filter SET data = '<p>I see that everytime, mostly in Wordpress / Drupal / Whatever templates :</p>\n<p><code>&lt;ol class=\"commentlist\"&gt;<br />\n...<br />\n&lt;/ol&gt;&lt;!-- .commentlist --&gt;</code></p>\n<p>Don\'t ! here is why :</p>\n<ul>\n<li>No one but an hypothetic future developer will ever need this. But you serve it to the entire world.</li>\n<li>It makes HTML file heavier, since the browser will download these comments. At least use PHP comments.</li>\n<li>With correct indentation, this is most of the times useless. Code is readable enough if correctly indented. It is actually less readable and adds noise.</li>\n</ul>\n', created = 1513168891, expire = 1513255291, headers = '', serialized = 0 WHERE cid = '1:35576b17fc0b2f8e5327205e81439074' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_views_data' query: UPDATE cache_views_data SET data = 'a:3:{s:6:\"result\";a:74:{i:0;O:8:\"stdClass\":1:{s:3:\"nid\";s:1:\"4\";}i:1;O:8:\"stdClass\":1:{s:3:\"nid\";s:1:\"2\";}i:2;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"47\";}i:3;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"48\";}i:4;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"54\";}i:5;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"60\";}i:6;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"62\";}i:7;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"63\";}i:8;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"65\";}i:9;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"67\";}i:10;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"69\";}i:11;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"72\";}i:12;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"74\";}i:13;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"76\";}i:14;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"78\";}i:15;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"80\";}i:16;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"83\";}i:17;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"84\";}i:18;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"87\";}i:19;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"90\";}i:20;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"92\";}i:21;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"94\";}i:22;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"95\";}i:23;O:8:\"stdClass\":1:{s:3:\"nid\";s:2:\"98\";}i:24;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"100\";}i:25;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"101\";}i:26;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"104\";}i:27;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"106\";}i:28;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"108\";}i:29;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"110\";}i:30;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"111\";}i:31;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"113\";}i:32;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"118\";}i:33;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"119\";}i:34;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"121\";}i:35;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"124\";}i:36;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"126\";}i:37;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"128\";}i:38;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"130\";}i:39;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"132\";}i:40;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"134\";}i:41;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"135\";}i:42;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"138\";}i:43;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"142\";}i:44;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"144\";}i:45;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"145\";}i:46;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"147\";}i:47;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"149\";}i:48;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"151\";}i:49;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"153\";}i:50;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"155\";}i:51;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"158\";}i:52;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"159\";}i:53;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"161\";}i:54;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"163\";}i:55;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"165\";}i:56;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"167\";}i:57;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"169\";}i:58;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"171\";}i:59;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"173\";}i:60;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"187\";}i:61;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"188\";}i:62;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"190\";}i:63;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"192\";}i:64;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"194\";}i:65;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"200\";}i:66;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"203\";}i:67;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"205\";}i:68;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"208\";}i:69;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"209\";}i:70;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"211\";}i:71;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"213\";}i:72;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"215\";}i:73;O:8:\"stdClass\":1:{s:3:\"nid\";s:3:\"217\";}}s:10:\"total_rows\";i:74;s:5:\"pager\";a:5:{s:9:\"use_pager\";b:0;s:14:\"items_per_page\";i:0;s:7:\"element\";i:0;s:6:\"offset\";i:0;s:12:\"current_page\";i:0;}}', created = 1513168891, expire = 1513172491, headers = '', serialized = 1 WHERE cid = 'tagadelic:block_1:results:df7698768c2ebddfd03250b8028121ce' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_views_data' query: UPDATE cache_views_data SET data = 'a:4:{s:4:\"head\";s:0:\"\";s:3:\"css\";a:0:{}s:2:\"js\";a:0:{}s:6:\"output\";s:3576:\"<div class=\"view view-tagadelic view-id-tagadelic view-display-id-block_1 view-dom-id-1\">\n \n \n \n <div class=\"view-content\">\n <div class=\"tagadelic_views\"><a href=\"/english/android-0\" class=\"tagadelic level1\" rel=\"tag\">android</a> \n<a href=\"/english/apache-0\" class=\"tagadelic level1\" rel=\"tag\">Apache</a> \n<a href=\"/english/automator-0\" class=\"tagadelic level1\" rel=\"tag\">Automator</a> \n<a href=\"/english/bootstrap-0\" class=\"tagadelic level3\" rel=\"tag\">bootstrap</a> \n<a href=\"/english/canal-0\" class=\"tagadelic level1\" rel=\"tag\">canal +</a> \n<a href=\"/english/command-line-0\" class=\"tagadelic level1\" rel=\"tag\">Command line</a> \n<a href=\"/english/css\" class=\"tagadelic level1\" rel=\"tag\">CSS</a> \n<a href=\"/english/css-0\" class=\"tagadelic level1\" rel=\"tag\">CSS</a> \n<a href=\"/english/customize-0\" class=\"tagadelic level1\" rel=\"tag\">customize</a> \n<a href=\"/english/drupal-0\" class=\"tagadelic level5\" rel=\"tag\">Drupal</a> \n<a href=\"/english/drupal\" class=\"tagadelic level2\" rel=\"tag\">Drupal</a> \n<a href=\"/english/dwmapi-0\" class=\"tagadelic level1\" rel=\"tag\">Dwmapi</a> \n<a href=\"/english/facebook-0\" class=\"tagadelic level1\" rel=\"tag\">Facebook</a> \n<a href=\"/english/finder-0\" class=\"tagadelic level1\" rel=\"tag\">Finder</a> \n<a href=\"/english/freshy-0\" class=\"tagadelic level1\" rel=\"tag\">freshy</a> \n<a href=\"/english/game-0\" class=\"tagadelic level1\" rel=\"tag\">game</a> \n<a href=\"/english/git-0\" class=\"tagadelic level1\" rel=\"tag\">GIT</a> \n<a href=\"/english/github-0\" class=\"tagadelic level1\" rel=\"tag\">github</a> \n<a href=\"/english/grunt-0\" class=\"tagadelic level1\" rel=\"tag\">grunt</a> \n<a href=\"/english/html\" class=\"tagadelic level1\" rel=\"tag\">HTML</a> \n<a href=\"/english/javascript-0\" class=\"tagadelic level2\" rel=\"tag\">javascript</a> \n<a href=\"/english/jidefr-0\" class=\"tagadelic level1\" rel=\"tag\">jide.fr</a> \n<a href=\"/english/jquery\" class=\"tagadelic level1\" rel=\"tag\">jQuery</a> \n<a href=\"/english/jquery-ui\" class=\"tagadelic level2\" rel=\"tag\">jQuery UI</a> \n<a href=\"/english/lamp\" class=\"tagadelic level1\" rel=\"tag\">LAMP</a> \n<a href=\"/english/le-moteur-de-recherche-0\" class=\"tagadelic level1\" rel=\"tag\">le moteur de recherche</a> \n<a href=\"/english/less-0\" class=\"tagadelic level2\" rel=\"tag\">less</a> \n<a href=\"/english/mac-os-x-0\" class=\"tagadelic level1\" rel=\"tag\">Mac OS X</a> \n<a href=\"/english/made-in-france-0\" class=\"tagadelic level1\" rel=\"tag\">made in france</a> \n<a href=\"/english/mobile-0\" class=\"tagadelic level1\" rel=\"tag\">mobile</a> \n<a href=\"/english/mongo-db-0\" class=\"tagadelic level1\" rel=\"tag\">mongo db</a> \n<a href=\"/english/mysql-0\" class=\"tagadelic level1\" rel=\"tag\">MySQL</a> \n<a href=\"/english/nodejs-0\" class=\"tagadelic level1\" rel=\"tag\">nodejs</a> \n<a href=\"/english/openlayers\" class=\"tagadelic level1\" rel=\"tag\">Openlayers</a> \n<a href=\"/english/php-0\" class=\"tagadelic level2\" rel=\"tag\">PHP</a> \n<a href=\"/english/qt-0\" class=\"tagadelic level1\" rel=\"tag\">Qt</a> \n<a href=\"/english/queue-api-0\" class=\"tagadelic level1\" rel=\"tag\">Queue API</a> \n<a href=\"/english/ruby-0\" class=\"tagadelic level1\" rel=\"tag\">Ruby</a> \n<a href=\"/english/rules-0\" class=\"tagadelic level1\" rel=\"tag\">Rules</a> \n<a href=\"/english/vagrant\" class=\"tagadelic level1\" rel=\"tag\">Vagrant</a> \n<a href=\"/english/views\" class=\"tagadelic level1\" rel=\"tag\">Views</a> \n<a href=\"/english/windows-api-0\" class=\"tagadelic level1\" rel=\"tag\">Windows API</a> \n<a href=\"/english/wordpress\" class=\"tagadelic level3\" rel=\"tag\">wordpress</a> \n<a href=\"/english/wordpress-0\" class=\"tagadelic level6\" rel=\"tag\">wordpress</a> \n</div> </div>\n \n \n \n \n \n \n</div> \";}', created = 1513168891, expire = 1513172491, headers = '', serialized = 1 WHERE cid = 'tagadelic:block_1:output:212c410e5663f0d1e92c8074a36546f9' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_block' query: UPDATE cache_block SET data = 'a:2:{s:7:\"content\";s:3576:\"<div class=\"view view-tagadelic view-id-tagadelic view-display-id-block_1 view-dom-id-1\">\n \n \n \n <div class=\"view-content\">\n <div class=\"tagadelic_views\"><a href=\"/english/android-0\" class=\"tagadelic level1\" rel=\"tag\">android</a> \n<a href=\"/english/apache-0\" class=\"tagadelic level1\" rel=\"tag\">Apache</a> \n<a href=\"/english/automator-0\" class=\"tagadelic level1\" rel=\"tag\">Automator</a> \n<a href=\"/english/bootstrap-0\" class=\"tagadelic level3\" rel=\"tag\">bootstrap</a> \n<a href=\"/english/canal-0\" class=\"tagadelic level1\" rel=\"tag\">canal +</a> \n<a href=\"/english/command-line-0\" class=\"tagadelic level1\" rel=\"tag\">Command line</a> \n<a href=\"/english/css\" class=\"tagadelic level1\" rel=\"tag\">CSS</a> \n<a href=\"/english/css-0\" class=\"tagadelic level1\" rel=\"tag\">CSS</a> \n<a href=\"/english/customize-0\" class=\"tagadelic level1\" rel=\"tag\">customize</a> \n<a href=\"/english/drupal-0\" class=\"tagadelic level5\" rel=\"tag\">Drupal</a> \n<a href=\"/english/drupal\" class=\"tagadelic level2\" rel=\"tag\">Drupal</a> \n<a href=\"/english/dwmapi-0\" class=\"tagadelic level1\" rel=\"tag\">Dwmapi</a> \n<a href=\"/english/facebook-0\" class=\"tagadelic level1\" rel=\"tag\">Facebook</a> \n<a href=\"/english/finder-0\" class=\"tagadelic level1\" rel=\"tag\">Finder</a> \n<a href=\"/english/freshy-0\" class=\"tagadelic level1\" rel=\"tag\">freshy</a> \n<a href=\"/english/game-0\" class=\"tagadelic level1\" rel=\"tag\">game</a> \n<a href=\"/english/git-0\" class=\"tagadelic level1\" rel=\"tag\">GIT</a> \n<a href=\"/english/github-0\" class=\"tagadelic level1\" rel=\"tag\">github</a> \n<a href=\"/english/grunt-0\" class=\"tagadelic level1\" rel=\"tag\">grunt</a> \n<a href=\"/english/html\" class=\"tagadelic level1\" rel=\"tag\">HTML</a> \n<a href=\"/english/javascript-0\" class=\"tagadelic level2\" rel=\"tag\">javascript</a> \n<a href=\"/english/jidefr-0\" class=\"tagadelic level1\" rel=\"tag\">jide.fr</a> \n<a href=\"/english/jquery\" class=\"tagadelic level1\" rel=\"tag\">jQuery</a> \n<a href=\"/english/jquery-ui\" class=\"tagadelic level2\" rel=\"tag\">jQuery UI</a> \n<a href=\"/english/lamp\" class=\"tagadelic level1\" rel=\"tag\">LAMP</a> \n<a href=\"/english/le-moteur-de-recherche-0\" class=\"tagadelic level1\" rel=\"tag\">le moteur de recherche</a> \n<a href=\"/english/less-0\" class=\"tagadelic level2\" rel=\"tag\">less</a> \n<a href=\"/english/mac-os-x-0\" class=\"tagadelic level1\" rel=\"tag\">Mac OS X</a> \n<a href=\"/english/made-in-france-0\" class=\"tagadelic level1\" rel=\"tag\">made in france</a> \n<a href=\"/english/mobile-0\" class=\"tagadelic level1\" rel=\"tag\">mobile</a> \n<a href=\"/english/mongo-db-0\" class=\"tagadelic level1\" rel=\"tag\">mongo db</a> \n<a href=\"/english/mysql-0\" class=\"tagadelic level1\" rel=\"tag\">MySQL</a> \n<a href=\"/english/nodejs-0\" class=\"tagadelic level1\" rel=\"tag\">nodejs</a> \n<a href=\"/english/openlayers\" class=\"tagadelic level1\" rel=\"tag\">Openlayers</a> \n<a href=\"/english/php-0\" class=\"tagadelic level2\" rel=\"tag\">PHP</a> \n<a href=\"/english/qt-0\" class=\"tagadelic level1\" rel=\"tag\">Qt</a> \n<a href=\"/english/queue-api-0\" class=\"tagadelic level1\" rel=\"tag\">Queue API</a> \n<a href=\"/english/ruby-0\" class=\"tagadelic level1\" rel=\"tag\">Ruby</a> \n<a href=\"/english/rules-0\" class=\"tagadelic level1\" rel=\"tag\">Rules</a> \n<a href=\"/english/vagrant\" class=\"tagadelic level1\" rel=\"tag\">Vagrant</a> \n<a href=\"/english/views\" class=\"tagadelic level1\" rel=\"tag\">Views</a> \n<a href=\"/english/windows-api-0\" class=\"tagadelic level1\" rel=\"tag\">Windows API</a> \n<a href=\"/english/wordpress\" class=\"tagadelic level3\" rel=\"tag\">wordpress</a> \n<a href=\"/english/wordpress-0\" class=\"tagadelic level6\" rel=\"tag\">wordpress</a> \n</div> </div>\n \n \n \n \n \n \n</div> \";s:7:\"subject\";s:4:\"Tags\";}', created = 1513168891, expire = -1, headers = '', serialized = 1 WHERE cid = 'views:tagadelic-block_1:kewl:en:http://jide.fr/' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_filter' query: UPDATE cache_filter SET data = '<p>Follow me : <a href=\"http://twitter.com/jidefr\">jidefr</a></p>\n', created = 1513168891, expire = 1513255291, headers = '', serialized = 0 WHERE cid = '1:fb82f31c75d9dcc2908dc560fa3f9280' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_views_data' query: UPDATE cache_views_data SET data = 'a:3:{s:6:\"result\";a:1:{i:0;O:8:\"stdClass\":3:{s:10:\"twitter_id\";s:18:\"937070315510861824\";s:12:\"twitter_text\";s:143:\"RT @PhilippeCorbe: Si vous avez du mal à comprendre l\'affaire russe, et l\'importance de l\'information du jour, le plaider coupable de l\'anc…\";s:20:\"twitter_created_time\";s:10:\"1512249947\";}}s:10:\"total_rows\";N;s:5:\"pager\";a:5:{s:9:\"use_pager\";s:1:\"0\";s:14:\"items_per_page\";i:1;s:7:\"element\";i:0;s:6:\"offset\";i:0;s:12:\"current_page\";i:0;}}', created = 1513168891, expire = 1513172491, headers = '', serialized = 1 WHERE cid = 'tweets:block:results:abade98d09b37b5aee273d3842ed8356' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_views_data' query: UPDATE cache_views_data SET data = 'a:4:{s:4:\"head\";s:0:\"\";s:3:\"css\";a:0:{}s:2:\"js\";a:3:{i:0;a:5:{i:0;s:38:\"sites/default/modules/views/js/base.js\";i:1;s:6:\"module\";i:2;s:6:\"header\";i:3;b:0;i:4;b:1;}i:1;a:5:{i:0;s:43:\"sites/default/modules/views/js/ajax_view.js\";i:1;s:6:\"module\";i:2;s:6:\"header\";i:3;b:0;i:4;b:1;}i:2;a:3:{i:0;a:1:{s:5:\"views\";a:2:{s:9:\"ajax_path\";s:19:\"/english/views/ajax\";s:9:\"ajaxViews\";a:1:{i:0;a:7:{s:9:\"view_name\";s:6:\"tweets\";s:15:\"view_display_id\";s:5:\"block\";s:9:\"view_args\";s:0:\"\";s:9:\"view_path\";s:4:\"blog\";s:14:\"view_base_path\";N;s:11:\"view_dom_id\";i:2;s:13:\"pager_element\";i:0;}}}}i:1;s:7:\"setting\";i:2;s:6:\"header\";}}s:6:\"output\";s:732:\"<div class=\"view view-tweets view-id-tweets view-display-id-block view-dom-id-2\">\n \n \n \n <div class=\"view-content\">\n <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n \n <span class=\"views-field-text\">\n <span class=\"field-content\">RT <a target=\"_blank\" rel=\"nofollow\" href=\"http://twitter.com/PhilippeCorbe\">@PhilippeCorbe</a>: Si vous avez du mal à comprendre l\'affaire russe, et l\'importance de l\'information du jour, le plaider coupable de l\'anc…</span>\n </span>\n &#8212; \n <span class=\"views-field-created-time\">\n <span class=\"field-content\"><em>1 week 3 days</em> ago</span>\n </span>\n </div>\n </div>\n \n \n \n \n \n \n</div> \";}', created = 1513168891, expire = 1513172491, headers = '', serialized = 1 WHERE cid = 'tweets:block:output:adbd610c4e0a28b090b029fa9f176084' in /home/jideretu/www/includes/cache.inc on line 112.
  • user warning: UPDATE command denied to user 'jideretumysql'@'10.0.66.38' for table 'cache_block' query: UPDATE cache_block SET data = 'a:2:{s:7:\"subject\";s:15:\"Recent Comments\";s:7:\"content\";s:187:\"<div id=\"dsq-recentcomments\" class=\"dsq-widget\"><script type=\"text/javascript\" src=\"http://disqus.com/forums/jide/recent_comments_widget.js?num_items=1&amp;hide_avatars=1\"></script></div>\";}', created = 1513168891, expire = -1, headers = '', serialized = 1 WHERE cid = 'disqus:disqus_recent_comments:kewl:en' in /home/jideretu/www/includes/cache.inc on line 112.

I just released Clamp, a command line tool to make starting a full Apache, PHP, MySQL stack up and running a breeze. Go to your project folder, type "clamp" and you're good to go !

But... Why ?

For local development, you had these options, all of which have their downsides :

  • MAMP
    • Installs another Apache and PHP on your system
    • File structure is a bit messy
    • You still have to manually create hosts
    • It's difficult to have different configurations for each project
  • Vagrant
    • It's big
    • Adds a layer of complexity
    • Since it's a VM, it's slow
  • PHP internal server
    • Does not run MySQL
    • No Apache here, so no extensions etc.
    • And of course still no hosts

I've tried all these options, but none gave me what I really needed, something as simple as running node.js or meteor : type something at the command line and get it running !

I ranted about that on twitter :

I just released my first game, Photomime.

The rules are simple : Someone mimes the picture on the screen while the rest of the team must find it.

You can play it online on http://photomime.net/ and download the free Android app on Google Play.

The game was made using HTML5 / JS and Apache Cordova, I'll come back on the technical details later in an in-depth post.

"Le Moteur De Recherche", a website to promote a documentary of the french television program canal plus called Made in France, has just been released.

It is a fun search engine which allows you to enter a query and get its french "equivalent". For example "Quentin Tarantino" gives "Michel Audiard" - with multimédia assets and a page of results.

I was in charge of the development with Anthony Pigeot, and the project was driven by Bigger Than Fiction.

Technically, we used node js with express and mongo db on the server, bootstrap, less, jade, javascript on the client side, and made some scrapping to grab images and descriptions.

Try it, it's fun ! http://www.canalplus.fr/moteurderecherche

A quick service script to show / hide hidden files in the Finder on Mac OS X.

Associate the service with a global hotkey and you're on !

The other day, I stumbled upon this question on stackoverflow on how to cleanly customize Bootstrap :

http://stackoverflow.com/questions/8596794/customizing-bootstrap-css-tem...

That pushed me to put this workflow on github :

https://github.com/jide/bootstrap-boilerplate

Clone the repository, and you're good to go and customize the variables, mixins and classes of bootstrap while keeping it intact in its own subdirectory. This will allow easy update and keep everything clean.

Under the hood, I created a Grunt task that automatically copy the variables.less file from bootstrap into your less folder while modifying the font path to be correct. This will be done on your first launch of Grunt.

But there is also a default variables.less file in case you don't want to use grunt.

On webkit browsers on mac, font smoothing is kind of too bold. The known hack for this is to use :

html {
-webkit-font-smoothing: antialiased;
}

But this won't work on form elements such as inputs and also on elements having "-webkit-appearance" set to a similar value. So :

html, input, textarea, select, button {
-webkit-font-smoothing: antialiased;
}

And voilà !

I had to replace words in a text while keeping the capitalization in Javascript.

Given the text :
"It is a good burger. Or an hamburger. Burger is good".

With the replacement word "sandwich", it should become :
"It is a good sandwich. Or an hamburger. Sandwich is good".

It has 2 challenges :

  • Match only real words, e.g. match "burger", but not "hamburger"
  • Keep the capitalization of the word, e.g. "Burger" should become "Sandwich"

For the first one, we should use lookahead and lookbehind features of regular expressions, but unfortunately, in javascript there is no lookbehind, so we have to capture that part and return it with the result.

So here we go :
var replace = function(text, r, v) {
return text.replace(new RegExp('([^a-z])('+r+')|(^'+r+')(?=[^a-z]?)', "gi"), function(match, p1, p2, p3, offset, string) {
p1 = p1 || '';
p2 = p2 || p3;
if (p2[0].toUpperCase() == p2[0]) {
// Assume its all caps.
if (p2[1].toUpperCase() == p2[1]) {
v = v.toUpperCase();
}
// Assume its capitalized.
else {
v = v[0].toUpperCase() + v.slice(1);
}
}

I've had hard times setting up a LAMP Vagrant box. There are tons of "tutorials", but none gave me the right direction to have a fully functional LAMP stack running as localhost.

So, hey, since I'm a nice guy, I'll spare you some headaches and tell you how you can do it easily.

We'll use this box : https://github.com/TomJaeger/vagrant-puppet-lamp, which has Apache, PHP and MySQL.

  1. Obviously, you'll need Vagrant and VirtualBox. Go get them, and install both.
  2. Clone the repo : git clone https://github.com/TomJaeger/vagrant-puppet-lamp.git
  3. Go to the box folder : cd vagrant-puppet-lamp
  4. Run the VM: vagrant up
  5. Connect to the VM via SSH: vagrant ssh
  6. The tricky part: Run postinstall.sh as a sudoer: sudo ./postinstall.sh
  7. It works ! Visit http://localhost:8080. You can access MySQL at localhost:8889 with user "root" and password "root".

Edit: As Pol said in comments, you can use the openlayers_taxonomy module to do this. But it turns out I had to use content types as layers too, so this technique still was useful to me. Thank you Pol :)

I wanted to create layers depending on some taxonomy terms with Openlayers. But the only way to create layers with views is to add one display per layer. What if you want as many layers as terms ? Some Views trickery to the rescue !

  1. Create your Openlayers view.
  2. Add a layer display for the first term.
  3. Create a filter for the term.
  4. Export the view through code.

Then, edit the view code to create one layer per term :
/**
* Implements hook_views_default_views().
*/
function MYMODULE_views_default_views() {
$vocabulary = taxonomy_vocabulary_machine_name_load('VOCABULARY_NAME');
$terms = taxonomy_get_tree($vocabulary->vid);
// Your view code for the master display...
foreach($terms as $term) {
$handler = $view->new_display('openlayers', $term->name, 'layer_' . $term->tid);
// The display code...
$handler->display->display_options['filters']['tid']['value'] = array(

I see that everytime, mostly in Wordpress / Drupal / Whatever templates :

<ol class="commentlist">
...
</ol><!-- .commentlist -->

Don't ! here is why :

  • No one but an hypothetic future developer will ever need this. But you serve it to the entire world.
  • It makes HTML file heavier, since the browser will download these comments. At least use PHP comments.
  • With correct indentation, this is most of the times useless. Code is readable enough if correctly indented. It is actually less readable and adds noise.
Syndicate content

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:0:\"\";s:5:\"%file\";s:37:\"/home/jideretu/www/includes/cache.inc\";s:5:\"%line\";i:112;}', 3, '', 'http://jide.fr/', '', '54.242.205.33', 1513168892) in /home/jideretu/www/includes/database.mysql.inc on line 135

Warning: INSERT command denied to user 'jideretumysql'@'10.0.66.38' for table 'watchdog' query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:429:\"UPDATE command denied to user &#039;jideretumysql&#039;@&#039;10.0.66.38&#039; for table &#039;sessions&#039;\nquery: UPDATE sessions SET uid = 0, cache = 0, hostname = &#039;54.242.205.33&#039;, session = &#039;messages|a:1:{s:5:\\&quot;error\\&quot;;a:1:{i:0;s:68:\\&quot;user warning: in /home/jideretu/www/includes/cache.inc on line 112.\\&quot;;}}&#039;, timestamp = 1513168892 WHERE sid = &#039;euqpqvuu3rf0c2cpljkbtno8d2&#039;\";s:5:\"%file\";s:39:\"/home/jideretu/www/includes/session.inc\";s:5:\"%lin in /home/jideretu/www/includes/database.mysql.inc on line 135