PeerTube Direct Links

A note for future self: as the web interface of PeerTube do not exposes any direct link to access the raw video files it hosts (but only a link to the embeddable own player, which may be unconvenient in many situations), a bit of hack is required.Given that a…

Pushing into the Rocket

A Rocket Chat instance, the same 60 users already pushed into a PeerTube instance, and poor will to understand the too much complex native feature to import by CSV.Let's write another script (very similar to the PeerTube's one...):<?php require_once('vendor/autoload.php'); use GuzzleHttp\Client; $endpoint…

Pushing into the Tube

A PeerTube instance, 60 users to create, and an import feature not yet implemented. But a suggestion: "You can easily develop a script that create these users via API call".Here, my script:<?php require_once('vendor/autoload.php'); use GuzzleHttp\Client; $endpoint = 'https://my.peertube.server/api/v1/…

Laravel Infinite Scroll

I needed to quickly implement a very simple infinite scroll behaviour on a very simple page. Due laziness I got a look for any dirty hack suggested by random people on the internet to do that in Laravel, ready to be copied and pasted; I found a method using jScroll…

Influenced by SPARQL

It is some time now that I'm working on a SPARQL ORM for Laravel, directly derived from Eloquent and sharing (at least, in the original intention) the same feeling and interface.I've not tagged yet a first release, but I'm actually esperimenting with some very simple use cases to test,…

Not so Static Assets with Laravel

Handling Laravel routing in ReactPHP, I missed a particular use case: managing the assets usually sitting in the public/ folder. Publishing a regular application with a regular web server it takes care to directly fetch and serve the files from the filesystem, but wrapping the application into a ReactPHP loop…

Routing ReactPHP with Laravel

As previously mentioned, I'm actually playing with asyncronous PHP and I'm trying to combine ReactPHP (which is the most popular framework for this kind of tasks, in PHP) and Laravel (which is the most popular "classic HTTP syncronous" framework).Today's challenge: run a ReactPHP HTTP Server, but still leveraging the…

Scaling Websockets in PHP

I have to implement some kind of sub-system for a larger platform, able to handle realtime communications (such as chat, notifications, and a few other things). And this means: websockets. And, as the platform itself is implemented in PHP/Laravel, this means: websockets in PHP.So I get back to…

Who is Who

Using Redis to store Laravel sessions is a good idea. But be sure to allocate an instance large enough, especially if you use it also for caching pourposes.AWS Elasticache graphs are not eloquent enough about you effective memory usage. Querying the instance with redis-cli seems to be more effective.…

Progressive PDF Loading

If you have large PDF documents to serve into a website, probably you don't want those are fetched entirely before showing to the user. And if you host them in AWS S3, you may also be concerned about bandwidth usage and costs. Mozilla's PDF.js handles progressive loading and handling,…