Update nginx config to support a longer timeout to prevent it dropping the connection when trying to debug in PHP Storm
fastcgi_read_timeout 600; # Set fairly high for debugging
| <?php | |
| require __DIR__ . '/vendor/autoload.php'; | |
| $s3 = Aws\S3\S3Client::factory($config); | |
| $s3->registerStreamWrapper(); | |
| $url = 's3://{$bucket}/{$key}'; | |
| // Read CSV with fopen |
| <?php | |
| use PhpParser\Node; | |
| use PhpParser\Node\Expr; | |
| error_reporting(E_ALL); | |
| ini_set('memory_limit', -1); | |
| //$dir = __DIR__ . '/../../Symfony_2.3'; |
| <?php | |
| register_tick_function(function() { | |
| $bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); | |
| $last = reset($bt); | |
| $info = sprintf("%s +%d\n", $last['file'], $last['line']); | |
| file_put_contents('/tmp/segfault.txt', $info, FILE_APPEND); | |
| // or | |
| // file_put_contents('php://output', $info, FILE_APPEND); | |
| }); |
| { | |
| "query": { | |
| "function_score": { | |
| "query": { | |
| "bool": { | |
| "must": { | |
| "multi_match": {"query": "Renaissance", "fields": ["name", "company"]}, | |
| "term": {"features": "disability_access"}, | |
| }, | |
| "should": { |
| #!/bin/sh | |
| # Laravel 5 new project setup bash script. | |
| # Inspired by Mitchell van Wijngaarden | |
| # Extended by John in 't Hout | |
| projectname=$1 | |
| git clone -o laravel -b develop https://github.com/laravel/laravel.git ${projectname} >/dev/null | |
| cd ${projectname} | |
| git checkout --orphan master |
| <?php namespace Farm\Providers; | |
| use Illuminate\Support\ServiceProvider; | |
| /** | |
| * Class LocalServiceProviderProvider | |
| * | |
| * Service provider to allow us to register local environment specific providers (i.e. development dependencies). | |
| * | |
| * @package Farm\Providers |
#Laravel 5 Simple ACL manager
Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.
If the user has a 'Root' role, then they can perform any actions.
Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php
| <?php | |
| namespace PHPSTORM_META { | |
| /** | |
| * PhpStorm Meta file, to provide autocomplete information for PhpStorm | |
| * Generated on 2017-09-28. | |
| * | |
| * @author Barry vd. Heuvel <[email protected]> | |
| * @see https://github.com/barryvdh/laravel-ide-helper | |
| */ |
Branch A has commits (X,Y) that also need to be in Branch B. The cherry-pick operations should be done in the same chronological order that the commits appear in Branch A.
cherry-pick does support a range of commits, but if you have merge commits in that range, it gets really complicated
git checkout branch-B
git cherry-pick X
git cherry-pick Y