Skip to content

Instantly share code, notes, and snippets.

🖥
Virtualizing virtuals

Michael Babker mbabker

🖥
Virtualizing virtuals
Block or report user

Report or block mbabker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mbabker
mbabker / # php@7.2 - 2019-07-02_12-35-57.txt
Created Jul 2, 2019
php@7.2 on macOS 10.13.6 - Homebrew build logs
View # php@7.2 - 2019-07-02_12-35-57.txt
Homebrew build logs for php@7.2 on macOS 10.13.6
Build date: 2019-07-02 12:35:57
@mbabker
mbabker / gist:3211464
Created Jul 30, 2012
Creating a category via component postflight
View gist:3211464
// Get the database object
$db = JFactory::getDbo();
// JTableCategory is autoloaded in J! 3.0, so...
if (version_compare(JVERSION, '3.0', 'lt'))
{
JTable::addIncludePath(JPATH_PLATFORM . 'joomla/database/table');
}
// Initialize a new category
@mbabker
mbabker / notes.md
Last active Jul 21, 2016
Joomla! Prepared Statement Support
View notes.md

Joomla developers! Your support is needed to help make prepared statements in Joomla's database API a reality. I've started on some of this work but need help with testing and review.

Joomla's PDO driver already has provisions for prepared statement support written into it and the unsupported Oracle and SQLite drivers already make use of this.

In the Joomla! Framework Database Package I've started on work to expand this support. First, the PDO MySQL driver now has bound variable support and will fully support prepared statements.

I've opened pull requests for the MySQLi and PostgreSQL drivers to add support for prepared statements using the already defined interfaces in Joomla's database layer. Also, there is [a pull request](https://github.com/joomla

@mbabker
mbabker / queries.sql
Created Nov 3, 2013
Joomla Sample Data - Converting column data from MySQL to SQL Server
View queries.sql
UPDATE `jos_banner_clients` SET `checked_out_time` = '1900-01-01 00:00:00';
UPDATE `jos_banners` SET `checked_out_time` = '1900-01-01 00:00:00';
UPDATE `jos_banners` SET `publish_up` = '1900-01-01 00:00:00';
UPDATE `jos_banners` SET `publish_down` = '1900-01-01 00:00:00';
UPDATE `jos_banners` SET `reset` = '1900-01-01 00:00:00';
UPDATE `jos_banners` SET `modified` = '1900-01-01 00:00:00';
UPDATE `jos_categories` SET `checked_out_time` = '1900-01-01 00:00:00';
UPDATE `jos_categories` SET `modified_time` = '1900-01-01 00:00:00';
UPDATE `jos_contact_details` SET `checked_out_time` = '1900-01-01 00:00:00';
UPDATE `jos_contact_details` SET `modified` = '1900-01-01 00:00:00';
@mbabker
mbabker / installController.php
Created Aug 22, 2013
Updated AJAX handling for app client
View installController.php
public function installfromweb() {
$model = $this->getModel('install');
$response = $model->installfromweb();
echo new JResponseJson($response['body'], $response['message'], $response['error']);
jexit();
}
@mbabker
mbabker / gist:6275111
Created Aug 19, 2013
GitHub Comment Payload
View gist:6275111
class stdClass#1 (5) {
public $comment =>
class stdClass#2 (6) {
public $created_at =>
string(20) "2012-10-28T02:50:43Z"
public $body =>
string(68) "OK, last one on this issue. I think I have the payload figured out."
public $updated_at =>
string(20) "2012-10-28T02:50:43Z"
public $url =>
@mbabker
mbabker / helper.php
Created Aug 8, 2013
Modified TDB helper.php file
View helper.php
<?php
/**
* Tweet Display Back Module for Joomla!
*
* @package TweetDisplayBack
*
* @copyright Copyright (C) 2010-2013 Michael Babker. All rights reserved.
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
*/
@mbabker
mbabker / cms-app
Last active Dec 19, 2015
This is a comparison of the loading time/memory for the legacy JApplication based app classes versus the proposed app classes built on JApplicationWeb.
View cms-app
This is a comparison of the loading time/memory for the legacy JApplication based app classes versus
the proposed app classes built on JApplicationWeb.
This comparison is taken on joomla/joomla-cms@d28d5d15073561cb4c79f3e7cbfa221119e11e0e (master)
compared to joomla-projects/joomla-cms@d849d4669b3b9f7684dd8dd54e396a859e4acde5 (feature-app)
For both tests, a fresh installation is performed and the "Learn Joomla English (GB) Sample Data" dataset is installed.
For the site tests, the homepage is compared.
For the administrator tests, the login page and control panel pages are compared.
View routingDiff
Below are the debug console outputs comparing the current Joomla routing system versus Hannes' proposed improvements as collected on December 26, 2012. Tests were conducted on the CMS development HEAD with the "Learn Joomla English (GB) Sample Data" loaded.
Summary:
afterRender Time: 1.338 seconds (Current) vs. 0.542 seconds (Optimized)
Memory Usage: 2.84 MB (Current) vs. 2.61 MB (Optimized)
Current Routing:
Application 0.000 seconds (+0.000); 0.40 MB (+0.401) - afterLoad
Application 0.145 seconds (+0.145); 1.03 MB (+0.631) - afterInitialise
Application 0.557 seconds (+0.413); 2.07 MB (+1.043) - afterRoute
View tags.diff
diff --git a/libraries/cms/helper/tags.php b/libraries/cms/helper/tags.php
index 607bc9f..bd6cd35 100644
--- a/libraries/cms/helper/tags.php
+++ b/libraries/cms/helper/tags.php
@@ -20,6 +20,14 @@ defined('JPATH_PLATFORM') or die;
class JHelperTags
{
/**
+ * A list of tag IDs
+ *
You can’t perform that action at this time.