Skip to content

Instantly share code, notes, and snippets.

View jeffery's full-sized avatar
🏠
Working from home

Jeffery Fernandez jeffery

🏠
Working from home
  • Ping Identity
  • Melbourne, Australia
View GitHub Profile
@jeffery
jeffery / ocp.php
Created March 21, 2014 07:06 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
@jeffery
jeffery / Account_Module.php
Last active December 20, 2015 14:49
ZfcUser Routes
<?php
namespace Account;
use Zend\Mvc\MvcEvent;
class Module
{
public function getConfig()
{
return include __DIR__ . '/config/module.config.php';
@jeffery
jeffery / Account_Module.php
Created August 4, 2013 06:28
Account Module
<?php
namespace Account;
use Zend\Mvc\MvcEvent;
class Module
{
public function getConfig()
{
return include __DIR__ . '/config/module.config.php';
@jeffery
jeffery / ZfcUser Route
Last active December 20, 2015 14:49
ZfcUser Route
<?php
return array (
'controllers' => array (
'invokables' => array (
'Account\Controller\Index' => 'Account\Controller\IndexController',
),
),
// The following section is new and should be added to your file
'router' => array (
'routes' => array (
@jeffery
jeffery / add_dom_css
Created July 18, 2013 10:24
add_dom_css
function add_dom_css(script_file)
{
script = document.createElement('link');
script.type = 'text/css';
script.rel = 'stylesheet';
script.href = script_file;
document.getElementsByTagName('head')[0].appendChild(script);
}
@jeffery
jeffery / add_dom_javascript
Created July 18, 2013 10:22
add_dom_javascript
function add_dom_javascript(scriptFile, callBackFunction, callBackParams)
{
var fileAdded = false;
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = scriptFile;
if ( (callBackFunction) && (arguments.length >= 2) )
{
@jeffery
jeffery / installed-packages.sh
Created April 3, 2013 05:42
List installed Packages grouped by Repository for openSUSE
#!/bin/bash
for repo in `zypper repos --uri | tail -n+3 | awk -F ' ' '{ print $1 }'`
do
zypper se -sir "$repo"
echo
echo
done
@jeffery
jeffery / traceAnalyser.php
Created March 21, 2012 23:40 — forked from Nycto/traceAnalyser.php
A helper script for analyzing the output of a PHP xdebug code trace
<?php
/**
* Analyzes the output of an XDebug script trace
*
* The original version can be found here:
* http://svn.xdebug.org/cgi-bin/viewvc.cgi/xdebug/trunk/contrib/tracefile-analyser.php?root=xdebug
*
* This version was created to work in PHP 5.2
*/
@jeffery
jeffery / inspekt.php
Created September 11, 2011 13:30
Script to inspect PHP_Depend results
#!/usr/bin/env php
<?php
/**
* Usage:
* pdepend --summary-xml=/tmp/summary.xml /path/to/source
*
* ./inspekt.php /tmp/summary.xml --metric0
*/
class Inspect
{
@jeffery
jeffery / dependencies.php
Created September 11, 2011 13:28
Script to visualize dependencies in a PHP project using PHP_Depend results
#!/usr/bin/env php
<?php
/**
* Usage:
* pdepend --jdepend-xml=/tmp/jdepend.xml /path/to/source
*
* ./dependencies.php /tmp/jdepend.xml -o /tmp/jdepend.svg
*/
class Dependencies
{