Skip to content

Instantly share code, notes, and snippets.

Jamie York ziadoz

Block or report user

Report or block ziadoz

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
ziadoz / XmlElement.php
Created Aug 26, 2015
Simple XML Element Builder (Proxies to SimpleXMLElement class)
View XmlElement.php
use \SimpleXMLElement;
use \BadMethodCallException;
class XmlElement
* The default XML DOCTYPE.
* @var string
ziadoz / footer.php
Created Feb 6, 2014
Perch Bug — When using the perch_content_create() function to create a region and then the perch_content() method to retrieve it, two regions get created — a shared one and one for the page.
View footer.php
ziadoz / console.php
Last active Aug 29, 2015
Add PHPMig Commands to Custom Symfony Console
View console.php
require __DIR__ . '/vendor/autoload.php';
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Phpmig\Console\Command\CheckCommand;
use Phpmig\Console\Command\DownCommand;
ziadoz / AbstractForm.php
Created Sep 24, 2014
Aura Input / Filter Wrapper
View AbstractForm.php
* A simple wrapper around Aura Input.
use Aura\Input\Form;
use Aura\Input\Builder;
use Aura\Input\Filter;
use Aura\Html\HelperLocatorFactory;
use Aura\Filter\FilterFactory;
ziadoz / Preferences.sublime-settings
Last active Aug 29, 2015
Sublime Text 3 Settings
View Preferences.sublime-settings
"auto_close_tags": true,
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"create_window_at_startup": false,
"font_face": "Menlo",
"font_size": 12,
"highlight_line": true,
ziadoz / fixvcs.rb
Last active Aug 29, 2015
Reset Mecurial and Git Repositories
View fixvcs.rb
#! /usr/bin/env ruby
Dir.glob("~/Projects/**").each do |dir|
next unless
is_hg =, '.hg'))
is_git =, '.git'))
puts "Fixing " + File.basename(dir)
ziadoz / reloadvhosts.rb
Last active Aug 29, 2015
Update Sites-Available / Sites-Enabled Symlinks (Ubuntu 14.04 + Apache)
View reloadvhosts.rb
#! /usr/bin/env ruby
$VEBOSE = nil
class String
def colourise(color_code)
def red
ziadoz / index.php
Last active Aug 29, 2015
Simple PHP HTTP Handling
View index.php
// See Error Handling in PHP:
$display = function ($status, $headers = array(), $content = '') {
foreach ($headers as $key => $value) {
header($key . ': ' . $value);
ziadoz / sf-components.js
Created Jul 18, 2015
Extract Symfony Components as Markdown
View sf-components.js
var components = [];
$('.components-list tr').each(function() {
var name = $.trim($(this).find('').text()),
link = 'http://' + document.domain + $(this).find(' a').attr('href'),
desc = $.trim($(this).find('td:eq(1)').text());
if (name && link && desc) {
ziadoz /
Created Jul 20, 2015
Ubuntu 12.10 Setup
# Update Ubuntu
sudo apt-get install build-essential
sudo apt-get update
sudo apt-get upgrade
# Version Control
sudo apt-get install git mercurial subversion
# Mobile Shell (MOSH)
# See:
You can’t perform that action at this time.