Skip to content

Instantly share code, notes, and snippets.

View realityking's full-sized avatar

Rouven Weßling realityking

View GitHub Profile
@realityking
realityking / gist:9315991
Last active August 29, 2015 13:56
en/appendices/migrations56.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 332728 $ -->
<!--
Based on UPGRADING from PHP-5.6 circa alpha 1. Work in progress!
As we're still in alpha at the moment, I've only included relatively minimal
information here, and haven't updated the rest of the manual for 5.6 features
yet. Once we're well into betas/RCs and features are frozen, the information
in this appendix should be expanded and the new functionality integrated into
the rest of the manual.
@realityking
realityking / bench.php
Last active August 29, 2015 13:57 — forked from Rican7/bench.php
#!/usr/bin/env php
<?php
/**
* JSON/BSON encoding and decoding benchmark
*
* Now with native serializing!
*
* @copyright 2013 Trevor N Suarez
* @link http://blennd.com/
* @author Trevor Suarez <rican7@gmail.com>
@realityking
realityking / Travis Output
Last active August 29, 2015 13:58
Mockery Issue
Using worker: worker-linux-6-1.bb.travis-ci.org:travis-linux-4
travis_fold:start:git.1
$ git clone --depth=50 --branch=phpunit-broken git://github.com/realityking/swiftmailer.git realityking/swiftmailer
Cloning into 'realityking/swiftmailer'...
remote: Counting objects: 3010, done.
remote: Compressing objects: 0% (1/2027) 
remote: Compressing objects: 1% (21/2027) 
remote: Compressing objects: 2% (41/2027) 
remote: Compressing objects: 3% (61/2027) 
* thread #1: tid = 0x7ed76, 0x0000000100331817 php`zend_std_object_get_class_name(object=0x00000001058795f0, class_name=0x00007fff5fbfdc48, class_name_len=0x00007fff5fbfdc44, parent=0) + 167 at zend_object_handlers.c:1542, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
frame #0: 0x0000000100331817 php`zend_std_object_get_class_name(object=0x00000001058795f0, class_name=0x00007fff5fbfdc48, class_name_len=0x00007fff5fbfdc44, parent=0) + 167 at zend_object_handlers.c:1542
frame #1: 0x00000001002ee20f php`zend_get_object_classname(object=0x00000001058795f0, class_name=0x00007fff5fbfdc48, class_name_len=0x00007fff5fbfdc44) + 79 at zend_API.c:250
frame #2: 0x0000000100309fa3 php`zif_get_class(ht=1, return_value=0x000000010598e7d0, return_value_ptr=0x000000010068ff20, this_ptr=0x0000000000000000, return_value_used=1) + 355 at zend_builtin_functions.c:771
frame #3: 0x000000010038edba php`zend_do_fcall_common_helper_SPEC(execute_data=0x0000000100690038) + 1370 at ze
<html>
<head>
<style>
.something {
font: 700 300px sans-serif;
position: absolute;
}
</style>
<script>
function animate(element, color) {
@realityking
realityking / gist:1346705
Created November 8, 2011 00:56
index.html creator
#!/usr/bin/php
<?php
if (php_sapi_name() != "cli") {
echo "Error: phptidy has to be run on command line with CLI SAPI\n";
exit(1);
}
function getDirectory($path = '.', $level = 0) {
// Directories to ignore when listing output.
@realityking
realityking / gist:1401435
Created November 28, 2011 18:32
Joomla autoloader naming convention
-All classes have to start with a J to be considered by the autoloader
-Class names have to be camel cased
-Every uppercase letter marks a new folder
-If there's only one part it is repetead
Examples:
-JDatabase would have to be in database/database.php
-JDatabaseExporter would have to be in database/exporter.php
-JDatabaseExporterCvs would have to be in database/exporter/cvs.php
@realityking
realityking / gist:2314303
Created April 5, 2012 21:30
Joomla! patches that will help with 3.0
@realityking
realityking / gist:2768598
Created May 22, 2012 11:57
Proposed database changes for Joomla 3.0

This is mostly thinking based on MySQL, we'll have to change the MS SQL version accordingly.

Drop the following fields:

  • #__content.title_alias It's been marked as deprecated since 1.6.0 (?).

Change the following tables to InnoDB:

  • #__banners
  • #__banner_clients
  • #__categories
  • #__contact_details
@realityking
realityking / gist:2775329
Created May 23, 2012 13:49
SQL migration Joomla 3.0
# Drop deprecated columns
ALTER TABLE `#__content` DROP `title_alias`;
ALTER TABLE `#__content` DROP `sectionid`;
ALTER TABLE `#__users` DROP `usertype`;
ALTER TABLE `#__session` DROP `usertype`;
ALTER TABLE `#__users` DROP KEY `whosonline`;
# Change tables for which we want to support foreign keys or transactions to InnoDB