Skip to content

Instantly share code, notes, and snippets.

View hlubek's full-sized avatar

Christopher Hlubek hlubek

View GitHub Profile
@hlubek
hlubek / foo.rb
Created October 20, 2009 14:36
A nested array method for awesome nested set
class Foo < ActiveRecord::Base
acts_as_nested_set
extend NestedSet::Helper
# Return a nested array
# representation of foo objects
def self.as_tree
result_to_array(find(:all, :order => quoted_left_column_name))
end
end
rubel = Rubel::Evaluator.new
result = rubel.evaluate 'firstname == 'Charly' or age > 16',
:with => {'user' => {'firstname' => 'Charly', 'age' => 15}
<link rel="stylesheet" type="text/css" href="/_Resources/Static/Packages/FLOW3/Error/Debugger.css" />
<div class="F3-FLOW3-Error-Debugger-VarDump">
<div class="F3-FLOW3-Error-Debugger-VarDump-Top">
FLOW3 Variable Dump
</div>
<div class="F3-FLOW3-Error-Debugger-VarDump-Center">
<pre dir="ltr"><span class="debug-object" title="0000000016ff63a0000000006f312c94">F3\TYPO3\Domain\Model\Content\Page</span><span class="debug-scope">prototype<a id="0000000016ff63a0000000006f312c94"></a></span><span class="debug-ptype" title="a42fc274-78e6-47e2-a5f6-6d886d03fd5e">entity</span><span class="debug-proxy">proxy</span>
<span class="debug-property">title</span> => '<span class="debug-string">Updated title</span>' (13)
<span class="debug-property">hidden</span> => FALSE
Index: Tests/Unit/Reflection/ObjectAccessTest.php
===================================================================
--- Tests/Unit/Reflection/ObjectAccessTest.php (Revision 4470)
+++ Tests/Unit/Reflection/ObjectAccessTest.php (Arbeitskopie)
@@ -216,6 +216,20 @@
/**
* @test
+ * @author Christopher Hlubek <hlubek@networkteam.com>
+ */
@hlubek
hlubek / Typo3DbBackend.php
Created August 23, 2011 15:28
Extbase Language Overlay Fix
<?php
/***************************************************************
* Copyright notice
*
* (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
* All rights reserved
*
* This class is a backport of the corresponding class of FLOW3.
* All credits go to the v5 team.
*
@hlubek
hlubek / ApiKeyToken.php
Created September 21, 2011 12:50
FLOW3 API Token
<?php
declare(ENCODING = 'utf-8');
namespace Networkteam\MyProject\Security\Authentication\Token;
/* *
* This script belongs to the FLOW3 package "MyProject". *
* *
* @copyright Copyright 2011, networkteam GmbH *
* */
@hlubek
hlubek / gist:1281743
Created October 12, 2011 16:34
Stacktrace
Uncaught Exception in FLOW3
#1: Catchable Fatal Error: Argument 3 passed to TYPO3\FLOW3\Error\Message_Original::__construct() must be an array, string given in /Users/work/FLOW3/MyProject-New/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/TYPO3_FLOW3_Error_Message_Original.php line 71 (More information)
TYPO3\FLOW3\Error\Exception thrown in file
Packages/Framework/TYPO3.FLOW3/Classes/Error/ErrorHandler.php in line 77.
Reference code: 201110121829267199af
Go to the FORGE issue tracker and report the issue - if you think it is a bug!
26 TYPO3\FLOW3\Error\ErrorHandler::handleError(4096, "Argument 3 passed to TYPO3\FLOW3\Error\Message_Ori…inal::__construct() must be an array, string given", "/Users/work/FLOW3/MyProject-New/Data/Temporary/De…ect_Classes/TYPO3_FLOW3_Error_Message_Original.php", 71, array)
@hlubek
hlubek / NodeImportServiceTest.php
Created September 30, 2015 10:24
Test for date properties in the node import
<?php
/**
* @test
*/
public function importSingleNode()
{
$xmlReader = new \XMLReader();
$result = $xmlReader->open(__DIR__ . '/Fixtures/SingleNode.xml');
@hlubek
hlubek / README.md
Last active September 30, 2015 10:58 — forked from mbostock/.block
Donut Chart

This donut chart is constructed from a CSV file storing the populations of various age groups. The chart employs a number of D3 features:

@hlubek
hlubek / nL_monitor.js
Created March 13, 2013 10:47
nodeload with resource monitoring
#!/usr/bin/env node
/*
Copyright (c) 2010 Benjamin Schmaus
Copyright (c) 2010 Jonathan Lee
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell