Skip to content

Instantly share code, notes, and snippets.

View will1471's full-sized avatar

William Redman will1471

  • West Midlands, UK
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<database name="foo"
namespace="Foo"
defaultIdMethod="native"
heavyIndexing="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xsd.propelorm.org/1.6/database.xsd" >
<vendor type="mysql">
will@will-laptop:~/src/propel-testcase$ ./vendor/bin/propel model:build --verbose
Processing: schema.xml
3 tables processed successfully
3 tables found in 1 schema files.
Generating PHP files...
Datamodel: ./schema.xml
- Database: foo
+ Table: child
-> (unchanged) Foo/Base/Child.php
-> (unchanged) Foo/Map/ChildTableMap.php
@will1471
will1471 / signals.php
Last active August 29, 2015 14:13
Handle signals gracefully in long running workers
<?php
echo 'My PID = ' . posix_getpid() . "\n";
abstract class AbstractWorker
{
private $loopNumber = 0;
private $shouldRun = true;
@will1471
will1471 / ImmutableVector.php
Created August 2, 2019 19:31
Vector using psalm.dev template annotations.
<?php
/**
* @template T
*/
class ImmutableVector
{
/**
* @psalm-var T[]