Skip to content

Instantly share code, notes, and snippets.

View jacquesbh's full-sized avatar
🏠
Working from home

Jacques Bodin-Hullin jacquesbh

🏠
Working from home
View GitHub Profile
_site
We can make this file beautiful and searchable if this error is corrected: Any value after quoted field isn't allowed in line 1.
"stores";"sku";"filename";"attributes";"exclude"
"admin";"HTC Touch Diamond";"htc_touch_diamond.png";"image";"no"
"admin,default,french";"intelc2d";"intelc2d.png";"";"yes"
"german";"intelc2d";"intelc2d.png";"small_image,thumbnail";"no"
<?php
Zend_Debug::dump(Mage::app()->getLayout()->getUpdate()->getHandles());
@jacquesbh
jacquesbh / core_text.xml
Last active December 10, 2015 02:09
Ajouter un script externe au header sur Magento (http://jacques.sh/ajouter-un-script-externe-au-header-sur-magento.html)
<block type="core/text" name="head.jquery">
<action method="setText">
<text><![CDATA[<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>]]></text>
</action>
</block>
@jacquesbh
jacquesbh / example_01.php
Last active October 10, 2015 06:08
[blog] Le cache des blocks sur Magento (http://jacques.sh/le-cache-des-blocks-sur-magento.html)
<?php
namespace Jbh;
class Counter
{
use \Jbh\Db;
protected $_cache = [];
@jacquesbh
jacquesbh / a
Created September 3, 2012 07:59
[post] Git en entreprise (http://jacques.sh/git-en-entreprise.html)
We couldn’t find that file to show.
http://sam.zoy.org/wtfpl/COPYING
@jacquesbh
jacquesbh / boobs.php
Created August 7, 2012 08:22
One char upper, One char lower
echo trim(preg_replace_callback('/(.)(.)/isU', function ($matches) {
return strtoupper($matches[1]) . strtolower($matches[2]);
}, $txt));
<?xml version="1.0" encoding="utf-8" ?>
<!--
/**
* This file is part of Jbh_Webservice for Magento.
*
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
@jacquesbh
jacquesbh / misc-change_admin_password.php
Created July 18, 2012 23:06
Script for change admin password
<?php
declare(ticks = 1);
// Mage !
require_once __DIR__ . '/../app/Mage.php';
// Usage function :)
function usage()
{