Skip to content

Instantly share code, notes, and snippets.

View Tyrael's full-sized avatar

Ferenc Kovacs Tyrael

  • IBM Budapest Lab
  • Hilversum, The Netherlands, Europe, Earth, Solar System, Milky Way Galaxy
  • X @tyr43l
View GitHub Profile
tyrael@thor:~/checkouts$ nslookup -type=NS php.net
Server: 109.74.194.20
Address: 109.74.194.20#53
Non-authoritative answer:
php.net nameserver = remote2.easydns.com.
php.net nameserver = ns2.easydns.com.
php.net nameserver = remote1.easydns.com.
php.net nameserver = ns1.easydns.com.
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>[windows|wiki].php.net is down for maintenance</title>
<style type="text/css">
body {
font-family: Verdana, Arial, Helvetica, Sans-Serif;
font-size: 85%;
margin: 0;
padding: 0;
<?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.
@Tyrael
Tyrael / gist:934020
Created April 21, 2011 09:00
random bash stuff
ps auxfw|egrep -i "apache|httpd"|egrep -iv "root|grep"|head -1|cut -f1 -d
# how to apply multiple patches, suhosin patches for example:
for patchfile in `find ./php-5.3.4/ -type f -print`;do
filename=${patchfile/php-5.3.4/php-5.3.6};
filename=${filename//\.diff};
patch $filename $patchfile;
done;
@Tyrael
Tyrael / gist:973681
Created May 15, 2011 23:34
php src tests
Index: ext/standard/tests/file/bug39863.phpt
===================================================================
--- ext/standard/tests/file/bug39863.phpt (revision 311062)
+++ ext/standard/tests/file/bug39863.phpt (working copy)
@@ -14,11 +14,6 @@
echo "PASS\n";
}
?>
-===DONE===
<?php exit(0); ?>
@Tyrael
Tyrael / gist:1020004
Created June 10, 2011 23:19
pecl.php.net install
# install some PEAR dependencies
pear install Html_Form Net_Url Net_URL2-beta Pager HTML_Table HTTP HTML_TreeMenu DB
# check out the code
svn co https://svn.php.net/repository/web/pecl/trunk pecl.php.net
# create and configure the vhost
# add the following line to the sql/data.php
# require_once "../include/pear-prepend.php";
@Tyrael
Tyrael / gist:1020037
Created June 10, 2011 23:49
peclweb-22756-bugfix
Index: include/pear-format-html.php
===================================================================
--- include/pear-format-html.php (revision 312027)
+++ include/pear-format-html.php (working copy)
@@ -160,8 +160,8 @@
<option value="packages">Packages</option>
<option value="site">This site (using Google)</option>
<option value="developers">Developers</option>
- <option value="pear-dev">Developer mailing list</option>
- <option value="pear-cvs">CVS commits mailing list</option>
@Tyrael
Tyrael / gist:1020915
Created June 11, 2011 20:21
peclweb sql/data.php problem
Index: data.php
===================================================================
--- data.php (revision 312067)
+++ data.php (working copy)
@@ -1,5 +1,6 @@
<?php
+require_once "../include/pear-prepend.php";
require_once "DB.php";
require_once "../include/pear-database.php";
@Tyrael
Tyrael / gist:1024786
Created June 14, 2011 12:12
associative arrays from php.net karma system
<?php
$url = 'http://svn.php.net/viewvc/SVNROOT/global_avail?revision=HEAD&view=co';
$file = file_get_contents($url);
$avail_lines = array();
$pattern = '/^avail\|(.*?)\|(.*?)$/sm';
$repos = array();
$users = array();
@Tyrael
Tyrael / gist:1051901
Created June 28, 2011 18:56
bugs temp patch
Index: www/bug.php
===================================================================
--- www/bug.php (revision 312577)
+++ www/bug.php (working copy)
@@ -37,6 +37,14 @@
// Set edit mode
$edit = isset($_REQUEST['edit']) ? (int) $_REQUEST['edit'] : 0;
+if ($edit && $bug_id < 60000 ) {
+ $errors[] = 'Editing old bugs is temporary unavailable!';