Skip to content

Instantly share code, notes, and snippets.

@omansour
omansour / gist:1357570
Created November 11, 2011 09:14
sugarCRM 6.4.0beta4 application bootstrap
<?php
if(!defined('sugarEntry'))define('sugarEntry', true);
$startTime = microtime(true);
require_once('include/entryPoint.php');
ob_start();
require_once('include/MVC/SugarApplication.php');
$app = new SugarApplication();
$app->startSession();
@omansour
omansour / gist:1838102
Created February 15, 2012 18:48
sql ez alert
INSERT INTO
ezsearch_tmp_0 SELECT DISTINCT
ezsearch_object_word_link.contentobject_id,
ezsearch_object_word_link.published
FROM ezcontentobject,
ezsearch_object_word_link
,
ezcontentclass,
ezcontentobject_tree
@omansour
omansour / composer.json
Created July 11, 2012 10:30
Exemple de fichier composer pour un composant M6
{
"name": "M6/Component/Redis",
"description" : "composant permettant d'utiliser Redis",
"type": "library",
"authors": [
{
"name": "Olivier Mansour",
"email": "olivier.mansour@m6.fr"
}
],
@omansour
omansour / atoum.ci.php
Created July 11, 2012 14:52
Configuration de Atoum et Jenkins
<?php
// build-tools/jenkins/atoum.ci.php
require_once __DIR__ . '/../../vendor/mageekguy/atoum/classes/autoloader.php';
/*
* CLI report.
*/
$stdOutWriter = new \mageekguy\atoum\writers\std\out();
$cli = new \mageekguy\atoum\reports\realtime\cli();
@omansour
omansour / atoum.dev.php
Created July 23, 2012 13:44
fichier de param d'atoum avec un fichier de score par user
<?php
use
mageekguy\atoum\scripts
;
$score_file = '/tmp/'.posix_getpwuid(posix_getuid())['name'].'atoum.score';
scripts\runner::setScoreFile($score_file);
$articles = $objArticle->getArticle($this->getIdWebSite(), 0, $end, $begin, 0, 0, 0, 0, 0, false, 'id DESC', '', 'y', '', false, '', '', '', '', 'article', '', '', '', '', '', '', '', '', '', '', 0, 0, '', '', '', '', '', '', '1', '', '', '', '', '', '', '', '1');
/**
* getArticle
* permet de récupérer les articles
*
* @param int $intIdWebSite id du website
@omansour
omansour / eb_gestionnaire_demande.md
Created November 7, 2012 17:34
EB d'un gestionnaire de demandes

EB gestionnaire de demandes

(mes excuses pour mon orthographe déplorable)

Gestionaire de demandes (anomalie, évolutions fonctionnelles …) sur des projets informatiques.

  • outil en mode web
  • persistence mysql
  • n'importe quel langage (PHP est mieux)
@omansour
omansour / vagrant_cheat_sheet.sh
Last active December 15, 2015 06:58 — forked from nazgob/gist:2367583
vagrant cheat sheet
# setup vagrant
gem install vagrant
vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
mkdir my_vagrant_test
cd my_vagrant_test
vagrant init lucid32
vim Vagrantfile
vagrant up
vagrant ssh
@omansour
omansour / git.protips.md
Created March 22, 2013 15:00
Git like a boss m6web

Git like a boss

Quelques commandes git bien pratiques.

Naviguer dans git

Pour revenir à la branche précédente :

git co -
@omansour
omansour / gist:6306470
Created August 22, 2013 12:20
conf atoum pour le CI
<?php
$projectDir = __DIR__ . '/../..';
$basedir = $projectDir . '/../';
require_once $projectDir . '/vendor/atoum/atoum/classes/autoloader.php';
$projectName = strtoupper(dirname($projectDir));
/*
* CLI report.
*/