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 | |
/* | |
* This file is part of the API Platform project. | |
* | |
* (c) Kévin Dunglas <dunglas@gmail.com> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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 | |
/* | |
* This file is part of the API Platform project. | |
* | |
* (c) Kévin Dunglas <dunglas@gmail.com> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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
$uploadSession = $this->metaClient->request('POST', sprintf('%s/uploads', $this->metaAppId), [ | |
'query' => [ | |
'file_name' => $mediaObject->getFilePath(), | |
'file_length' => $mediaObject->getContentSize(), | |
'file_type' => $mediaObject->getMimeType(), | |
'access_token' => $credential->getAccessToken(), | |
'appsecret_proof' => $this->secretProof($credential->getAccessToken()), | |
], | |
])->toArray(); |
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 Components; | |
use Symfony\Component\Finder\Finder; | |
$loader = require './vendor/autoload.php'; | |
$namespace = 'ApiPlatform'; | |
$prefix = 'api-platform'; | |
$lnamespace = strlen($namespace); |
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
local NoDistraction = { enabled = 0 } | |
NoDistraction.enable = function() | |
NoDistraction.enabled = 1 | |
vim.cmd([[ | |
set noshowmode | |
set noruler | |
set laststatus=0 | |
set noshowcmd | |
set nonumber |
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 | |
// --- | |
// slug: use-doctrine-orm-filters | |
// name: Use Doctrine Filters | |
// position: 14 | |
// executable: true | |
// --- | |
// Doctrine ORM features [a filter system](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/filters.html) that allows the developer to add SQL to the conditional clauses of queries, regardless of the place where the SQL is generated (e.g. from a DQL query, or by loading associated entities). | |
// |
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 Soyuka\Marsh\Tests; | |
$a = []; | |
for ($i=0; $i < 10000; $i++) { | |
$o = new \stdClass(); | |
$o->i = $i; | |
$a[] = $o; |
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
#!/bin/bash | |
from=$(cat ~/.config/sway/current_scheme) | |
if [ "$from" = "black" ]; then | |
from=black | |
to=white | |
else | |
from=white | |
to=black |
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 | |
/* | |
* This file is part of the API Platform project. | |
* | |
* (c) Kévin Dunglas <dunglas@gmail.com> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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
@ViewChild('vc', {read: ViewContainerRef}) vc: ViewContainerRef; | |
constructor(private _compiler: Compiler, | |
private _injector: Injector, | |
private _m: NgModuleRef<any>) { | |
} | |
ngAfterViewInit() { | |
const template = '<span>generated on the fly: {{name}}</span>'; |
NewerOlder