Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Matt Thomas betweenbrain

I may be slow to respond.
View GitHub Profile
jbenet /
Last active Dec 3, 2022
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

AmyStephen / ProcessInput.php
Created Jul 11, 2013
System Plugin - onBeforeCompileHead - you can walk through any assets for the head. Where the head is rendered
View ProcessInput.php
public function onBeforeCompileHead()
$head = JFactory::getDocument()->getHeadData();
$styleSheets = $head['styleSheets'];
$newStyleSheets = array();
foreach ($styleSheets as $key => $value)
drmmr763 / process
Created Jun 28, 2013
Using plugins and mods for CCK in Joomla 3
View process
I'm trying to use the Joomla core as much as possible. Now to say that I'm using ONLY core would be untrue, since technically I'm creating and installing some plugins to accomplish this, but they certainly aren't 'heavy duty' components like K2, seblod, or some of the other Joomla CCKs out there.
Site I just built using this concept
## write some plugins
This sofimap plugin loads an XML file into the backend of ```com content``` that lets me store extra field data in my own table. So the process here is to use all the plugin events for ```com content``` to load the form, load form data, save form data, delete form data, and even display saved data in the front end.
jhafner /
Created May 16, 2013
Open the current repo on Github. Script by Brian Edgerton.
remote=`git config --get remote.origin.url`
if [ $host = $git_host ]
View Request.php
* Mimetype for your file - requires PHP 5.3, not enabled on default by Windows
$php_mime = finfo_open(FILEINFO_MIME);
$this->mime_type = strtolower(finfo_file($php_mime, $this->your_file_path_and_name));
// Thanks for great discussion from Ben Ramsey, Anthony Ferrara, Dave Reid, Jarvis Badgley
phproberto /
Last active Dec 10, 2015
Joomla! overridable media cheatsheet
malarkey / Contract Killer
Last active Nov 29, 2022
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008


dongilbert / config.php
Created Aug 2, 2012
Override Core Joomla! Classes
View config.php
* @package Joomla.Plugin
* @subpackage System.Overrides
* @copyright Copyright (C) 2012 Don Gilbert. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
define('OVERRIDES', dirname(__FILE__).'/overrides');
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
jlleblanc / gist:2926803
Created Jun 13, 2012
Using JImage to create square profile pictures in two sizes, regardless of the original's orientation
View gist:2926803
$image = new JImage('/path/to/original.jpg');
$height = $image->getHeight();
$width = $image->getWidth();
if ($height > $width) {
$crop_square = $width;
$crop_top = ($height - $width) / 2;