Skip to content

Instantly share code, notes, and snippets.

View BRMatt's full-sized avatar

Matt Button BRMatt

View GitHub Profile
<?php
echo 'Yay 2.0';
?>
<?php
Class Increment extends CodeBench
{
public $description = 'Comparision of $i++ to ++$i';
public $loops = 10000;
public $subjects = array(
// Kinda sporadic jumps, but show a noticeable gap as value increases
<?php
class page_Core
{
static $title = '';
static $heading = '';
static $stylesheets = array();
static $scripts = array();
@BRMatt
BRMatt / loop.sh
Created February 6, 2010 19:13
Useful script for automatically running unit tests in a loop
#!/bin/bash
# Simple script for looping unit test runs
# Relies on a phpunit.xml config being in the cwd
# Author: matthew@sigswitch.com
for(( ; ; )); do clear; echo -e "`phpunit`"; sleep 10; done
[LD] e.debug
../external/out.debug/lib/libpcre.a(pcre_tables.o):(.rodata+0x0): multiple definition of `_pcre_OP_lengths'
.objs.debug/cx_pcre_tables.o:(.rodata+0x0): first defined here
../external/out.debug/lib/libpcre.a(pcre_tables.o):(.rodata+0x70): multiple definition of `_pcre_utf8_table1'
.objs.debug/cx_pcre_tables.o:(.rodata+0x70): first defined here
../external/out.debug/lib/libpcre.a(pcre_tables.o):(.rodata+0x88): multiple definition of `_pcre_utf8_table1_size'
.objs.debug/cx_pcre_tables.o:(.rodata+0x88): first defined here
../external/out.debug/lib/libpcre.a(pcre_tables.o):(.rodata+0x8c): multiple definition of `_pcre_utf8_table2'
.objs.debug/cx_pcre_tables.o:(.rodata+0x8c): first defined here
../external/out.debug/lib/libpcre.a(pcre_tables.o):(.rodata+0xa4): multiple definition of `_pcre_utf8_table3'
jQuery.fn.limitMaxlength = function(options){
settings = jQuery.extend({
attribute: "maxlength",
onInit: function(){},
onLimit: function(){},
onEdit: function(){}
}, options);
// Event handler to limit the textarea
@BRMatt
BRMatt / .gvimrc
Created May 5, 2010 15:36
My .vimrc and .gvimrc files
colorscheme twilight
body { background: #f1f8db !important; }
#Body {
margin: 15px 0 0 !important;
overflow: visible !important;
padding: 0 15px !important;
position: relative !important;
width: auto !important;
}
matt@matt-laptop:~$ tree /usr/share/php/PHPUnit/
/usr/share/php/PHPUnit/
├── Autoload.php
├── Extensions
│   ├── Database
│   │   ├── AbstractTester.php
│   │   ├── Constraint
│   │   │   ├── DataSetIsEqual.php
│   │   │   └── TableIsEqual.php
│   │   ├── DataSet
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace