Skip to content

Instantly share code, notes, and snippets.

View roland-d's full-sized avatar

Roland Dalmulder roland-d

View GitHub Profile
@roland-d
roland-d / import.php
Created May 21, 2014 12:14
Bootstrapping an app for both Joomla 2.5 and Joomla 3.3
<?php
// Set flag that this is a parent file.
// We are a valid Joomla entry point.
define('_JEXEC', 1);
// Setup the base path related constants.
define('JPATH_BASE', dirname(dirname(dirname(dirname(dirname(__FILE__))))));
define('JPATH_COMPONENT_ADMINISTRATOR', dirname(dirname(__FILE__)));
define('JPATH_PLATFORM', JPATH_BASE . '/libraries');
@roland-d
roland-d / print_r.php
Last active October 27, 2017 08:09
Fancy print_r
?>
<pre><?php
echo __FILE__ . '::' . __LINE__ . ':: ';
echo ': ';
echo '<div style="font-size: 1.5em;">';
print_r($);
echo '</div>';
?></pre><?php
@roland-d
roland-d / sphp.sh
Last active December 10, 2018 09:14 — forked from rhukster/sphp.sh
#!/bin/bash
# Creator: Phil Cook
# Email: [email protected]
# Twitter: @p_cook
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')
brew_array=("5.6","7.1","7.2","7.3")
php_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]")
valet_support_php_version_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]")
php_installed_array=()