Navigation Menu

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 / xvfb_daemon.sh
Created July 5, 2011 00:18 — forked from tommeier/xvfb_daemon.sh
Xvfb startup init script for headless selenium started via Jenkins
#!/bin/bash
# /etc/init.d/xvfb_daemon
# Debian-compatible Xvfb startup script.
# Tom Meier <tom@venombytes.com>
# Jeffery Fernandez <jeffery@fernandez.net.au>
#
### BEGIN INIT INFO
# Provides: xvfb_daemon
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
@jeffery
jeffery / selenium
Created July 6, 2011 22:51 — forked from robinhoode/selenium
/etc/init.d/selenium
#!/bin/bash
# TODO: http://wiki.debian.org/LSBInitScripts
DESC="Selenium server"
RUN_AS=root
JAVA_BIN=/usr/bin/java
SELENIUM_DIR=/etc/selenium
PID_FILE="$SELENIUM_DIR/selenium.pid"
@jeffery
jeffery / Debianize-Git-Jenkins
Created July 19, 2011 23:18
Trigger the build of a debian package for a Git SCM project via Jenkins CI
#!/bin/bash
#
# This is a helper script to trigger the build of a debian package for a
# project which is in Git SCM and integrated via Jenkins CI
#
# The trigger used for the package build is a string "bump for release"
# which is part of the commit message for the Git repository.
#
# The Changelog is then parsed to obtain the release version and then
# the repository is exported for package building
@jeffery
jeffery / GeoLocator
Created July 20, 2011 22:42
MySQL Helper class for calculating Distances between to geo locations
<?php
class GeoLocator
{
/**
* @var string
*/
public static $tableGeoPostcodeSuburbState = 'geoAustralianLocations';
@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
{
@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 / 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 / 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 / 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);
}