Skip to content

Instantly share code, notes, and snippets.

/Users/hannes/Library/Python/3.8/lib/python/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
2023-11-16 19:44:19,145 - INFO - Parsing /Users/hannes/Projects/vitesse9000/pistesse/backend/src/services/../../storage/2006803875.csv for sessions [1, 2, 3]
Traceback (most recent call last):
File "/Users/hannes/Projects/vitesse9000/pistesse/backend/src/services/../../../trackpy/track_to_gpx.py", line 69, in <module>
transponder = track.parse_transponder(filename, sessions=sessions)
File "/Users/hannes/Projects/vitesse9000/pistesse/trackpy/trackpy/transponder.py", line 361, in parse_transponder
transponder = read_transponder(filename, length=length, sessions=sessions)
File "/Users/hannes/Projects/vitesse9000/pistesse/trackpy/trackpy/transponder.py", line 58, in read_transponder
df[["Date", "Start time"]].agg(" ".join, ax
@hannesvdvreken
hannesvdvreken / ignore-platform-requirements.md
Last active March 18, 2023 04:19
ignore platform requirements

Composer update without PHP environment checking

Hi there, welcome for another blog post on Composer.

Since version 1.0.0-alpha9 composer has a new flag for the install and update commands. I'm talking about the --ignore-platform-reqs flag. From the changelog:

Added --ignore-platform-reqs to install/update commands to install even if you are missing a php extension or have an invalid php version.
<?php
namespace Demo;
use League\Flysystem\Filesystem;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
import assert from "assert";
function flatten<T>(array: (T|T[])[]): T[] {
let flat: T[] = [];
for (const el of array) {
if (!Array.isArray(el)) {
flat.push(el);
} else {

Keybase proof

I hereby claim:

  • I am hannesvdvreken on github.
  • I am hannesvdvreken (https://keybase.io/hannesvdvreken) on keybase.
  • I have a public key ASA7Uce4Au1dGpiPuABzFF8rjaj1bdvMLOg1JusBTKJFOQo

To claim this, I am signing this object:

/tests export-ignore
/stubs export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/phpunit.xml export-ignore
/changelog.md export-ignore
/readme.md export-ignore
@hannesvdvreken
hannesvdvreken / functions.php
Created September 5, 2016 13:08
functions.php
public function getProperties()
{
$page = 0;
$perPage = 30;
do {
++$page;
$this->propertiesToBeGeneratedQuery->paginate($page, $perPage);
$results = $this->propertiesToBeGeneratedQuery->run();
<?php
use Psr\Http\Message\ResponseRequestInterface;
use Psr\Http\Message\ServerRequestInterface;
function (ServerRequestInterface $request, ResponseInterface $response, callable $next)
{
// Do something with the Request or stop execution and return a Response here.
...
abstract class CsvExporter
{
protected $repository;
protected $file;
protected $writer;
protected $parameters;
class UserExporter
{
use CsvWriter;
public function __construct(User $users, UserTransformer $transformer)
{
$this->setup();
$this->setTransformer($transformer);
$this->users = $users;
}