Skip to content

Instantly share code, notes, and snippets.

View wlalele's full-sized avatar

Amine Daï wlalele

View GitHub Profile
@wlalele
wlalele / vsm.js
Last active August 29, 2015 14:22 — forked from skrat/vsm.js
/**
* Extended version of THREE.ShadowMapPluginVSM using VSM shadow mapping.
* @author Dusan Maliarik
*/
THREE.ShadowMapPluginVSM = function ( ) {
var _gl,
_renderer,
_depthMaterial, _depthMaterialMorph, _depthMaterialSkin, _depthMaterialMorphSkin,
@wlalele
wlalele / installDoc.md
Last active October 10, 2016 13:03 — forked from faboo03/installDoc.md
Install Apache With PHP-FPM
@wlalele
wlalele / jhr.js
Last active December 7, 2016 13:23 — forked from Zirak/jhr.js
JSONHttpRequest
/**
* Perform a JSON Http Request via XMLHttpRequest
* @param method
* @param url
* @param data
* @param callback
* @returns {XMLHttpRequest}
*/
var jhr = function ( method, url, data, callback ) {
var xhr = new XMLHttpRequest();
@wlalele
wlalele / chphp
Created November 16, 2016 09:27
change php version used by the system
#!/bin/bash
sudo rm /etc/alternatives/php
sudo ln -s /usr/bin/php$1 /etc/alternatives/php
php --version
@wlalele
wlalele / sf
Created November 21, 2016 09:39
Symfony CLI shortcut for all versions
#!/bin/bash
ARGS=$*
function checkSf {
if [ -f $1 ];
then
php $1 $ARGS
fi
}
@wlalele
wlalele / composer_without_xdebug_alias.sh
Last active November 23, 2016 14:02
Composer without xdebug
alias comp="php -n $(which composer)"
@wlalele
wlalele / _update_project
Last active September 20, 2017 09:40
function bash to update a symfony 1.4 project
function _update_project {
if [ -z "$1" ] || [ -z "$2" ]; then
echo 'You have to call this method with 2 parameters, the git tag/branch name and the environment (prod, dev, ...)'
return
fi
git fetch -a
git checkout $1
git pull
composer install
@wlalele
wlalele / prepush
Created February 5, 2018 16:21
Custom PrePush hook
#!/bin/sh
exec < /dev/tty
while true; do
read -p "Is the documentation, coding-standard and tests okay? (Y/n) " yn
if [ "$yn" = "" ]; then
yn='Y'
fi
case $yn in
@wlalele
wlalele / pre-push
Created June 12, 2018 09:06
Git hook pre-push - Resamania2 Groot
#!/bin/sh
exec < /dev/tty
make requirements-status
make code-analysis
make coding-standard
make deprecation-detection
docker-compose exec php make unit-test
docker-compose exec php make behavior-test
@wlalele
wlalele / fr.json
Last active March 25, 2020 09:30
fr.json
{
"checkout": {
"summary": {
"information": "Détail d'inscription",
"payment-method": "Mode de paiement",
"payment-methods": {
"online": "Paiement en ligne"
},
"cart": {
"title": "Participant(s) et prix",