Skip to content

Instantly share code, notes, and snippets.

Avatar
👷‍♂️
dockerizing

Jeffery Fernandez jeffery

👷‍♂️
dockerizing
  • Ping Identity
  • Melbourne, Australia
View GitHub Profile
View 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
View Account_Module.php
<?php
namespace Account;
use Zend\Mvc\MvcEvent;
class Module
{
public function getConfig()
{
return include __DIR__ . '/config/module.config.php';
View Account_Module.php
<?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 Dec 20, 2015
ZfcUser Route
View 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 (
View 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);
}
View 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 Apr 3, 2013
List installed Packages grouped by Repository for openSUSE
View installed-packages.sh
#!/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 Mar 21, 2012 — forked from Nycto/traceAnalyser.php
A helper script for analyzing the output of a PHP xdebug code trace
View traceAnalyser.php
<?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 Sep 11, 2011
Script to inspect PHP_Depend results
View inspekt.php
#!/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 Sep 11, 2011
Script to visualize dependencies in a PHP project using PHP_Depend results
View dependencies.php
#!/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
{