Problem | Solution |
---|---|
connect PHPStorm to Docker on Mac | API URL: unix:///var/run/docker.sock |
install mongo on PHP7 | pecl7 install mongodb |
sudo multiple commands at once | sudo -- bash -c 'command; command' |
mongo on laravel | 'options' => [ 'database' => env('MONGO_AUTH_DB', 'admin')] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"meta":{ | |
"theme":"kendall" | |
}, | |
"basics":{ | |
"name":"Milan Urukalo", | |
"label":"Tech Lead/Senior Backend Developer", | |
"picture":"http://www.gravatar.com/avatar/7f0a9775c71242584d2901a22425987e?s=200&r=pg&d=mm", | |
"email":"[email protected]", | |
"phone":"(+381)63/73-74-317", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = parse_url(getenv("CLEARDB_DATABASE_URL")); | |
$host = isset($url["host"]) ? $url["host"] : env('DB_HOST', '127.0.0.1'); | |
$username = isset($url["user"]) ? $url["user"] : env('DB_USERNAME', 'forge'); | |
$password = isset($url["pass"]) ? $url["pass"] : env('DB_PASSWORD', ''); | |
$database = isset($url["path"]) ? substr($url["path"], 1) : env('DB_DATABASE', 'forge'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install | |
npm run build | |
aws s3 sync $S3_DIRECTORY s3://$S3_BUCKET_NAME/ --acl=public-read --delete --exclude '.git/*' | |
aws cloudfront create-invalidation --distribution-id <DISTRIBUTION-ID> --paths /index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$eloquentObject = Mockery::mock(MyClass::class); | |
$eloquentObject->shouldReceive('getAttribute')->with('retationName')->andReturn($relatedObject); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Cache; | |
use Closure; | |
use Predis\Response\ServerException; | |
class CacheApiMiddleware | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$externalMock = Mockery::mock('overload:App\MyClass'); | |
$externalMock->shouldReceive('MyMethod') | |
->once() | |
->with($param) | |
->andReturn('Tested!'); | |
PHP conferences 2017
Name | Location | Start Date | End Date | Attending | Price |
---|---|---|---|---|---|
PHPBenelux Conference 2017 | Antwerp, Belgium | 01-29 | 01-30 | - | - |
PHP UK Conference 2017 | London, UK | 02-18 | 02-19 | - | - |
phpDay 2017 | Verona, Italy | 05-12 | 05-13 | WL | $220 + €56.07 fee & IVA |
PHPKonf | Istanbul, Turkey | 05-20 | 05-20 | WL | 20eur |
PHP Tour 2016 | Auvergne, France | 05-23 | 05-24 | ||
PHP Unconf | Palma De Majorca | 05-28 | 05-29 |