Marco Bunge mbunge

View gulpfile.js
1 2 3 4 5 6 7 8 9 10
var gulp = require('gulp');
var sys = require('sys');
var gutil = require('gulp-util');
var exec = require('gulp-exec');
 
gulp.task('phpunit', function() {
gulp.src('./tests').pipe(
exec('phpunit --bootstrap tests/bootstrap.php -c tests/phpunit.xml tests/', function(error, stdout){
sys.puts(stdout);
return false;
View impex.php
1 2 3 4 5 6 7 8 9 10
<?php
class ImpEx {
 
private $data = null;
private $rawData = null;
private $processData = null;
private $profiles = null;
 
const CSV_DELIMITER = ',';
const CSV_DELIMITER_EXCEL = ';';
View loadjsfile.js
1 2 3 4 5 6 7 8 9
var loadJsFile = function (filename) {
var fileref = document.createElement('script')
fileref.setAttribute("type", "text/javascript")
fileref.setAttribute("src", filename)
 
if (typeof fileref != "undefined") {
document.getElementsByTagName("head")[0].appendChild(fileref)
}
}
View xgs.scss
1 2 3 4 5 6 7 8 9 10
/*-----------------------------------------------------
Nextlevel Gridssystem - XGS
by Marco Bunge of rubymatrix.de <marco.bunge@rubymatrix-de>.
Based on 960gs (http://960.gs)
SASS Core
-------------------------------------------------------*/
 
 
/* Grid Settings
---------------------------*/
View stanalone_view.php
1 2 3 4 5 6 7 8 9
<?php
 
class View {
 
public function throwException($message){
throw new Exception($message);
}
 
public function getPagesBySection($targetSection,$targetFolder,$decoratorCallback=null){
View bootatrap_ideas.php
1 2 3 4 5 6 7 8 9 10
<?php
 
interface Bootstrap {
public function setBootstrapper(Bootstrapper $object);
public function registerTask($name, $callable);
public function getTasks();
}
 
interface Bootstrapper {
public function setParam($name,$value);
View profiler.php
1 2 3 4 5 6 7 8 9
<?php
 
 
class Profiler {
public $time = 0;
public $memory = 0;
public function startRecordTime(){
$this->time = microtime(true);
}
View kol.md

The key of life is an infinite circle of

inspiration > idea > action > reflection >

View mysteriousNaN.php
1 2 3 4 5 6 7 8 9
Since NaN is not even equal to itself, here is a way to test it:
 
From: http://de.php.net/manual/en/function.is-nan.php#50295
 
<?php
 
function my_is_nan($_) {
return ($_ !== $_);
}
View preg_match_array.php
1 2 3 4 5 6 7 8 9 10
<?php
/**
* preg_match over given array with a defined pattern
*
* Example:
*
* $names = array(
* 'hans',
* 'dieter',
* 'peter',
Something went wrong with that request. Please try again.