Skip to content

Instantly share code, notes, and snippets.

View richardDobron's full-sized avatar
💭
🔥 making stuff faster

Richard Dobroň richardDobron

💭
🔥 making stuff faster
View GitHub Profile
<?php
$asyncResponse = new \dobron\BigPipe\DialogResponse();
$asyncResponse->setTitle('Dialog title')
->setBody('HTML body')
->setFooter('HTML footer')
->dialog();
$asyncResponse->send();
<?php
$asyncResponse = new \dobron\BigPipe\AsyncResponse();
$asyncResponse->bigPipe()->require("require('Chart').setup()", [
'element' => \dobron\BigPipe\TransportMarker::transportElement('chart-div'),
'dataPoints' => $asyncResponse->transport()->transportSet([
['x' => 10, 'y' => 71],
['x' => 20, 'y' => 55],
['x' => 30, 'y' => 50],
['x' => 40, 'y' => 65],
]),
import ServerJSImpl from 'bigpipe-util/src/ServerJS';
export default class ServerJS extends ServerJSImpl {
}
import Primer from 'bigpipe-util/src/Primer';
Primer();
window.require = (modulePath) => {
 return modulePath.startsWith('bigpipe-util/')
 ? require('bigpipe-util/' + modulePath.substring(13) + '.js').default
 : require('./' + modulePath).default;
};
{
...
"scripts": {
"fix-style": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
"check-style": "vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run",
}
}
<?php
$finder = Symfony\Component\Finder\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
return (new PhpCsFixer\Config())
{
"sk_SK": {
"2gTzp8": [
"Uložiť",
"77515026232eb24b14cc5e7cca878637" // phrase hash
],
"16x4nE": {
"1": [ // male
"{name} zdieľal odkaz. Dajte mu vedieť, že sa vám páči.",
"11608ffd7ee5e79d727ab00631b2c164"
{
"sk_SK": {
"fb-locale": "sk_SK",
"translations": {
"77515026232eb24b14cc5e7cca878637": {
"translations": [
{
"translation": "Uložiť",
"variations": []
}
{
"phrases": [
{
"hashToText": {
"77515026232eb24b14cc5e7cca878637": "Save"
},
"desc": "Button: Save a form or settings",
"project": "tutorial app",
"author": "richard",
"type": "text",