Skip to content

Instantly share code, notes, and snippets.

View loranger's full-sized avatar

Laurent Goussard loranger

View GitHub Profile
@loranger
loranger / Laravel5.1-ErrorHandler.md
Last active October 31, 2018 19:35
Custom error page with default fallback for Laravel 5.1

Add the following method to you existing app/Exception/Handler.php in order to use resources/views/errors/$STATUS.blade.php (or fallback to resources/views/errors/default.blade.php)

   /**
    * Render the given HttpException.
    *
    * @param  \Symfony\Component\HttpKernel\Exception\HttpException  $e
    * @return \Symfony\Component\HttpFoundation\Response
    */
 protected function renderHttpException(HttpException $e)
@loranger
loranger / test.php
Last active August 29, 2015 14:19
overload inheritance
<?php
error_reporting(E_ALL);
/**
* Father
*/
class Father
{
@loranger
loranger / keybase.md
Created April 15, 2015 13:34
keybase.md

Keybase proof

I hereby claim:

  • I am loranger on github.
  • I am loranger (https://keybase.io/loranger) on keybase.
  • I have a public key whose fingerprint is 12C8 9108 BC40 B061 42B7 FF41 6332 3E68 E776 0D52

To claim this, I am signing this object:

@loranger
loranger / Output
Created April 7, 2015 07:29
PHP-FPM Crash log
Process: php-fpm [96969]
Path: /usr/local/opt/php56/sbin/php-fpm
Identifier: php-fpm
Version: 0
Code Type: X86-64 (Native)
Parent Process: php-fpm [304]
Responsible: php-fpm [96969]
User ID: 501
Date/Time: 2015-04-07 09:27:40.762 +0200
@loranger
loranger / Output
Created April 7, 2015 07:25
Brew install php-exts
$ brew install php56-xdebug php56-imagick php56-memcache php56-zmq php56-redis php56-mcrypt
==> Installing php56-xdebug from josegonzalez/homebrew-php
==> Downloading https://homebrew.bintray.com/bottles-php/php56-xdebug-2.3.2.yosemite.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/php56-xdebug-2.3.2.yosemite.bottle.tar.gz
==> Pouring php56-xdebug-2.3.2.yosemite.bottle.tar.gz
==> Caveats
To finish installing xdebug for PHP 5.6:
* /usr/local/etc/php/5.6/conf.d/ext-xdebug.ini was created,
do not forget to remove it upon extension removal.
* Validate installation via one of the following methods:
@loranger
loranger / Output
Created April 7, 2015 07:21
brew install -v php56
This file has been truncated, but you can view the full file.
$ brew install -v php56 --with-mssql, --with-homebrew-curl, --with-imap, --without-pear, --with-phpdbg, --with-thread-safety, --with-homebrew-libxslt, --with-tidy
==> Installing php56 from josegonzalez/homebrew-php
==> Downloading https://www.php.net/get/php-5.6.7.tar.bz2/from/this/mirror
/usr/bin/curl -fLA Homebrew 0.9.5 (Ruby 2.0.0-481; Mac OS X 10.10.2) https://www.php.net/get/php-5.6.7.tar.bz2/from/this/mirror -C 0 -o /Library/Caches/Homebrew/php56-5.6.7.incomplete
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 184 100 184 0 0 137 0 0:00:01 0:00:01 --:--:-- 137
0 0 0 1 0 0 0 0 --:--:-- 0:00:02 --:--:-- 1
100 13.0M 100 13.0M 0 0 600k 0 0:00:22 0:00:22 --:--:-- 638k
==> Verifying php56-5.6.7 checksum
@loranger
loranger / php-fpm_2015-04-02-122524_Merlin.crash
Created April 2, 2015 10:27
/Users/loranger/Library/Logs/DiagnosticReports/php-fpm_2015-04-02-122524_Merlin.crash
Process: php-fpm [77927]
Path: /usr/local/Cellar/php56/5.6.7/sbin/php-fpm
Identifier: php-fpm
Version: 0
Code Type: X86-64 (Native)
Parent Process: php-fpm [77029]
Responsible: iTerm [521]
User ID: 501
Date/Time: 2015-04-02 12:25:23.472 +0200
@loranger
loranger / Output
Created April 2, 2015 10:24
brew doctor
Your system is ready to brew.
@loranger
loranger / Output
Created April 2, 2015 10:21
brew info php56
php56: stable 5.6.7 (bottled), HEAD
https://php.net
/usr/local/Cellar/php56/5.6.7 (330 files, 66M) *
Built from source with: --with-mssql, --with-homebrew-curl, --with-imap, --without-pear, --with-phpdbg, --with-thread-safety, --with-homebrew-libxslt, --with-tidy
From: https://github.com/josegonzalez/homebrew-php/blob/master/Formula/php56.rb
==> Dependencies
Required: freetype ✔, gettext ✔, homebrew/dupes/zlib ✔, icu4c ✔, jpeg ✔, libpng ✔, openssl ✔, unixodbc ✔
Optional: enchant ✘, gmp ✔
==> Options
--homebrew-apxs
@loranger
loranger / Full command
Created April 2, 2015 10:20
Output of brew install -v php56.rb
brew install -v /usr/local/Library/Taps/josegonzalez/homebrew-php/Formula/php56.rb --with-mssql, --with-homebrew-curl, --with-imap, --without-pear, --with-phpdbg, --with-thread-safety, --with-homebrew-libxslt, --with-tidy