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
function user(uuid) { | |
let headers = new Headers({ | |
'Accept': 'application/json' | |
}) | |
let request = new Request('https://connect.symfony.com/api/users/' + uuid, { | |
method: 'GET', | |
headers: headers, | |
mode: 'cors', | |
cache: 'default' |
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
<<__ReturnDisposable>> | |
function closeOnScopeExit<<<__Enforceable>> reify T as Mode>( | |
Handle<T> $handle, | |
): DisposableHandle<T> { | |
return new DisposableHandle<T>($handle); | |
} |
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
namespace Nuxed\IO; | |
/* | |
* This file is part of the Nuxed package. | |
* | |
* (c) Saif Eddin Gmati <azjezz@protonmail.org> | |
* | |
* 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
use namespace Nuxed\Kernel; | |
use namespace Nuxed\Container; | |
use namespace Nuxed\Http\Router; | |
use namespace Nuxed\Http\Router\Generator; | |
final class Extension extends Kernel\Extension\AbstractExtension { | |
// register container services | |
public function register( | |
Container\ContainerBuilder $builder, | |
): void { |
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
/** Colors **/ | |
.primary { | |
color: #BDC6FF; | |
} | |
.secondary { | |
color: #F4C2C2; | |
} | |
.success { | |
color: #00cec9; |
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
``` | |
use namespace HH\Lib\Vec; | |
function process( | |
vec<(string, string, string, string)> $input | |
): dict<string, dict<string, dict<string, vec<string>>> { | |
$result = dict[]; | |
foreach($input as $tuple) { | |
$result[$tuple[0]][$tuple[1]][$tuple[2]] = Vec\concat( | |
$result[$tuple[0]][$tuple[1]][$tuple[2]] ?? vec[], |
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
$baz as Baz -> passed. | |
$qux as Baz -> failed : Expected Baz, got Qux. | |
$baz as Qux -> failed : Expected Qux, got Baz. | |
$qux as Qux -> passed. | |
$baz as Foo -> passed. | |
$qux as Foo -> passed. | |
$baz as Bar -> failed : Expected Bar, got Baz. | |
$qux as Bar -> passed. | |
$baz as string -> failed : Expected string, got Baz. | |
$baz as int -> failed : Expected int, got Baz. |
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
require __DIR__.'/vendor/autoload.hack'; | |
use namespace HH\Asio; | |
use namespace HH\Lib\Str; | |
use namespace Facebook\TypeAssert; | |
final class GithubPublicInformation { | |
const type TFileInfo = shape( | |
'sha' => string, | |
'filename' => string, |
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
<?hh // strict | |
namespace Polyfill; | |
use type ReflectionMethod; | |
use type ReflectionFunction; | |
function call_user_func(mixed $callable, mixed ...$args): mixed { | |
return call_user_func_array($callable, $args); | |
} |
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
<?hh // strict | |
use namespace HH\Asio; | |
/** | |
* Hate both the player, and the game. | |
*/ | |
<<__EntryPoint>> | |
async function main(): Awaitable<void> { |