Skip to content

Instantly share code, notes, and snippets.

View nWidart's full-sized avatar
💭
Available For Hire

Nicolas Widart nWidart

💭
Available For Hire
View GitHub Profile
@nWidart
nWidart / .sensiolabs
Created November 3, 2014 12:23
Disable the Interface suffix check.
rules:
php.interface_has_no_interface_suffix:
enabled: false
if ($('.slugify').length) {
$('.slugify').slug({
slug: 'slug',
hide: false
});
}
makeSlug = function () {
var slugcontent = $this.val();
var slugcontent_hyphens = slugcontent.replace(/\s/g, '-');
var slug_no_accents = this.normalize(slugcontent_hyphens);
var finishedslug = slug_no_accents.replace(/[^a-zA-Z0-9\-]/g, '');
jQuery('input.' + settings.slug).val(finishedslug.toLowerCase());
jQuery('span.' + settings.slug).text(finishedslug.toLowerCase());
}
normalize = function(string) {
console.log(string);
/**
* Return a normalized version of a given string.
* Replace accented and derivative characters by their simple version, remove any special characters and lowercase the result.
* @param {String} string
* @returns {String} Normalized string
*/
string.normalize = function(string) {
//replace accented chars
//http://stackoverflow.com/questions/18123501/replacing-accented-characters-with-plain-ascii-ones
var defaultDiacriticsRemovalMap = [
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Config Github Settings
github_username = "fideloper"
github_repo = "Vaprobash"
github_branch = "1.2.0"
github_url = "https://raw.githubusercontent.com/#{github_username}/#{github_repo}/#{github_branch}"
# Server Configuration
(function ($) {
"use strict";
$( document ).ready(function() {
$('.jsSaveProjectDraft').on('click',function (event) {
event.preventDefault();
$('.jsProjectDraftForm').trigger('updateProject');
});
// Init the jquery plugin on the form

UserAuthRepository

  • authenticate(credentials, remember)
  • register($user)
  • assignRole($user, $role)

Instructions

Pour garder le code source clair, stable et de qualité, nous allons choisir une methode de travail par Feature en gardant à l'esprit qu'à chaque instant T, UN SEUL developpeur a le droit de modifier un fichier, pour éviter le plus possible les merge conflicts

En gros, On clone le code source, on crée une branche privée par fonctionalités (login/about/contact....), on travaille sur le code, des qu'on fini on renvoit le code (commit) au serveur Git pour relecture et approbation, si c'est bon on met à jour la base, et on recommence avec de nouvelles fonctionnalités.

#Example

Un exemple de commande à éxecuter (via SSH sur la VM) lors d'un developpement d'une feature pour un projet :

$whoops = new Whoops\Run();
$whoops->pushHandler(new Whoops\Handler\PrettyPageHandler());
// Set Whoops as the default error and exception handler used by PHP:
$whoops->register();
//throw new RuntimeException("Oopsie!");