Skip to content

Instantly share code, notes, and snippets.

View jacquesbh's full-sized avatar
👋
Hey!

Jacques Bodin-Hullin jacquesbh

👋
Hey!
View GitHub Profile
@jacquesbh
jacquesbh / decorate_method.php
Created July 4, 2012 09:29
Magento - Grid column decorator for 'actions' depending on row
<?php
/**
* Decorate the actions column
* @access public
* @return string
*/
public function decorateActionColumn($value, $row, $column, $isExport)
{
$links = array();
@jacquesbh
jacquesbh / .vimrc
Last active October 6, 2015 19:17
Simple .vimrc for servers
set nocompatible
set encoding=utf-8
filetype on
filetype plugin on
filetype indent on
syntax enable
set background=dark
set number
set laststatus=2
set cmdheight=1
@jacquesbh
jacquesbh / php-config.txt
Created July 3, 2012 12:17
My PHP configure command line for Max OS X (works for Magento)
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli=mysqlnd --with-mysqli=shared,mysqlnd --with-curl --with-mcrypt --with-gd --with-libxml-dir=/usr --with-openssl=/usr --enable-exif --with-freetype-dir=/usr/X11R6 --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6 --enable-gd-native-ttf --with-icu-dir=/usr --with-iodbc=/usr --with-ldap=/usr --with-ldap-sasl=/usr --with-libedit=/usr --enable-mbstring --enable-mbregex --with-tidy --enable-pdo --with-pdo-mysql --with-config-file-path=/conf --with-pear --with-zlib=/usr --with-bz2=/usr --with-kerberos --enable-soap --enable-ftp --enable-zip
@jacquesbh
jacquesbh / colors.php
Created June 25, 2012 19:53
Hexa colors in PHP loop
<?php
define('PAD', 1);
define('WIDTH', 1);
define('HEIGHT', 1);
ob_start();
echo '<table cellspacing="0" cellpadding="0" border="0" style="margin: 0; padding: 0;">';
@jacquesbh
jacquesbh / netbeans_magento_snippets.xml
Last active July 26, 2016 16:45
Magento snippets
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE codetemplates PUBLIC "-//NetBeans//DTD Editor Code Templates settings 1.0//EN" "http://www.netbeans.org/dtds/EditorCodeTemplates-1_0.dtd">
<codetemplates>
<codetemplate abbreviation="gsc" xml:space="preserve">
<code><![CDATA[Mage::getStoreConfig('${cursor}')]]></code>
</codetemplate>
<codetemplate abbreviation="model" xml:space="preserve">
<code><![CDATA[Mage::getModel('${cursor}')]]></code>
</codetemplate>
<codetemplate abbreviation="single" xml:space="preserve">