Skip to content

Instantly share code, notes, and snippets.

View bencorlett's full-sized avatar

Ben Corlett bencorlett

View GitHub Profile
@bencorlett
bencorlett / gist:3afaaa3613e39b572492
Created September 8, 2014 06:05
Magento PHP 5.6 fixes

Find / replace (using a regular expression):

(iconv_set_encoding.*?\))

With:

(PHP_VERSION_ID < 50600) ? $0 : ini_set('default_charset', 'UTF-8');
{
"query": {
"function_score": {
"query": {
"bool": {
"must": {
"multi_match": {"query": "Renaissance", "fields": ["name", "company"]},
"term": {"features": "disability_access"},
},
"should": {
To use `2.0.*@dev` version of API... Do the following:
1. Remove old API service providers and just add `Cartalyst\Api\Laravel\ApiServiceProvider` instead.
2. Remove all old API facades (there was overrides for Input, Request etc) and use the following 2 facades:
'API' => 'Cartalyst\Api\Laravel\Facades\API',
'ApiResponse' => 'Cartalyst\Api\Response',
3. Add the following to `app/start.php`, around line 14 (before `$app = new Illuminate\Foundation\Application`:
@bencorlett
bencorlett / checklist.md
Last active December 17, 2015 07:19
Pre Laravel 4 Issue Checklist

Before you post an issue on laravel/framework...

Run though this damn checklist... Please!

  1. Search existing issues
  2. Have I run rm bootstrap/compiled.php?
  3. Have I run git pull {laravel remote name} develop?
  4. Have I run rm -rf vendor?
  5. Have I run composer update --no-dev?
  6. Have I tried turning it off and on again :P?
@bencorlett
bencorlett / pear-lion-install.md
Created September 5, 2012 23:29 — forked from macek/pear-lion-install.md
PEAR on OS X Lion

After upgrading to OSX Lion, I discovered that both PEAR and PECL had gone missing. It turns out that you have to re-install them, but luckily it's quite simple. I found this quick guide from Ruggero De Pellegrini on Google+, and thought I would share the info to save you the confusion:

  1. Download the installer curl http://pear.php.net/go-pear.phar > go-pear.php
  2. Start the installation procedure with sudo sudo php -q go-pear.php
  3. Select a new installation base ($prefix) e.g. /usr/local
  4. Proceed with the install.
  5. If there is no /etc/php.ini file yet, copy the default sudo cp /etc/php.ini.default /etc/php.ini
  6. Edit /etc/php.ini and change the line ;include_path = ".:/php/includes" to include_path = ".:/usr/local/share/pear"
  7. Add /usr/local/bin/ to your path if you haven't already, e.g. in .profile