Skip to content

Instantly share code, notes, and snippets.

View Irvyne's full-sized avatar

Thibaud BARDIN Irvyne

  • Devoteam
  • Paris, France
View GitHub Profile
@Irvyne
Irvyne / php-mamp-cli-with-alias.md
Last active August 24, 2020 01:47
Use mamp php in cli (using an alias)

Use mamp php in cli (using an alias)

Open a terminal and type php -v to see the current version of php.

Determine the path for the wanted php version of mamp (YOUR VERSION ON YOUR COMPUTER!)

  • example : /Applications/MAMP/bin/php/php5.x.x/bin/php

Type in the terminal cd ~ to change the current directory (in your home)

#!/bin/bash
#######################################
# Created by Thibaud BARDIN (Irvyne) #
#######################################
SUDO=''
APTITUDE_PARAM=''
DOTDEB_REPO='true'
MARIADB_REPO='true'
#!/bin/bash
aptitude update &&
aptitude upgrade -y

Distant Script Usage

wget -O - https://gist.githubusercontent.com/Irvyne/*/raw/*/my-script.sh | sh
server {
listen 80;
root /var/www/Symfony/web;
server_name site.dev;
location / {
try_files $uri /app.php$is_args$args;
}
location ~ ^/(app|app_dev|config)\.php(/|$) {
# Installing/Updating NodeJS
aptitude install checkinstall
src=$(mktemp -d) && cd $src
wget -N http://nodejs.org/dist/node-latest.tar.gz
tar -xzvf node-latest.tar.gz && cd node-v*
./configure
fakeroot checkinstall -y --install=no --pkgversion $(echo $(pwd) | sed -n -re's/.+node-v(.+)$/\1/p') make -j$(($(nproc)+1)) install
dpkg -i node_*
# Installing/Updating NPM
@Irvyne
Irvyne / nginx-configuration.md
Last active August 29, 2015 14:05
Nginx configuration to deal with Symfony2 (/etc/nginx/nginx.conf && /etc/nginx/fastcgi_params)

/etc/nginx/nginx.conf

#include /etc/nginx/naxsi_core.rules;
...
##
# Proxy Buffer
##
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
tools:
php_sim: true
php_pdepend: true
php_analyzer: true
php_mess_detector: true
php_changetracking: true
php_code_sniffer: true
php_cs_fixer:
config: { level: all }
sensiolabs_security_checker: true
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"