Skip to content

Instantly share code, notes, and snippets.

View naderman's full-sized avatar
🤨

Nils Adermann naderman

🤨
View GitHub Profile
@naderman
naderman / composer.json
Created April 14, 2019 23:51
Reproduce case "something changed" loop
{
"name": "smichaelsen/composer-test",
"require": {
"behat/behat": "~2.5",
"friendsofphp/php-cs-fixer": "^2.12"
},
"repositories": {
"behat/behat": {
"type": "package",
"package": [
@naderman
naderman / proxy-test.php
Last active December 5, 2022 23:52
Composer HTTP Proxy Test
<?php
error_reporting(E_ERROR);
@ini_set('display_errors', 'Off');
echo "Unencrypted HTTP ";
check('http://packagist.org/packages.json', false);
@naderman
naderman / language_changes_3.1.0_to_3.1.1.diff
Created November 1, 2014 22:19
language_changes_3.1.0_to_3.1.1.diff
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index a2b27f0..107de9c 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -547,7 +547,7 @@ $lang = array_merge($lang, array(
<ul style="margin-left: 20px; font-size: 1.1em;">
<li>Go to the <a href="https://www.phpbb.com/downloads/" title="https://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the "Automatic Update Packag
<li>Unpack the archive.<br /><br /></li>
- <li>Upload the complete uncompressed install folder to your phpBB root directory (where your config.php file is).<br /><br /></li>
+ <li>Upload the complete uncompressed "install" and "vendor" folders to your phpBB root directory (where your config.php file is).<br /><br /></li>
$ /usr/local/bin/hhvm /home/naderman/projects/composer/composer/bin/composer --verbose update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing pocket-rent/ext-pgsql (dev-composer 8cc7e82)
Cloning 8cc7e82f4a45a9cead94aadcd935e039b3178703
** hphpize complete, now run `cmake . && make` to build
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- The ASM compiler identification is GNU
@naderman
naderman / output
Last active August 29, 2015 13:58
Error suppression exits process in hhvm
$ hhvm test.php
$ php test.php
foo
@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'))),
@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();
--TEST--
Update aliased package to non-aliased version
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{
"name": "a/a", "version": "dev-master",
@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"
}
}
<?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.