| <?php declare(strict_types = 1); | |
| function testPerformance($name, Closure $closure, $runs = 1000000) | |
| { | |
| $start = microtime(true); | |
| for (; $runs > 0; $runs--) | |
| { | |
| $closure(); | |
| } | |
| $end = microtime(true); |
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
Gotten from the RedHat GPG migration manual
## Export all public keys
gpg -a --export >mypubkeys.asc
I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.
For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.
Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.
| <?php | |
| use App\Console\Kernel; | |
| use Carbon\Carbon; | |
| use Illuminate\Console\Scheduling\Event; | |
| use Illuminate\Console\Scheduling\Schedule; | |
| use Illuminate\Support\Collection; | |
| class ConsoleSchedulingTest extends TestCase | |
| { |
| # This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2... | |
| # This also works perfectly for all static file content in all projects | |
| # This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config. | |
| # Example: | |
| # http://example.com - Main Laravel site as usual | |
| # http://example.com/about - Main Laravel site about page as usual | |
| # http://example.com/robots.txt - Main Laravel site static content as usual | |
| # http://example.com/api/v1 - Lumen v1 api default / route | |
| # http://example.com/api/v1/ - Lumen v1 api default / route |
Set the url with ?XDEBUG_SESSION_START=PHPSTORM and set a header Cookie: XDEBUG_SESSION=PHPSTORM
Set the url with ?XDEBUG_SESSION_START=PHPSTORM and set a header Cookie: XDEBUG_SESSION=PHPSTORM
| <?php | |
| namespace Jobs; | |
| use Illuminate\Queue\InteractsWithQueue; | |
| use Illuminate\Redis\Database as Redis; | |
| class Foo extends Job | |
| { | |
| use InteractsWithQueue; |