Skip to content

Instantly share code, notes, and snippets.

@urukalo
urukalo / php_conferences_2017.md
Last active February 23, 2017 09:37 — forked from DragonBe/php_conferences_2016.md
Overview of PHP oriented conferences in 2017 (old world)
@urukalo
urukalo / fast_tips.md
Last active April 20, 2017 11:38
fast tips ( i forget quickly how i done something, this is where i will record all solutions )
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')]
<?php
$externalMock = Mockery::mock('overload:App\MyClass');
$externalMock->shouldReceive('MyMethod')
->once()
->with($param)
->andReturn('Tested!');
<?php
namespace App\Http\Middleware;
use Cache;
use Closure;
use Predis\Response\ServerException;
class CacheApiMiddleware
{
<?php
$eloquentObject = Mockery::mock(MyClass::class);
$eloquentObject->shouldReceive('getAttribute')->with('retationName')->andReturn($relatedObject);
?>
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
<?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');
{
"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",