Skip to content

Instantly share code, notes, and snippets.

View brzuchal's full-sized avatar

Michał Marcin Brzuchalski brzuchal

View GitHub Profile
@mindplay-dk
mindplay-dk / session-life-cycle.md
Last active March 28, 2024 19:52
Complete overview of the PHP SessionHandler life-cycle

This page provides a full overview of PHP's SessionHandler life-cycle - this was generated by a set of test-scripts, in order to provide an exact overview of when and what you can expect will be called in your custom SessionHandler implementation.

Each example is a separate script being run by a client with cookies enabled.

To the left, you can see the function being called in your script, and to the right, you can see the resulting calls being made to a custom session-handler registed using session_set_save_handler().

// by Erik Wrenholt
import java.util.*;
class Mandelbrot
{
static int BAILOUT = 16;
static int MAX_ITERATIONS = 1000;
private static int iterate(float x, float y)
{
// XMLDecl from http://www.w3.org/TR/xml/#xmldoc
$regex = <<<'REGEX'
/
(?(DEFINE)
(?<S> [\x20\x9\xD\xA]+ )
(?<Eq> (?&S)? = (?&S)? )
)
^(?<XMLDecl>
<\?xml
(?<VersionInfo>
@bspkrs
bspkrs / pg_change_schema_owner.sh
Last active September 18, 2023 23:26 — forked from mintsoft/change_db_owner.sh
Changes the owner on all tables, sequences, views, and functions in a PostgreSQL database with support for identifiers with whitespace and non-public schemas.
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script sets ownership for all tables, sequences, views, and functions for a given schema.
Run this script as your postgres OS user.
@jsor
jsor / ddd_cqrs_event-sourcing_in_php.md
Last active April 11, 2024 23:48
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
@cspray
cspray / cv-ring-description.md
Created January 27, 2012 15:55
A brief description of cv-ring and cv-pls

What is 'cv-ring', 'cv-pls' and 'delv-pls'

In the Stack Overflow PHP chat you may notice the regulars using tags like cv-pls, cv-ring and delv-pls. These tags are used only in the chat room to communicate with other users that a question or answer may need more votes to be closed or deleted. The PHP tag has a lot of inferior quality and duplicative information on Stack Overflow. We feel that inferior quality questions bring down the site and make it harder to find good information, particularly about PHP. By closing and merging these questions as appropriate you'll find the information you need quicker.

  • cv-ring is just a 'funny name' we give to the group of regulars who use the tags
  • cv-pls is an in-chat tag that communicates "Hey, this question may be of inferior quality. Check it out and, if you feel appropriate, cast a close vote."
  • delv-pls is an in-chat tag that communicates "Hey, this question has alr