Skip to content

Instantly share code, notes, and snippets.


Artur Bodera Thinkscape

View GitHub Profile
Thinkscape / Ext.bugfix.GridFilterBase.js
Last active Aug 29, 2015
Add support for configurable filter "property"
View Ext.bugfix.GridFilterBase.js
* Add support for configurable filter "property"
Ext.define('Ext.bugfix.GridFilterBase', {
override: 'Ext.grid.filters.filter.Base',
config: {
* @cfg {String} property
* The property name to use when creating a filter
Thinkscape / Ext.bugfix.BufferedRender.js
Created Oct 9, 2014
Work around trees/grids that will not render correctly in case they are hidden from the view (i.e. in a Tab) but data has changed.
View Ext.bugfix.BufferedRender.js
* Work around trees/grids that will not render correctly in case they are hidden from the view (i.e. in a Tab) but
* data has changed.
Ext.define('Ext.bugfix.BufferedRenderer', {
override: 'Ext.grid.plugin.BufferedRenderer',
getLastVisibleRowIndex: function() {
var result = this.callParent(arguments);
Thinkscape / Ext.bugfix.Reader.js
Last active Aug 29, 2015
Fix reading of entities containing "length" property.
View Ext.bugfix.Reader.js
* Fix reading of entities containing "length" property
* @link
* @link
Ext.define('Ext.bugfix.Reader', {
override: '',
extractData: function(root, readOptions) {
Thinkscape / Ext.bugfix.GridFilterDate.js
Created Sep 24, 2014
Allow configurable filter date format in Ext.grid.filters.filter.Date
View Ext.bugfix.GridFilterDate.js
* Allow configurable date format when creating a store filter.
* To set a global default app-wise, include this fix and use something like:
* Ext.grid.filters.filter.Date.prototype.dateWriteFormat = 'c';
Ext.define('Ext.bugfix.GridFilterDate', {
override: 'Ext.grid.filters.filter.Date',
Thinkscape / getRandomDoctrineItem.php
Last active Nov 25, 2015
Get random item from Doctrine2 repository
View getRandomDoctrineItem.php
use Doctrine\ORM\EntityManager;
* Retrieve one random item of given class from ORM repository.
* @param EntityManager $em The Entity Manager instance to use
* @param string $class The class name to retrieve items from
* @return object
Thinkscape / speedTest.php
Last active Aug 29, 2015
PHP-based cpu speed test. It'll attempt to detect number of cpu cores available and run PI calc.
View speedTest.php
* Usage:
* php speedTest.php [ITERATIONS] [CONCURRENCY]
* ITERATIONS - (optional) Number of iterations (PI digits) to compute.
* Values above 10000 can seriously hog your machine.
* CONCURRENCY - (optional) Number of CPU cores to use. If empty,
* it's going to attempt to detect the number.
Thinkscape / tooltipGroup.js
Last active Aug 29, 2015
tooltip-group support for angular-strap
View tooltipGroup.js
module.directive('tooltipGroup', [
var popoverRegistry = {};
var suspend = false; // semaphore used to prevent circular calling of hide triggers
return {
restrict : 'A',
priority : 1,
link : {
pre : function ($scope, el, attrs, formCtrl) {
// $scope.artifactPickerSelectOptions = artifactPicker.getSelectOptions();
Thinkscape / open-webinspector.applescript
Last active Sep 8, 2020 — forked from amuino/webinspector.applescript
Script for opening web inspector window for remote debugging iOS web apps (including phonegap and other webview apps). This version of the script will suspend and wait for 30 seconds for Safari to establish a connection with the device (or simulator) and open the web inspector window as soon as technically possible.
View open-webinspector.applescript
# Name of the device as visible in Safari->Develop menu
set deviceName to "iPhone Simulator"
# Number of seconds to wait for the simulator window to show up
set maxWait to 30
# ---------------------------------------
# You shouldn't modify anything below here
View not-prefixed.php
namespace Foo {
class Bar {
public function baz() {
return strlen('Regarding the overhead: Just keep in mind, that a typical application calls built-in functions many thousand times. Even if the difference is small: It exists.');
$start = microtime(true);
$foo = new Bar;
string(50) "The url we are looking for:"
string(46) "The url after parsing:"
URL has been broken during parsing
string(42) "Url before sending:"
string(42) "Url after sending:"
URL has been changed when sending request!
You can’t perform that action at this time.