Skip to content

Instantly share code, notes, and snippets.

View naderman's full-sized avatar
🤨

Nils Adermann naderman

🤨
View GitHub Profile
<?php
/**
* This file is part of the static reflection component.
*
* PHP Version 5
*
* Copyright (c) 2008-2009, Manuel Pichler <[email protected]>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@naderman
naderman / symfony.info
Created March 5, 2011 13:20
Drupal 7.0 Symfony2 Integration (Proof of Concept)
name = Symfony
description = Symfony Integration
core = 7.x
@naderman
naderman / JoomlaSessionStorage.php
Created May 28, 2011 19:51
Joomla! Symfony Integration Proof of Concept
<?php
namespace phpBB\JoomlaIntegration;
use Symfony\Component\HttpFoundation\SessionStorage\SessionStorageInterface;
class JoomlaSessionStorage implements SessionStorageInterface
{
protected $jSession;
PACKAGE : (-A-2.0-stable|+B-1.0-stable)
FEATURE :
UPDATE : (+php-5.3.3-stable)(+ext/date-0-stable)(+ext/ereg-0-stable)(+ext/libxml-0-stable)(+ext/openssl-0-stable)(+ext/pcre-0-stable)(+ext/sqlite3-0.7.0-dev)(+ext/zlib-1.1.0-stable)(+ext/bcmath-0-stable)(+ext/bz2-0-stable)(+ext/calendar-0-stable)(+ext/ctype-0-stable)(+ext/dba-0-stable)(+ext/dom-20031129.0.0-stable)(+ext/hash-1.0.0-stable)(+ext/fileinfo-1.0.5-dev)(+ext/filter-0.11.0-stable)(+ext/ftp-0-stable)(+ext/gettext-0-stable)(+ext/session-0-stable)(+ext/iconv-0-stable)(+ext/intl-1.1.0-stable)(+ext/json-1.2.1-stable)(+ext/mbstring-0-stable)(+ext/pcntl-0-stable)(+ext/spl-0.2.0-stable)(+ext/apc-3.1.6-stable)(+ext/posix-0-stable)(+ext/readline-0-stable)(+ext/reflection-0-stable)(+ext/shmop-0-stable)(+ext/simplexml-0.1.0-stable)(+ext/soap-0-stable)(+ext/sockets-0-stable)(+ext/exif-0-stable)(+ext/sysvmsg-0-stable)(+ext/sysvsem-0-stable)(+ext/sysvshm-0-stable)(+ext/tokenizer-0.1.0-stable)(+ext/wddx-0-stable)(+ext/xml-0-stable)(+ext/xmlreader-0.1.0-stable)(+ext
$ git log --format="%an" release-3.0.8...release-3.0.9 |sort|uniq -c|sort -n
1 Bart van Bragt
1 Chris Smith
1 ChrisTX
1 Ingo Migliarina
1 Marc Alexander
1 Niklas Schmidtmer
1 Philippe Chevrier
2 Josh Woody
2 Marek A. Ruszczynski
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
@naderman
naderman / composer.json
Created May 27, 2012 20:33
Composer Meta Package
{
"name": "naderman/sample-meta-package",
"version": "1.0.0",
"type": "metapackage",
"require": {
"naderman/package1": "self.version",
"naderman/package2": "self.version",
"naderman/package3": "2.0.3"
}
}
--TEST--
Update aliased package to non-aliased version
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{
"name": "a/a", "version": "dev-master",
@naderman
naderman / client-linear.php
Last active December 27, 2015 04:29
There is a server which simply waits 2 seconds and then outputs Hello World. The client-parallel script triggers the curl request, then sleeps for a second (representing some amount of work) and then processes the response. The client-linear request triggers the curl request and immediately waits for the answer and processes it, then it continue…
<?php
$ch1 = curl_init();
// set URL and other appropriate options
curl_setopt($ch1, CURLOPT_URL, "http://localhost/~naderman/sleep.php");
curl_setopt($ch1, CURLOPT_HEADER, 0);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
//create the multiple cURL handle
$mh = curl_multi_init();
@naderman
naderman / gist:8476251
Created January 17, 2014 16:21
Pipe - useful or not?
<?php
require __DIR__.'/../vendor/autoload.php';
use EasyBib\Pipe;
use iter\fn;
use React\Partial;
$leapCounter = new Pipe\Pipe(array(
Partial\bind('iter\map', fn\method('format', array('L'))),