Skip to content

Instantly share code, notes, and snippets.

View JulienBreux's full-sized avatar

Julien Breux JulienBreux

View GitHub Profile
@JulienBreux
JulienBreux / layout.html
Created August 6, 2012 13:11
HTML5 - Simple layout
<!doctype html>
<!--[if lt IE 7 ]> <html lang="fr" class="lang-fr no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="fr" class="lang-fr no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="fr" class="lang-fr no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="fr" class="lang-fr no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="fr" class="lang-fr no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@JulienBreux
JulienBreux / .profile
Created April 26, 2012 16:07
Mac Profile
# Alias
alias apache='sudo /opt/local/apache2/bin/apachectl'
alias mysqlstart='sudo /opt/local/bin/mysqld_safe5 &'
alias mysqlstop='sudo /opt/local/bin/mysqladmin5 -u root -p shutdown'
alias ls='ls -G'
alias ll='ls -hl'
# Sources
# Use (http://www.git-attitude.fr/2010/07/14/le-prompt-bash-qui-change-la-vie-avec-git/)
source "$HOME/.git-completion.bash" &&
@JulienBreux
JulienBreux / gist:2427846
Created April 20, 2012 11:17
Remove website (sudo ./removeSite.php <user> <host>)
#!/usr/bin/php
<?php
define('SUCCESS', "\033[32m".'OK'."\033[37m - ");
define('WARN', "\033[31m".'INFO'."\033[37m - ");
define('EOL', "\n");
## FUNCTIONS
function pecho($string) {fwrite(STDOUT, $string);}
@JulienBreux
JulienBreux / gist:2427844
Created April 20, 2012 11:16
Add website (sudo ./addSite.php <user> <host> <alias>)
#!/usr/bin/php
<?php
define('SUCCESS', "\033[32m".'OK'."\033[37m - ");
define('WARN', "\033[31m".'INFO'."\033[37m - ");
define('EOL', "\n");
## FUNCTIONS
function pecho($string) {fwrite(STDOUT, $string);}
@JulienBreux
JulienBreux / BlockTags.php
Created April 2, 2012 22:41
PrestaShop 1.5.x - Module override in themes
<?php
/**
* Example of override of Block Tags module
*
* @version 1.0.0
* @author Julien BREUX <julien.breux@prestashop.com>
*/
class BlockTagsTheme extends BlockTags
{
//...
@JulienBreux
JulienBreux / DbFactory.php
Created April 2, 2012 22:12
PrestaShop 1.5.x - Database Factory
<?php
/**
* Database Factory
* Use this factory for connections to external databases
*
* @version 1.0.0
* @author Julien BREUX <julien.breux@prestashop.com>
*/
class DbFactoryCore
{